Documentation ¶
Index ¶
- Constants
- Variables
- func NewDB(sqldb *sql.DB, oracleSpecID int) ocrtypes.Database
- type OCRContract
- func (oc *OCRContract) ConfigFromLogs(ctx context.Context, changedInBlock uint64) (c ocrtypes.ContractConfig, err error)
- func (oc *OCRContract) FromAddress() gethCommon.Address
- func (oc *OCRContract) LatestBlockHeight(ctx context.Context) (blockheight uint64, err error)
- func (oc *OCRContract) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error)
- func (oc *OCRContract) LatestTransmissionDetails(ctx context.Context) (configDigest ocrtypes.ConfigDigest, epoch uint32, round uint8, ...)
- func (oc *OCRContract) SubscribeToNewConfigs(context.Context) (ocrtypes.ContractConfigSubscription, error)
- func (oc *OCRContract) Transmit(ctx context.Context, report []byte, rs, ss [][32]byte, vs [32]byte) error
- type OCRContractConfigSubscription
- func (sub *OCRContractConfigSubscription) Close()
- func (sub *OCRContractConfigSubscription) Configs() <-chan ocrtypes.ContractConfig
- func (sub *OCRContractConfigSubscription) HandleLog(lb eth.LogBroadcast, err error)
- func (sub *OCRContractConfigSubscription) JobID() *models.ID
- func (sub *OCRContractConfigSubscription) OnConnect()
- func (sub *OCRContractConfigSubscription) OnDisconnect()
- type Transmitter
Constants ¶
View Source
const OCRContractConfigSubscriptionHandleLogTimeout = 5 * time.Second
Variables ¶
View Source
var (
OCRContractConfigSet = getConfigSetHash()
)
Functions ¶
Types ¶
type OCRContract ¶
type OCRContract struct {
// contains filtered or unexported fields
}
func NewOCRContract ¶
func NewOCRContract(address gethCommon.Address, ethClient eth.Client, logBroadcaster eth.LogBroadcaster, jobID models.ID, transmitter Transmitter, logger logger.Logger) (o *OCRContract, err error)
func (*OCRContract) ConfigFromLogs ¶
func (oc *OCRContract) ConfigFromLogs(ctx context.Context, changedInBlock uint64) (c ocrtypes.ContractConfig, err error)
func (*OCRContract) FromAddress ¶
func (oc *OCRContract) FromAddress() gethCommon.Address
func (*OCRContract) LatestBlockHeight ¶
func (oc *OCRContract) LatestBlockHeight(ctx context.Context) (blockheight uint64, err error)
func (*OCRContract) LatestConfigDetails ¶
func (oc *OCRContract) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error)
func (*OCRContract) LatestTransmissionDetails ¶
func (oc *OCRContract) LatestTransmissionDetails(ctx context.Context) (configDigest ocrtypes.ConfigDigest, epoch uint32, round uint8, latestAnswer ocrtypes.Observation, latestTimestamp time.Time, err error)
func (*OCRContract) SubscribeToNewConfigs ¶
func (oc *OCRContract) SubscribeToNewConfigs(context.Context) (ocrtypes.ContractConfigSubscription, error)
type OCRContractConfigSubscription ¶
type OCRContractConfigSubscription struct {
// contains filtered or unexported fields
}
func (*OCRContractConfigSubscription) Close ¶
func (sub *OCRContractConfigSubscription) Close()
Close complies with ContractConfigSubscription interface
func (*OCRContractConfigSubscription) Configs ¶
func (sub *OCRContractConfigSubscription) Configs() <-chan ocrtypes.ContractConfig
Configs complies with ContractConfigSubscription interface
func (*OCRContractConfigSubscription) HandleLog ¶
func (sub *OCRContractConfigSubscription) HandleLog(lb eth.LogBroadcast, err error)
HandleLog complies with LogListener interface
func (*OCRContractConfigSubscription) JobID ¶
func (sub *OCRContractConfigSubscription) JobID() *models.ID
JobID complies with LogListener interface
func (*OCRContractConfigSubscription) OnConnect ¶
func (sub *OCRContractConfigSubscription) OnConnect()
OnConnect complies with LogListener interface
func (*OCRContractConfigSubscription) OnDisconnect ¶
func (sub *OCRContractConfigSubscription) OnDisconnect()
OnDisconnect complies with LogListener interface
type Transmitter ¶
type Transmitter interface { CreateEthTransaction(ctx context.Context, toAddress gethCommon.Address, payload []byte) error FromAddress() gethCommon.Address }
func NewTransmitter ¶
func NewTransmitter(sqldb *sql.DB, fromAddress gethCommon.Address, gasLimit uint64) Transmitter
NewTransmitter creates a new eth transmitter
Click to show internal directories.
Click to hide internal directories.