Documentation ¶
Overview ¶
Package contracts handles deployment, management, and interactions of smart contracts on various chains
Index ¶
- type APIConsumer
- type BlockHashStore
- type ContractDeployer
- type DeviationFlaggingValidator
- type EthereumAPIConsumer
- func (e *EthereumAPIConsumer) Address() string
- func (e *EthereumAPIConsumer) CreateRequestTo(oracleAddr string, jobID [32]byte, payment *big.Int, url string, path string, ...) error
- func (e *EthereumAPIConsumer) Data(ctx context.Context) (*big.Int, error)
- func (e *EthereumAPIConsumer) Fund(ethAmount *big.Float) error
- func (e *EthereumAPIConsumer) RoundID(ctx context.Context) (*big.Int, error)
- func (e *EthereumAPIConsumer) WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error
- type EthereumBlockhashStore
- type EthereumContractDeployer
- func (e *EthereumContractDeployer) DeployAPIConsumer(linkAddr string) (APIConsumer, error)
- func (e *EthereumContractDeployer) DeployBlockhashStore() (BlockHashStore, error)
- func (e *EthereumContractDeployer) DeployDeviationFlaggingValidator(flags string, flaggingThreshold *big.Int) (DeviationFlaggingValidator, error)
- func (e *EthereumContractDeployer) DeployFlags(rac string) (Flags, error)
- func (e *EthereumContractDeployer) DeployFluxAggregatorContract(linkAddr string, fluxOptions FluxAggregatorOptions) (FluxAggregator, error)
- func (e *EthereumContractDeployer) DeployKeeperConsumer(updateInterval *big.Int) (KeeperConsumer, error)
- func (e *EthereumContractDeployer) DeployKeeperConsumerPerformance(testBlockRange, averageCadence, checkGasToBurn, performGasToBurn *big.Int) (KeeperConsumerPerformance, error)
- func (e *EthereumContractDeployer) DeployKeeperRegistry(opts *KeeperRegistryOpts) (KeeperRegistry, error)
- func (e *EthereumContractDeployer) DeployLinkTokenContract() (LinkToken, error)
- func (e *EthereumContractDeployer) DeployMockETHLINKFeed(answer *big.Int) (MockETHLINKFeed, error)
- func (e *EthereumContractDeployer) DeployMockGasFeed(answer *big.Int) (MockGasFeed, error)
- func (e *EthereumContractDeployer) DeployOffChainAggregator(linkAddr string, offchainOptions OffchainOptions) (OffchainAggregator, error)
- func (e *EthereumContractDeployer) DeployOracle(linkAddr string) (Oracle, error)
- func (e *EthereumContractDeployer) DeployReadAccessController() (ReadAccessController, error)
- func (e *EthereumContractDeployer) DeployStorageContract() (Storage, error)
- func (e *EthereumContractDeployer) DeployUpkeepCounter(testRange *big.Int, interval *big.Int) (UpkeepCounter, error)
- func (e *EthereumContractDeployer) DeployUpkeepPerformCounterRestrictive(testRange *big.Int, averageEligibilityCadence *big.Int) (UpkeepPerformCounterRestrictive, error)
- func (e *EthereumContractDeployer) DeployUpkeepRegistrationRequests(linkAddr string, minLinkJuels *big.Int) (UpkeepRegistrar, error)
- func (e *EthereumContractDeployer) DeployVRFConsumer(linkAddr string, coordinatorAddr string) (VRFConsumer, error)
- func (e *EthereumContractDeployer) DeployVRFConsumerV2(linkAddr string, coordinatorAddr string) (VRFConsumerV2, error)
- func (e *EthereumContractDeployer) DeployVRFContract() (VRF, error)
- func (e *EthereumContractDeployer) DeployVRFCoordinator(linkAddr string, bhsAddr string) (VRFCoordinator, error)
- func (e *EthereumContractDeployer) DeployVRFCoordinatorV2(linkAddr string, bhsAddr string, linkEthFeedAddr string) (VRFCoordinatorV2, error)
- type EthereumDeviationFlaggingValidator
- type EthereumFlags
- type EthereumFluxAggregator
- func (f *EthereumFluxAggregator) Address() string
- func (f *EthereumFluxAggregator) Description(ctxt context.Context) (string, error)
- func (f *EthereumFluxAggregator) Fund(ethAmount *big.Float) error
- func (f *EthereumFluxAggregator) GetContractData(ctx context.Context) (*FluxAggregatorData, error)
- func (f *EthereumFluxAggregator) GetOracles(ctx context.Context) ([]string, error)
- func (f *EthereumFluxAggregator) LatestRoundData(ctx context.Context) (RoundData, error)
- func (f *EthereumFluxAggregator) LatestRoundID(ctx context.Context) (*big.Int, error)
- func (f *EthereumFluxAggregator) PaymentAmount(ctx context.Context) (*big.Int, error)
- func (f *EthereumFluxAggregator) RequestNewRound(ctx context.Context) error
- func (f *EthereumFluxAggregator) SetOracles(o FluxAggregatorSetOraclesOptions) error
- func (f *EthereumFluxAggregator) SetRequesterPermissions(ctx context.Context, addr common.Address, authorized bool, roundsDelay uint32) error
- func (f *EthereumFluxAggregator) UpdateAvailableFunds() error
- func (f *EthereumFluxAggregator) WatchSubmissionReceived(ctx context.Context, eventChan chan<- *SubmissionEvent) error
- func (f *EthereumFluxAggregator) WithdrawPayment(ctx context.Context, from common.Address, to common.Address, amount *big.Int) error
- func (f *EthereumFluxAggregator) WithdrawablePayment(ctx context.Context, addr common.Address) (*big.Int, error)
- type EthereumKeeperConsumer
- type EthereumKeeperConsumerPerformance
- func (v *EthereumKeeperConsumerPerformance) Address() string
- func (v *EthereumKeeperConsumerPerformance) CheckEligible(ctx context.Context) (bool, error)
- func (v *EthereumKeeperConsumerPerformance) Fund(ethAmount *big.Float) error
- func (v *EthereumKeeperConsumerPerformance) GetUpkeepCount(ctx context.Context) (*big.Int, error)
- func (v *EthereumKeeperConsumerPerformance) SetCheckGasToBurn(ctx context.Context, gas *big.Int) error
- func (v *EthereumKeeperConsumerPerformance) SetPerformGasToBurn(ctx context.Context, gas *big.Int) error
- type EthereumKeeperRegistry
- func (v *EthereumKeeperRegistry) AddUpkeepFunds(id *big.Int, amount *big.Int) error
- func (v *EthereumKeeperRegistry) Address() string
- func (v *EthereumKeeperRegistry) CancelUpkeep(id *big.Int) error
- func (v *EthereumKeeperRegistry) Fund(ethAmount *big.Float) error
- func (v *EthereumKeeperRegistry) GetKeeperInfo(ctx context.Context, keeperAddr string) (*KeeperInfo, error)
- func (v *EthereumKeeperRegistry) GetKeeperList(ctx context.Context) ([]string, error)
- func (v *EthereumKeeperRegistry) GetUpkeepInfo(ctx context.Context, id *big.Int) (*UpkeepInfo, error)
- func (v *EthereumKeeperRegistry) ParseUpkeepIdFromRegisteredLog(log *types.Log) (*big.Int, error)
- func (v *EthereumKeeperRegistry) RegisterUpkeep(target string, gasLimit uint32, admin string, checkData []byte) error
- func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings) error
- func (v *EthereumKeeperRegistry) SetKeepers(keepers []string, payees []string) error
- func (v *EthereumKeeperRegistry) SetRegistrar(registrarAddr string) error
- func (v *EthereumKeeperRegistry) SetUpkeepGasLimit(id *big.Int, gas uint32) error
- type EthereumLinkToken
- func (l *EthereumLinkToken) Address() string
- func (l *EthereumLinkToken) Approve(to string, amount *big.Int) error
- func (l *EthereumLinkToken) BalanceOf(ctx context.Context, addr string) (*big.Int, error)
- func (l *EthereumLinkToken) Fund(ethAmount *big.Float) error
- func (l *EthereumLinkToken) Name(ctxt context.Context) (string, error)
- func (l *EthereumLinkToken) Transfer(to string, amount *big.Int) error
- func (l *EthereumLinkToken) TransferAndCall(to string, amount *big.Int, data []byte) (*types.Transaction, error)
- type EthereumMockETHLINKFeed
- type EthereumMockGASFeed
- type EthereumOffchainAggregator
- func (o *EthereumOffchainAggregator) Address() string
- func (o *EthereumOffchainAggregator) Fund(ethAmount *big.Float) error
- func (o *EthereumOffchainAggregator) GetContractData(ctxt context.Context) (*OffchainAggregatorData, error)
- func (o *EthereumOffchainAggregator) GetLatestAnswer(ctxt context.Context) (*big.Int, error)
- func (o *EthereumOffchainAggregator) GetLatestRound(ctxt context.Context) (*RoundData, error)
- func (o *EthereumOffchainAggregator) RequestNewRound() error
- func (o *EthereumOffchainAggregator) SetConfig(chainlinkNodes []client.Chainlink, ocrConfig OffChainAggregatorConfig) error
- func (o *EthereumOffchainAggregator) SetPayees(transmitters, payees []string) error
- type EthereumOracle
- type EthereumReadAccessController
- type EthereumStorage
- type EthereumUpkeepCounter
- type EthereumUpkeepPerformCounterRestrictive
- func (v *EthereumUpkeepPerformCounterRestrictive) Address() string
- func (v *EthereumUpkeepPerformCounterRestrictive) Counter(ctx context.Context) (*big.Int, error)
- func (v *EthereumUpkeepPerformCounterRestrictive) Fund(ethAmount *big.Float) error
- func (v *EthereumUpkeepPerformCounterRestrictive) SetSpread(testRange *big.Int, interval *big.Int) error
- type EthereumUpkeepRegistrationRequests
- func (v *EthereumUpkeepRegistrationRequests) Address() string
- func (v *EthereumUpkeepRegistrationRequests) EncodeRegisterRequest(name string, email []byte, upkeepAddr string, gasLimit uint32, ...) ([]byte, error)
- func (v *EthereumUpkeepRegistrationRequests) Fund(ethAmount *big.Float) error
- func (v *EthereumUpkeepRegistrationRequests) SetRegistrarConfig(autoRegister bool, windowSizeBlocks uint32, allowedPerWindow uint16, ...) error
- type EthereumVRF
- type EthereumVRFConsumer
- func (v *EthereumVRFConsumer) Address() string
- func (v *EthereumVRFConsumer) CurrentRoundID(ctx context.Context) (*big.Int, error)
- func (v *EthereumVRFConsumer) Fund(ethAmount *big.Float) error
- func (v *EthereumVRFConsumer) RandomnessOutput(ctx context.Context) (*big.Int, error)
- func (v *EthereumVRFConsumer) RequestRandomness(hash [32]byte, fee *big.Int) error
- func (v *EthereumVRFConsumer) WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error
- type EthereumVRFConsumerV2
- func (v *EthereumVRFConsumerV2) Address() string
- func (v *EthereumVRFConsumerV2) CreateFundedSubscription(funds *big.Int) error
- func (v *EthereumVRFConsumerV2) CurrentSubscription() (uint64, error)
- func (v *EthereumVRFConsumerV2) Fund(ethAmount *big.Float) error
- func (v *EthereumVRFConsumerV2) GasAvailable() (*big.Int, error)
- func (v *EthereumVRFConsumerV2) GetAllRandomWords(ctx context.Context, num int) ([]*big.Int, error)
- func (v *EthereumVRFConsumerV2) RandomnessOutput(ctx context.Context, arg0 *big.Int) (*big.Int, error)
- func (v *EthereumVRFConsumerV2) RequestRandomness(hash [32]byte, subID uint64, confs uint16, gasLimit uint32, numWords uint32) error
- func (v *EthereumVRFConsumerV2) TopUpSubscriptionFunds(funds *big.Int) error
- type EthereumVRFCoordinator
- type EthereumVRFCoordinatorV2
- func (v *EthereumVRFCoordinatorV2) Address() string
- func (v *EthereumVRFCoordinatorV2) HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error)
- func (v *EthereumVRFCoordinatorV2) RegisterProvingKey(oracleAddr string, publicProvingKey [2]*big.Int) error
- func (v *EthereumVRFCoordinatorV2) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, ...) error
- type Flags
- type FluxAggregator
- type FluxAggregatorData
- type FluxAggregatorOptions
- type FluxAggregatorRoundConfirmer
- type FluxAggregatorSetOraclesOptions
- type JobByInstance
- type KeeperConsumer
- type KeeperConsumerPerformance
- type KeeperConsumerPerformanceRoundConfirmer
- type KeeperConsumerRoundConfirmer
- type KeeperInfo
- type KeeperRegistrarSettings
- type KeeperRegistry
- type KeeperRegistryOpts
- type KeeperRegistrySettings
- type KlaytnContractDeployer
- type LinkToken
- type MetisContractDeployer
- type MockETHLINKFeed
- type MockGasFeed
- type OffChainAggregatorConfig
- type OffChainAggregatorV2Config
- type OffchainAggregator
- type OffchainAggregatorData
- type OffchainAggregatorRoundConfirmer
- type OffchainOptions
- type Oracle
- type PerfEvent
- type ReadAccessController
- type RoundData
- type RunlogRoundConfirmer
- type Storage
- type SubmissionEvent
- type UpkeepCounter
- type UpkeepInfo
- type UpkeepPerformCounterRestrictive
- type UpkeepRegistrar
- type VRF
- type VRFConsumer
- type VRFConsumerRoundConfirmer
- type VRFConsumerV2
- type VRFCoordinator
- type VRFCoordinatorV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConsumer ¶
type APIConsumer interface { Address() string RoundID(ctx context.Context) (*big.Int, error) Fund(ethAmount *big.Float) error Data(ctx context.Context) (*big.Int, error) CreateRequestTo( oracleAddr string, jobID [32]byte, payment *big.Int, url string, path string, times *big.Int, ) error WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error }
type BlockHashStore ¶
type BlockHashStore interface {
Address() string
}
type ContractDeployer ¶
type ContractDeployer interface { DeployStorageContract() (Storage, error) DeployAPIConsumer(linkAddr string) (APIConsumer, error) DeployOracle(linkAddr string) (Oracle, error) DeployReadAccessController() (ReadAccessController, error) DeployFlags(rac string) (Flags, error) DeployDeviationFlaggingValidator( flags string, flaggingThreshold *big.Int, ) (DeviationFlaggingValidator, error) DeployFluxAggregatorContract(linkAddr string, fluxOptions FluxAggregatorOptions) (FluxAggregator, error) DeployLinkTokenContract() (LinkToken, error) DeployOffChainAggregator(linkAddr string, offchainOptions OffchainOptions) (OffchainAggregator, error) DeployVRFContract() (VRF, error) DeployMockETHLINKFeed(answer *big.Int) (MockETHLINKFeed, error) DeployMockGasFeed(answer *big.Int) (MockGasFeed, error) DeployUpkeepRegistrationRequests(linkAddr string, minLinkJuels *big.Int) (UpkeepRegistrar, error) DeployKeeperRegistry(opts *KeeperRegistryOpts) (KeeperRegistry, error) DeployKeeperConsumer(updateInterval *big.Int) (KeeperConsumer, error) DeployKeeperConsumerPerformance( testBlockRange, averageCadence, checkGasToBurn, performGasToBurn *big.Int, ) (KeeperConsumerPerformance, error) DeployUpkeepCounter(testRange *big.Int, interval *big.Int) (UpkeepCounter, error) DeployUpkeepPerformCounterRestrictive(testRange *big.Int, averageEligibilityCadence *big.Int) (UpkeepPerformCounterRestrictive, error) DeployVRFConsumer(linkAddr string, coordinatorAddr string) (VRFConsumer, error) DeployVRFConsumerV2(linkAddr string, coordinatorAddr string) (VRFConsumerV2, error) DeployVRFCoordinator(linkAddr string, bhsAddr string) (VRFCoordinator, error) DeployVRFCoordinatorV2(linkAddr string, bhsAddr string, linkEthFeedAddr string) (VRFCoordinatorV2, error) DeployBlockhashStore() (BlockHashStore, error) }
ContractDeployer is an interface for abstracting the contract deployment methods across network implementations
func NewContractDeployer ¶
func NewContractDeployer(bcClient blockchain.EVMClient) (ContractDeployer, error)
NewContractDeployer returns an instance of a contract deployer based on the client type
type DeviationFlaggingValidator ¶
type DeviationFlaggingValidator interface {
Address() string
}
DeviationFlaggingValidator contract used as an external validator, fox ex. in flux monitor rounds validation
type EthereumAPIConsumer ¶
type EthereumAPIConsumer struct {
// contains filtered or unexported fields
}
EthereumAPIConsumer API consumer for job type "directrequest" tests
func (*EthereumAPIConsumer) Address ¶
func (e *EthereumAPIConsumer) Address() string
func (*EthereumAPIConsumer) CreateRequestTo ¶
func (e *EthereumAPIConsumer) CreateRequestTo( oracleAddr string, jobID [32]byte, payment *big.Int, url string, path string, times *big.Int, ) error
CreateRequestTo creates request to an oracle for particular jobID with params
func (*EthereumAPIConsumer) WatchPerfEvents ¶
func (e *EthereumAPIConsumer) WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error
type EthereumBlockhashStore ¶
type EthereumBlockhashStore struct {
// contains filtered or unexported fields
}
EthereumBlockhashStore represents a blockhash store for VRF contract
func (*EthereumBlockhashStore) Address ¶
func (v *EthereumBlockhashStore) Address() string
type EthereumContractDeployer ¶
type EthereumContractDeployer struct {
// contains filtered or unexported fields
}
EthereumContractDeployer provides the implementations for deploying ETH (EVM) based contracts
func NewEthereumContractDeployer ¶
func NewEthereumContractDeployer(ethClient blockchain.EVMClient) *EthereumContractDeployer
NewEthereumContractDeployer returns an instantiated instance of the ETH contract deployer
func (*EthereumContractDeployer) DeployAPIConsumer ¶
func (e *EthereumContractDeployer) DeployAPIConsumer(linkAddr string) (APIConsumer, error)
DeployAPIConsumer deploys api consumer for oracle
func (*EthereumContractDeployer) DeployBlockhashStore ¶
func (e *EthereumContractDeployer) DeployBlockhashStore() (BlockHashStore, error)
DeployBlockhashStore deploys blockhash store used with VRF contract
func (*EthereumContractDeployer) DeployDeviationFlaggingValidator ¶
func (e *EthereumContractDeployer) DeployDeviationFlaggingValidator( flags string, flaggingThreshold *big.Int, ) (DeviationFlaggingValidator, error)
DeployDeviationFlaggingValidator deploys deviation flagging validator contract
func (*EthereumContractDeployer) DeployFlags ¶
func (e *EthereumContractDeployer) DeployFlags( rac string, ) (Flags, error)
DeployFlags deploys flags contract
func (*EthereumContractDeployer) DeployFluxAggregatorContract ¶
func (e *EthereumContractDeployer) DeployFluxAggregatorContract( linkAddr string, fluxOptions FluxAggregatorOptions, ) (FluxAggregator, error)
DeployFluxAggregatorContract deploys the Flux Aggregator Contract on an EVM chain
func (*EthereumContractDeployer) DeployKeeperConsumer ¶
func (e *EthereumContractDeployer) DeployKeeperConsumer(updateInterval *big.Int) (KeeperConsumer, error)
func (*EthereumContractDeployer) DeployKeeperConsumerPerformance ¶
func (e *EthereumContractDeployer) DeployKeeperConsumerPerformance( testBlockRange, averageCadence, checkGasToBurn, performGasToBurn *big.Int, ) (KeeperConsumerPerformance, error)
func (*EthereumContractDeployer) DeployKeeperRegistry ¶
func (e *EthereumContractDeployer) DeployKeeperRegistry( opts *KeeperRegistryOpts, ) (KeeperRegistry, error)
func (*EthereumContractDeployer) DeployLinkTokenContract ¶
func (e *EthereumContractDeployer) DeployLinkTokenContract() (LinkToken, error)
DeployLinkTokenContract deploys a Link Token contract to an EVM chain
func (*EthereumContractDeployer) DeployMockETHLINKFeed ¶
func (e *EthereumContractDeployer) DeployMockETHLINKFeed(answer *big.Int) (MockETHLINKFeed, error)
func (*EthereumContractDeployer) DeployMockGasFeed ¶
func (e *EthereumContractDeployer) DeployMockGasFeed(answer *big.Int) (MockGasFeed, error)
func (*EthereumContractDeployer) DeployOffChainAggregator ¶
func (e *EthereumContractDeployer) DeployOffChainAggregator( linkAddr string, offchainOptions OffchainOptions, ) (OffchainAggregator, error)
DeployOffChainAggregator deploys the offchain aggregation contract to the EVM chain
func (*EthereumContractDeployer) DeployOracle ¶
func (e *EthereumContractDeployer) DeployOracle(linkAddr string) (Oracle, error)
DeployOracle deploys oracle for consumer test
func (*EthereumContractDeployer) DeployReadAccessController ¶
func (e *EthereumContractDeployer) DeployReadAccessController() (ReadAccessController, error)
DeployReadAccessController deploys read/write access controller contract
func (*EthereumContractDeployer) DeployStorageContract ¶
func (e *EthereumContractDeployer) DeployStorageContract() (Storage, error)
DeployStorageContract deploys a vanilla storage contract that is a value store
func (*EthereumContractDeployer) DeployUpkeepCounter ¶ added in v1.1.19
func (e *EthereumContractDeployer) DeployUpkeepCounter(testRange *big.Int, interval *big.Int) (UpkeepCounter, error)
func (*EthereumContractDeployer) DeployUpkeepPerformCounterRestrictive ¶ added in v1.1.20
func (e *EthereumContractDeployer) DeployUpkeepPerformCounterRestrictive(testRange *big.Int, averageEligibilityCadence *big.Int) (UpkeepPerformCounterRestrictive, error)
func (*EthereumContractDeployer) DeployUpkeepRegistrationRequests ¶
func (e *EthereumContractDeployer) DeployUpkeepRegistrationRequests(linkAddr string, minLinkJuels *big.Int) (UpkeepRegistrar, error)
func (*EthereumContractDeployer) DeployVRFConsumer ¶
func (e *EthereumContractDeployer) DeployVRFConsumer(linkAddr string, coordinatorAddr string) (VRFConsumer, error)
DeployVRFConsumer deploys VRF consumer contract
func (*EthereumContractDeployer) DeployVRFConsumerV2 ¶
func (e *EthereumContractDeployer) DeployVRFConsumerV2(linkAddr string, coordinatorAddr string) (VRFConsumerV2, error)
DeployVRFConsumerV2 deploys VRFv@ consumer contract
func (*EthereumContractDeployer) DeployVRFContract ¶
func (e *EthereumContractDeployer) DeployVRFContract() (VRF, error)
DeployVRFContract deploy VRF contract
func (*EthereumContractDeployer) DeployVRFCoordinator ¶
func (e *EthereumContractDeployer) DeployVRFCoordinator(linkAddr string, bhsAddr string) (VRFCoordinator, error)
DeployVRFCoordinator deploys VRF coordinator contract
func (*EthereumContractDeployer) DeployVRFCoordinatorV2 ¶
func (e *EthereumContractDeployer) DeployVRFCoordinatorV2(linkAddr string, bhsAddr string, linkEthFeedAddr string) (VRFCoordinatorV2, error)
DeployVRFCoordinatorV2 deploys VRFV2 coordinator contract
type EthereumDeviationFlaggingValidator ¶
type EthereumDeviationFlaggingValidator struct {
// contains filtered or unexported fields
}
EthereumDeviationFlaggingValidator represents deviation flagging validator contract
func (*EthereumDeviationFlaggingValidator) Address ¶
func (e *EthereumDeviationFlaggingValidator) Address() string
type EthereumFlags ¶
type EthereumFlags struct {
// contains filtered or unexported fields
}
EthereumFlags represents flags contract
func (*EthereumFlags) Address ¶
func (e *EthereumFlags) Address() string
type EthereumFluxAggregator ¶
type EthereumFluxAggregator struct {
// contains filtered or unexported fields
}
EthereumFluxAggregator represents the basic flux aggregation contract
func (*EthereumFluxAggregator) Address ¶
func (f *EthereumFluxAggregator) Address() string
func (*EthereumFluxAggregator) Description ¶
func (f *EthereumFluxAggregator) Description(ctxt context.Context) (string, error)
Description returns the description of the flux aggregator contract
func (*EthereumFluxAggregator) Fund ¶
func (f *EthereumFluxAggregator) Fund(ethAmount *big.Float) error
Fund sends specified currencies to the contract
func (*EthereumFluxAggregator) GetContractData ¶
func (f *EthereumFluxAggregator) GetContractData(ctx context.Context) (*FluxAggregatorData, error)
GetContractData retrieves basic data for the flux aggregator contract
func (*EthereumFluxAggregator) GetOracles ¶
func (f *EthereumFluxAggregator) GetOracles(ctx context.Context) ([]string, error)
func (*EthereumFluxAggregator) LatestRoundData ¶
func (f *EthereumFluxAggregator) LatestRoundData(ctx context.Context) (RoundData, error)
func (*EthereumFluxAggregator) LatestRoundID ¶
func (*EthereumFluxAggregator) PaymentAmount ¶
func (*EthereumFluxAggregator) RequestNewRound ¶
func (f *EthereumFluxAggregator) RequestNewRound(ctx context.Context) error
func (*EthereumFluxAggregator) SetOracles ¶
func (f *EthereumFluxAggregator) SetOracles(o FluxAggregatorSetOraclesOptions) error
SetOracles allows the ability to add and/or remove oracles from the contract, and to set admins
func (*EthereumFluxAggregator) SetRequesterPermissions ¶
func (*EthereumFluxAggregator) UpdateAvailableFunds ¶
func (f *EthereumFluxAggregator) UpdateAvailableFunds() error
func (*EthereumFluxAggregator) WatchSubmissionReceived ¶
func (f *EthereumFluxAggregator) WatchSubmissionReceived(ctx context.Context, eventChan chan<- *SubmissionEvent) error
WatchSubmissionReceived subscribes to any submissions on a flux feed
func (*EthereumFluxAggregator) WithdrawPayment ¶
func (*EthereumFluxAggregator) WithdrawablePayment ¶
type EthereumKeeperConsumer ¶
type EthereumKeeperConsumer struct {
// contains filtered or unexported fields
}
EthereumKeeperConsumer represents keeper consumer (upkeep) contract
func (*EthereumKeeperConsumer) Address ¶
func (v *EthereumKeeperConsumer) Address() string
type EthereumKeeperConsumerPerformance ¶
type EthereumKeeperConsumerPerformance struct {
// contains filtered or unexported fields
}
EthereumKeeperConsumerPerformance represents a more complicated keeper consumer contract, one intended only for performance tests.
func (*EthereumKeeperConsumerPerformance) Address ¶
func (v *EthereumKeeperConsumerPerformance) Address() string
func (*EthereumKeeperConsumerPerformance) CheckEligible ¶
func (v *EthereumKeeperConsumerPerformance) CheckEligible(ctx context.Context) (bool, error)
func (*EthereumKeeperConsumerPerformance) Fund ¶
func (v *EthereumKeeperConsumerPerformance) Fund(ethAmount *big.Float) error
func (*EthereumKeeperConsumerPerformance) GetUpkeepCount ¶
func (*EthereumKeeperConsumerPerformance) SetCheckGasToBurn ¶ added in v1.2.5
func (*EthereumKeeperConsumerPerformance) SetPerformGasToBurn ¶ added in v1.2.5
type EthereumKeeperRegistry ¶
type EthereumKeeperRegistry struct {
// contains filtered or unexported fields
}
EthereumKeeperRegistry represents keeper registry contract
func (*EthereumKeeperRegistry) AddUpkeepFunds ¶
AddUpkeepFunds adds link for particular upkeep id
func (*EthereumKeeperRegistry) Address ¶
func (v *EthereumKeeperRegistry) Address() string
func (*EthereumKeeperRegistry) CancelUpkeep ¶ added in v1.2.0
func (v *EthereumKeeperRegistry) CancelUpkeep(id *big.Int) error
CancelUpkeep cancels the given upkeep ID
func (*EthereumKeeperRegistry) Fund ¶
func (v *EthereumKeeperRegistry) Fund(ethAmount *big.Float) error
func (*EthereumKeeperRegistry) GetKeeperInfo ¶
func (v *EthereumKeeperRegistry) GetKeeperInfo(ctx context.Context, keeperAddr string) (*KeeperInfo, error)
func (*EthereumKeeperRegistry) GetKeeperList ¶
func (v *EthereumKeeperRegistry) GetKeeperList(ctx context.Context) ([]string, error)
GetKeeperList get list of all registered keeper addresses
func (*EthereumKeeperRegistry) GetUpkeepInfo ¶
func (v *EthereumKeeperRegistry) GetUpkeepInfo(ctx context.Context, id *big.Int) (*UpkeepInfo, error)
GetUpkeepInfo gets upkeep info
func (*EthereumKeeperRegistry) ParseUpkeepIdFromRegisteredLog ¶ added in v1.2.4
Parses the upkeep ID from an 'UpkeepRegistered' log, returns error on any other log
func (*EthereumKeeperRegistry) RegisterUpkeep ¶
func (v *EthereumKeeperRegistry) RegisterUpkeep(target string, gasLimit uint32, admin string, checkData []byte) error
RegisterUpkeep registers contract to perform upkeep
func (*EthereumKeeperRegistry) SetConfig ¶ added in v1.2.4
func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings) error
func (*EthereumKeeperRegistry) SetKeepers ¶
func (v *EthereumKeeperRegistry) SetKeepers(keepers []string, payees []string) error
func (*EthereumKeeperRegistry) SetRegistrar ¶
func (v *EthereumKeeperRegistry) SetRegistrar(registrarAddr string) error
func (*EthereumKeeperRegistry) SetUpkeepGasLimit ¶ added in v1.2.5
func (v *EthereumKeeperRegistry) SetUpkeepGasLimit(id *big.Int, gas uint32) error
SetUpkeepGasLimit sets the perform gas limit for a given upkeep ID
type EthereumLinkToken ¶
type EthereumLinkToken struct {
// contains filtered or unexported fields
}
EthereumLinkToken represents a LinkToken address
func (*EthereumLinkToken) Address ¶
func (l *EthereumLinkToken) Address() string
func (*EthereumLinkToken) Approve ¶
func (l *EthereumLinkToken) Approve(to string, amount *big.Int) error
func (*EthereumLinkToken) Fund ¶
func (l *EthereumLinkToken) Fund(ethAmount *big.Float) error
Fund the LINK Token contract with ETH to distribute the token
func (*EthereumLinkToken) Name ¶
func (l *EthereumLinkToken) Name(ctxt context.Context) (string, error)
Name returns the name of the link token
func (*EthereumLinkToken) Transfer ¶
func (l *EthereumLinkToken) Transfer(to string, amount *big.Int) error
func (*EthereumLinkToken) TransferAndCall ¶
func (l *EthereumLinkToken) TransferAndCall(to string, amount *big.Int, data []byte) (*types.Transaction, error)
type EthereumMockETHLINKFeed ¶
type EthereumMockETHLINKFeed struct {
// contains filtered or unexported fields
}
EthereumMockETHLINKFeed represents mocked ETH/LINK feed contract
func (*EthereumMockETHLINKFeed) Address ¶
func (v *EthereumMockETHLINKFeed) Address() string
func (*EthereumMockETHLINKFeed) LatestRoundData ¶
func (v *EthereumMockETHLINKFeed) LatestRoundData() (*big.Int, error)
type EthereumMockGASFeed ¶
type EthereumMockGASFeed struct {
// contains filtered or unexported fields
}
EthereumMockGASFeed represents mocked Gas feed contract
func (*EthereumMockGASFeed) Address ¶
func (v *EthereumMockGASFeed) Address() string
type EthereumOffchainAggregator ¶
type EthereumOffchainAggregator struct {
// contains filtered or unexported fields
}
EthereumOffchainAggregator represents the offchain aggregation contract
func (*EthereumOffchainAggregator) Address ¶
func (o *EthereumOffchainAggregator) Address() string
func (*EthereumOffchainAggregator) Fund ¶
func (o *EthereumOffchainAggregator) Fund(ethAmount *big.Float) error
Fund sends specified currencies to the contract
func (*EthereumOffchainAggregator) GetContractData ¶
func (o *EthereumOffchainAggregator) GetContractData(ctxt context.Context) (*OffchainAggregatorData, error)
GetContractData retrieves basic data for the offchain aggregator contract
func (*EthereumOffchainAggregator) GetLatestAnswer ¶
GetLatestAnswer returns the latest answer from the OCR contract
func (*EthereumOffchainAggregator) GetLatestRound ¶
func (o *EthereumOffchainAggregator) GetLatestRound(ctxt context.Context) (*RoundData, error)
GetLatestRound returns data from the latest round
func (*EthereumOffchainAggregator) RequestNewRound ¶
func (o *EthereumOffchainAggregator) RequestNewRound() error
RequestNewRound requests the OCR contract to create a new round
func (*EthereumOffchainAggregator) SetConfig ¶
func (o *EthereumOffchainAggregator) SetConfig( chainlinkNodes []client.Chainlink, ocrConfig OffChainAggregatorConfig, ) error
SetConfig sets the payees and the offchain reporting protocol configuration
func (*EthereumOffchainAggregator) SetPayees ¶
func (o *EthereumOffchainAggregator) SetPayees( transmitters, payees []string, ) error
SetPayees sets wallets for the contract to pay out to?
type EthereumOracle ¶
type EthereumOracle struct {
// contains filtered or unexported fields
}
EthereumOracle oracle for "directrequest" job tests
func (*EthereumOracle) Address ¶
func (e *EthereumOracle) Address() string
func (*EthereumOracle) SetFulfillmentPermission ¶
func (e *EthereumOracle) SetFulfillmentPermission(address string, allowed bool) error
SetFulfillmentPermission sets fulfillment permission for particular address
type EthereumReadAccessController ¶
type EthereumReadAccessController struct {
// contains filtered or unexported fields
}
EthereumReadAccessController represents read access controller contract
func (*EthereumReadAccessController) AddAccess ¶
func (e *EthereumReadAccessController) AddAccess(addr string) error
AddAccess grants access to particular address to raise a flag
func (*EthereumReadAccessController) Address ¶
func (e *EthereumReadAccessController) Address() string
func (*EthereumReadAccessController) DisableAccessCheck ¶
func (e *EthereumReadAccessController) DisableAccessCheck() error
DisableAccessCheck disables all access checks
type EthereumStorage ¶
type EthereumStorage struct {
// contains filtered or unexported fields
}
EthereumStorage acts as a conduit for the ethereum version of the storage contract
type EthereumUpkeepCounter ¶ added in v1.1.19
type EthereumUpkeepCounter struct {
// contains filtered or unexported fields
}
EthereumUpkeepCounter represents keeper consumer (upkeep) counter contract
func (*EthereumUpkeepCounter) Address ¶ added in v1.1.19
func (v *EthereumUpkeepCounter) Address() string
type EthereumUpkeepPerformCounterRestrictive ¶ added in v1.1.20
type EthereumUpkeepPerformCounterRestrictive struct {
// contains filtered or unexported fields
}
EthereumUpkeepPerformCounterRestrictive represents keeper consumer (upkeep) counter contract
func (*EthereumUpkeepPerformCounterRestrictive) Address ¶ added in v1.1.20
func (v *EthereumUpkeepPerformCounterRestrictive) Address() string
type EthereumUpkeepRegistrationRequests ¶
type EthereumUpkeepRegistrationRequests struct {
// contains filtered or unexported fields
}
EthereumUpkeepRegistrationRequests keeper contract to register upkeeps
func (*EthereumUpkeepRegistrationRequests) Address ¶
func (v *EthereumUpkeepRegistrationRequests) Address() string
func (*EthereumUpkeepRegistrationRequests) EncodeRegisterRequest ¶
func (v *EthereumUpkeepRegistrationRequests) EncodeRegisterRequest( name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, ) ([]byte, error)
EncodeRegisterRequest encodes register request to call it through link token TransferAndCall
func (*EthereumUpkeepRegistrationRequests) Fund ¶
func (v *EthereumUpkeepRegistrationRequests) Fund(ethAmount *big.Float) error
func (*EthereumUpkeepRegistrationRequests) SetRegistrarConfig ¶
func (v *EthereumUpkeepRegistrationRequests) SetRegistrarConfig( autoRegister bool, windowSizeBlocks uint32, allowedPerWindow uint16, registryAddr string, minLinkJuels *big.Int, ) error
SetRegistrarConfig sets registrar config, allowing auto register or pending requests for manual registration
type EthereumVRF ¶
type EthereumVRF struct {
// contains filtered or unexported fields
}
EthereumVRF represents a VRF contract
func (*EthereumVRF) Fund ¶
func (v *EthereumVRF) Fund(ethAmount *big.Float) error
Fund sends specified currencies to the contract
func (*EthereumVRF) ProofLength ¶
ProofLength returns the PROOFLENGTH call from the VRF contract
type EthereumVRFConsumer ¶
type EthereumVRFConsumer struct {
// contains filtered or unexported fields
}
EthereumVRFConsumer represents VRF consumer contract
func (*EthereumVRFConsumer) Address ¶
func (v *EthereumVRFConsumer) Address() string
func (*EthereumVRFConsumer) CurrentRoundID ¶
CurrentRoundID helper roundID counter in consumer to check when all randomness requests are finished
func (*EthereumVRFConsumer) RandomnessOutput ¶
RandomnessOutput get VRF randomness output
func (*EthereumVRFConsumer) RequestRandomness ¶
func (v *EthereumVRFConsumer) RequestRandomness(hash [32]byte, fee *big.Int) error
RequestRandomness requests VRF randomness
func (*EthereumVRFConsumer) WatchPerfEvents ¶
func (v *EthereumVRFConsumer) WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error
type EthereumVRFConsumerV2 ¶
type EthereumVRFConsumerV2 struct {
// contains filtered or unexported fields
}
EthereumVRFConsumerV2 represents VRFv2 consumer contract
func (*EthereumVRFConsumerV2) Address ¶
func (v *EthereumVRFConsumerV2) Address() string
func (*EthereumVRFConsumerV2) CreateFundedSubscription ¶
func (v *EthereumVRFConsumerV2) CreateFundedSubscription(funds *big.Int) error
CreateFundedSubscription create funded subscription for VRFv2 randomness
func (*EthereumVRFConsumerV2) CurrentSubscription ¶
func (v *EthereumVRFConsumerV2) CurrentSubscription() (uint64, error)
CurrentSubscription get current VRFv2 subscription
func (*EthereumVRFConsumerV2) Fund ¶
func (v *EthereumVRFConsumerV2) Fund(ethAmount *big.Float) error
func (*EthereumVRFConsumerV2) GasAvailable ¶
func (v *EthereumVRFConsumerV2) GasAvailable() (*big.Int, error)
GasAvailable get available gas after randomness fulfilled
func (*EthereumVRFConsumerV2) GetAllRandomWords ¶
GetAllRandomWords get all VRFv2 randomness output words
func (*EthereumVRFConsumerV2) RandomnessOutput ¶
func (v *EthereumVRFConsumerV2) RandomnessOutput(ctx context.Context, arg0 *big.Int) (*big.Int, error)
RandomnessOutput get VRFv2 randomness output (word)
func (*EthereumVRFConsumerV2) RequestRandomness ¶
func (v *EthereumVRFConsumerV2) RequestRandomness(hash [32]byte, subID uint64, confs uint16, gasLimit uint32, numWords uint32) error
RequestRandomness request VRFv2 random words
func (*EthereumVRFConsumerV2) TopUpSubscriptionFunds ¶
func (v *EthereumVRFConsumerV2) TopUpSubscriptionFunds(funds *big.Int) error
TopUpSubscriptionFunds add funds to a VRFv2 subscription
type EthereumVRFCoordinator ¶
type EthereumVRFCoordinator struct {
// contains filtered or unexported fields
}
EthereumVRFCoordinator represents VRF coordinator contract
func (*EthereumVRFCoordinator) Address ¶
func (v *EthereumVRFCoordinator) Address() string
func (*EthereumVRFCoordinator) HashOfKey ¶
func (v *EthereumVRFCoordinator) HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error)
HashOfKey get a hash of proving key to use it as a request ID part for VRF
func (*EthereumVRFCoordinator) RegisterProvingKey ¶
func (v *EthereumVRFCoordinator) RegisterProvingKey( fee *big.Int, oracleAddr string, publicProvingKey [2]*big.Int, jobID [32]byte, ) error
RegisterProvingKey register VRF proving key
type EthereumVRFCoordinatorV2 ¶
type EthereumVRFCoordinatorV2 struct {
// contains filtered or unexported fields
}
EthereumVRFCoordinatorV2 represents VRFV2 coordinator contract
func (*EthereumVRFCoordinatorV2) Address ¶
func (v *EthereumVRFCoordinatorV2) Address() string
func (*EthereumVRFCoordinatorV2) RegisterProvingKey ¶
func (v *EthereumVRFCoordinatorV2) RegisterProvingKey( oracleAddr string, publicProvingKey [2]*big.Int, ) error
type FluxAggregator ¶
type FluxAggregator interface { Address() string Fund(ethAmount *big.Float) error LatestRoundID(ctx context.Context) (*big.Int, error) LatestRoundData(ctx context.Context) (RoundData, error) GetContractData(ctxt context.Context) (*FluxAggregatorData, error) UpdateAvailableFunds() error PaymentAmount(ctx context.Context) (*big.Int, error) RequestNewRound(ctx context.Context) error WithdrawPayment(ctx context.Context, from common.Address, to common.Address, amount *big.Int) error WithdrawablePayment(ctx context.Context, addr common.Address) (*big.Int, error) GetOracles(ctx context.Context) ([]string, error) SetOracles(opts FluxAggregatorSetOraclesOptions) error Description(ctxt context.Context) (string, error) SetRequesterPermissions(ctx context.Context, addr common.Address, authorized bool, roundsDelay uint32) error WatchSubmissionReceived(ctx context.Context, eventChan chan<- *SubmissionEvent) error }
type FluxAggregatorData ¶
type FluxAggregatorData struct { AllocatedFunds *big.Int // The amount of payment yet to be withdrawn by oracles AvailableFunds *big.Int // The amount of future funding available to oracles LatestRoundData RoundData // Data about the latest round Oracles []common.Address // Addresses of oracles on the contract }
type FluxAggregatorOptions ¶
type FluxAggregatorOptions struct { PaymentAmount *big.Int // The amount of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK) Timeout uint32 // The number of seconds after the previous round that are allowed to lapse before allowing an oracle to skip an unfinished round Validator common.Address // An optional contract address for validating external validation of answers MinSubValue *big.Int // An immutable check for a lower bound of what submission values are accepted from an oracle MaxSubValue *big.Int // An immutable check for an upper bound of what submission values are accepted from an oracle Decimals uint8 // The number of decimals to offset the answer by Description string // A short description of what is being reported }
func DefaultFluxAggregatorOptions ¶
func DefaultFluxAggregatorOptions() FluxAggregatorOptions
DefaultFluxAggregatorOptions produces some basic defaults for a flux aggregator contract
type FluxAggregatorRoundConfirmer ¶
type FluxAggregatorRoundConfirmer struct {
// contains filtered or unexported fields
}
FluxAggregatorRoundConfirmer is a header subscription that awaits for a certain flux round to be completed
func NewFluxAggregatorRoundConfirmer ¶
func NewFluxAggregatorRoundConfirmer( contract FluxAggregator, roundID *big.Int, timeout time.Duration, ) *FluxAggregatorRoundConfirmer
NewFluxAggregatorRoundConfirmer provides a new instance of a FluxAggregatorRoundConfirmer
func (*FluxAggregatorRoundConfirmer) ReceiveBlock ¶
func (f *FluxAggregatorRoundConfirmer) ReceiveBlock(block blockchain.NodeBlock) error
ReceiveBlock will query the latest FluxAggregator round and check to see whether the round has confirmed
func (*FluxAggregatorRoundConfirmer) Wait ¶
func (f *FluxAggregatorRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type FluxAggregatorSetOraclesOptions ¶
type FluxAggregatorSetOraclesOptions struct { AddList []common.Address // oracle addresses to add RemoveList []common.Address // oracle addresses to remove AdminList []common.Address // oracle addresses to become admin MinSubmissions uint32 // min amount of submissions in round MaxSubmissions uint32 // max amount of submissions in round RestartDelayRounds uint32 // rounds to wait after oracles has changed }
type JobByInstance ¶
JobByInstance helper struct to match job + instance ID
type KeeperConsumer ¶
type KeeperConsumerPerformance ¶
type KeeperConsumerPerformance interface { Address() string Fund(ethAmount *big.Float) error CheckEligible(ctx context.Context) (bool, error) GetUpkeepCount(ctx context.Context) (*big.Int, error) SetCheckGasToBurn(ctx context.Context, gas *big.Int) error SetPerformGasToBurn(ctx context.Context, gas *big.Int) error }
KeeperConsumerPerformance is a keeper consumer contract that is more complicated than the typical consumer, it's intended to only be used for performance tests.
type KeeperConsumerPerformanceRoundConfirmer ¶
type KeeperConsumerPerformanceRoundConfirmer struct {
// contains filtered or unexported fields
}
KeeperConsumerPerformanceRoundConfirmer is a header subscription that awaits for a round of upkeeps
func NewKeeperConsumerPerformanceRoundConfirmer ¶
func NewKeeperConsumerPerformanceRoundConfirmer( contract KeeperConsumerPerformance, expectedBlockCadence int64, blockRange int64, metricsReporter *testreporters.KeeperBlockTimeTestReporter, ) *KeeperConsumerPerformanceRoundConfirmer
NewKeeperConsumerPerformanceRoundConfirmer provides a new instance of a KeeperConsumerPerformanceRoundConfirmer Used to track and log performance test results for keepers
func (*KeeperConsumerPerformanceRoundConfirmer) ReceiveBlock ¶
func (o *KeeperConsumerPerformanceRoundConfirmer) ReceiveBlock(receivedBlock blockchain.NodeBlock) error
ReceiveBlock will query the latest Keeper round and check to see whether the round has confirmed
func (*KeeperConsumerPerformanceRoundConfirmer) Wait ¶
func (o *KeeperConsumerPerformanceRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type KeeperConsumerRoundConfirmer ¶
type KeeperConsumerRoundConfirmer struct {
// contains filtered or unexported fields
}
KeeperConsumerRoundConfirmer is a header subscription that awaits for a round of upkeeps
func NewKeeperConsumerRoundConfirmer ¶
func NewKeeperConsumerRoundConfirmer( contract KeeperConsumer, counterValue int, timeout time.Duration, ) *KeeperConsumerRoundConfirmer
NewKeeperConsumerRoundConfirmer provides a new instance of a KeeperConsumerRoundConfirmer
func (*KeeperConsumerRoundConfirmer) ReceiveBlock ¶
func (o *KeeperConsumerRoundConfirmer) ReceiveBlock(_ blockchain.NodeBlock) error
ReceiveBlock will query the latest Keeper round and check to see whether the round has confirmed
func (*KeeperConsumerRoundConfirmer) Wait ¶
func (o *KeeperConsumerRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type KeeperInfo ¶
KeeperInfo keeper status and balance info
type KeeperRegistrarSettings ¶ added in v1.1.20
type KeeperRegistrarSettings struct { AutoRegister bool WindowSizeBlocks uint32 AllowedPerWindow uint16 RegistryAddr string MinLinkJuels *big.Int }
KeeperRegistrarSettings represents settings for registrar contract
type KeeperRegistry ¶
type KeeperRegistry interface { Address() string Fund(ethAmount *big.Float) error SetConfig(config KeeperRegistrySettings) error SetRegistrar(registrarAddr string) error AddUpkeepFunds(id *big.Int, amount *big.Int) error GetUpkeepInfo(ctx context.Context, id *big.Int) (*UpkeepInfo, error) GetKeeperInfo(ctx context.Context, keeperAddr string) (*KeeperInfo, error) SetKeepers(keepers []string, payees []string) error GetKeeperList(ctx context.Context) ([]string, error) RegisterUpkeep(target string, gasLimit uint32, admin string, checkData []byte) error CancelUpkeep(id *big.Int) error SetUpkeepGasLimit(id *big.Int, gas uint32) error ParseUpkeepIdFromRegisteredLog(log *types.Log) (*big.Int, error) }
type KeeperRegistryOpts ¶
type KeeperRegistryOpts struct { RegistryVersion ethereum.KeeperRegistryVersion LinkAddr string ETHFeedAddr string GasFeedAddr string TranscoderAddr string RegistrarAddr string Settings KeeperRegistrySettings }
KeeperRegistryOpts opts to deploy keeper registry version
type KeeperRegistrySettings ¶
type KeeperRegistrySettings struct { PaymentPremiumPPB uint32 // payment premium rate oracles receive on top of being reimbursed for gas, measured in parts per billion FlatFeeMicroLINK uint32 // flat fee charged for each upkeep BlockCountPerTurn *big.Int // number of blocks each oracle has during their turn to perform upkeep before it will be the next keeper's turn to submit CheckGasLimit uint32 // gas limit when checking for upkeep StalenessSeconds *big.Int // number of seconds that is allowed for feed data to be stale before switching to the fallback pricing GasCeilingMultiplier uint16 // multiplier to apply to the fast gas feed price when calculating the payment ceiling for keepers MinUpkeepSpend *big.Int // minimum spend required by an upkeep before they can withdraw funds MaxPerformGas uint32 // max gas allowed for an upkeep within perform FallbackGasPrice *big.Int // gas price used if the gas price feed is stale FallbackLinkPrice *big.Int // LINK price used if the LINK price feed is stale }
KeeperRegistrySettings represents the settins to fine tune keeper registry
type KlaytnContractDeployer ¶
type KlaytnContractDeployer struct {
*EthereumContractDeployer
}
KlaytnContractDeployer wraps ethereum contract deployments for Klaytn
type LinkToken ¶
type LinkToken interface { Address() string Approve(to string, amount *big.Int) error Transfer(to string, amount *big.Int) error BalanceOf(ctx context.Context, addr string) (*big.Int, error) TransferAndCall(to string, amount *big.Int, data []byte) (*types.Transaction, error) Name(context.Context) (string, error) }
type MetisContractDeployer ¶
type MetisContractDeployer struct {
*EthereumContractDeployer
}
MetisContractDeployer wraps ethereum contract deployments for Metis
type MockETHLINKFeed ¶
type MockGasFeed ¶
type MockGasFeed interface {
Address() string
}
type OffChainAggregatorConfig ¶
type OffChainAggregatorConfig struct { DeltaProgress time.Duration // The duration in which a leader must achieve progress or be replaced DeltaResend time.Duration // The interval at which nodes resend NEWEPOCH messages DeltaRound time.Duration // The duration after which a new round is started DeltaGrace time.Duration // The duration of the grace period during which delayed oracles can still submit observations DeltaC time.Duration // Limits how often updates are transmitted to the contract as long as the median isn’t changing by more then AlphaPPB AlphaPPB uint64 // Allows larger changes of the median to be reported immediately, bypassing DeltaC DeltaStage time.Duration // Used to stagger stages of the transmission protocol. Multiple Ethereum blocks must be mineable in this period RMax uint8 // The maximum number of rounds in an epoch S []int // Transmission Schedule F int // The allowed number of "bad" oracles N int // The number of oracles OracleIdentities []ocrConfigHelper.OracleIdentityExtra }
func DefaultOffChainAggregatorConfig ¶
func DefaultOffChainAggregatorConfig(numberNodes int) OffChainAggregatorConfig
DefaultOffChainAggregatorConfig returns some base defaults for configuring an OCR contract
type OffChainAggregatorV2Config ¶
type OffChainAggregatorV2Config struct { DeltaProgress time.Duration DeltaResend time.Duration DeltaRound time.Duration DeltaGrace time.Duration DeltaStage time.Duration RMax uint8 S []int Oracles []ocrConfigHelper2.OracleIdentityExtra ReportingPluginConfig []byte MaxDurationQuery time.Duration MaxDurationObservation time.Duration MaxDurationReport time.Duration MaxDurationShouldAcceptFinalizedReport time.Duration MaxDurationShouldTransmitAcceptedReport time.Duration F int OnchainConfig []byte }
type OffchainAggregator ¶
type OffchainAggregator interface { Address() string Fund(nativeAmount *big.Float) error GetContractData(ctxt context.Context) (*OffchainAggregatorData, error) SetConfig(chainlinkNodes []client.Chainlink, ocrConfig OffChainAggregatorConfig) error SetPayees([]string, []string) error RequestNewRound() error GetLatestAnswer(ctxt context.Context) (*big.Int, error) GetLatestRound(ctxt context.Context) (*RoundData, error) }
type OffchainAggregatorData ¶
type OffchainAggregatorData struct {
LatestRoundData RoundData // Data about the latest round
}
type OffchainAggregatorRoundConfirmer ¶
type OffchainAggregatorRoundConfirmer struct {
// contains filtered or unexported fields
}
OffchainAggregatorRoundConfirmer is a header subscription that awaits for a certain OCR round to be completed
func NewOffchainAggregatorRoundConfirmer ¶
func NewOffchainAggregatorRoundConfirmer( contract OffchainAggregator, roundID *big.Int, timeout time.Duration, optionalTestReport *testreporters.OCRSoakTestReport, ) *OffchainAggregatorRoundConfirmer
NewOffchainAggregatorRoundConfirmer provides a new instance of a OffchainAggregatorRoundConfirmer
func (*OffchainAggregatorRoundConfirmer) ReceiveBlock ¶
func (o *OffchainAggregatorRoundConfirmer) ReceiveBlock(_ blockchain.NodeBlock) error
ReceiveBlock will query the latest OffchainAggregator round and check to see whether the round has confirmed
func (*OffchainAggregatorRoundConfirmer) Wait ¶
func (o *OffchainAggregatorRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type OffchainOptions ¶
type OffchainOptions struct { MaximumGasPrice uint32 // The highest gas price for which transmitter will be compensated ReasonableGasPrice uint32 // The transmitter will receive reward for gas prices under this value MicroLinkPerEth uint32 // The reimbursement per ETH of gas cost, in 1e-6LINK units LinkGweiPerObservation uint32 // The reward to the oracle for contributing an observation to a successfully transmitted report, in 1e-9LINK units LinkGweiPerTransmission uint32 // The reward to the transmitter of a successful report, in 1e-9LINK units MinimumAnswer *big.Int // The lowest answer the median of a report is allowed to be MaximumAnswer *big.Int // The highest answer the median of a report is allowed to be BillingAccessController common.Address // The access controller for billing admin functions RequesterAccessController common.Address // The access controller for requesting new rounds Decimals uint8 // Answers are stored in fixed-point format, with this many digits of precision Description string // A short description of what is being reported }
func DefaultOffChainAggregatorOptions ¶
func DefaultOffChainAggregatorOptions() OffchainOptions
DefaultOffChainAggregatorOptions returns some base defaults for deploying an OCR contract
type PerfEvent ¶
type PerfEvent struct { Contract DeviationFlaggingValidator Round *big.Int RequestID [32]byte BlockTimestamp *big.Int }
PerfEvent is used to get some metrics for contracts, it contrains roundID for Keeper/OCR/Flux tests and request id for VRF/Runlog
type ReadAccessController ¶
type ReadAccessController interface { Address() string AddAccess(addr string) error DisableAccessCheck() error }
ReadAccessController is read/write access controller, just named by interface
type RunlogRoundConfirmer ¶
type RunlogRoundConfirmer struct {
// contains filtered or unexported fields
}
RunlogRoundConfirmer is a header subscription that awaits for a certain Runlog round to be completed
func NewRunlogRoundConfirmer ¶
func NewRunlogRoundConfirmer( contract APIConsumer, roundID *big.Int, timeout time.Duration, ) *RunlogRoundConfirmer
NewRunlogRoundConfirmer provides a new instance of a RunlogRoundConfirmer
func (*RunlogRoundConfirmer) ReceiveBlock ¶
func (o *RunlogRoundConfirmer) ReceiveBlock(_ blockchain.NodeBlock) error
ReceiveBlock will query the latest Runlog round and check to see whether the round has confirmed
func (*RunlogRoundConfirmer) Wait ¶
func (o *RunlogRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type SubmissionEvent ¶
type UpkeepCounter ¶ added in v1.1.19
type UpkeepInfo ¶
type UpkeepInfo struct { Target string ExecuteGas uint32 CheckData []byte Balance *big.Int LastKeeper string Admin string MaxValidBlocknumber uint64 }
UpkeepInfo keeper target info
type UpkeepPerformCounterRestrictive ¶ added in v1.1.20
type UpkeepRegistrar ¶
type UpkeepRegistrar interface { Address() string SetRegistrarConfig( autoRegister bool, windowSizeBlocks uint32, allowedPerWindow uint16, registryAddr string, minLinkJuels *big.Int, ) error EncodeRegisterRequest( name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, ) ([]byte, error) Fund(ethAmount *big.Float) error }
type VRFConsumer ¶
type VRFConsumer interface { Address() string RequestRandomness(hash [32]byte, fee *big.Int) error CurrentRoundID(ctx context.Context) (*big.Int, error) RandomnessOutput(ctx context.Context) (*big.Int, error) WatchPerfEvents(ctx context.Context, eventChan chan<- *PerfEvent) error Fund(ethAmount *big.Float) error }
type VRFConsumerRoundConfirmer ¶
type VRFConsumerRoundConfirmer struct {
// contains filtered or unexported fields
}
VRFConsumerRoundConfirmer is a header subscription that awaits for a certain VRF round to be completed
func NewVRFConsumerRoundConfirmer ¶
func NewVRFConsumerRoundConfirmer( contract VRFConsumer, roundID *big.Int, timeout time.Duration, ) *VRFConsumerRoundConfirmer
NewVRFConsumerRoundConfirmer provides a new instance of a NewVRFConsumerRoundConfirmer
func (*VRFConsumerRoundConfirmer) ReceiveBlock ¶
func (f *VRFConsumerRoundConfirmer) ReceiveBlock(block blockchain.NodeBlock) error
ReceiveBlock will query the latest VRFConsumer round and check to see whether the round has confirmed
func (*VRFConsumerRoundConfirmer) Wait ¶
func (f *VRFConsumerRoundConfirmer) Wait() error
Wait is a blocking function that will wait until the round has confirmed, and timeout if the deadline has passed
type VRFConsumerV2 ¶
type VRFConsumerV2 interface { Address() string CurrentSubscription() (uint64, error) CreateFundedSubscription(funds *big.Int) error TopUpSubscriptionFunds(funds *big.Int) error RequestRandomness(hash [32]byte, subID uint64, confs uint16, gasLimit uint32, numWords uint32) error RandomnessOutput(ctx context.Context, arg0 *big.Int) (*big.Int, error) GetAllRandomWords(ctx context.Context, num int) ([]*big.Int, error) GasAvailable() (*big.Int, error) Fund(ethAmount *big.Float) error }
type VRFCoordinator ¶
type VRFCoordinatorV2 ¶
type VRFCoordinatorV2 interface { SetConfig( minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig ethereum.VRFCoordinatorV2FeeConfig, ) error RegisterProvingKey( oracleAddr string, publicProvingKey [2]*big.Int, ) error HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error) Address() string }