Documentation ¶
Overview ¶
Package actions enables common chainlink interactions
Index ¶
- Constants
- func BuildNodeContractPairID(node client.Chainlink, ocrInstance contracts.OffchainAggregator) string
- func ChainlinkNodeAddresses(nodes []client.Chainlink) ([]common.Address, error)
- func CreateEVMChainAndNode(chainID int, chainName string, httpURL string, wsURL string, ...) error
- func CreateKeeperJobs(chainlinkNodes []client.Chainlink, keeperRegistry contracts.KeeperRegistry)
- func CreateOCRJobs(ocrInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink, ...) func()
- func CreateOracleIdentities(nkb []NodeKeysBundle) ([]confighelper.OracleIdentityExtra, error)
- func DeployKeeperContracts(numberOfContracts int, linkToken contracts.LinkToken, ...) (contracts.KeeperRegistry, []contracts.KeeperConsumer)
- func DeployOCRContracts(numberOfContracts int, linkTokenContract contracts.LinkToken, ...) []contracts.OffchainAggregator
- func DeployPerformanceKeeperContracts(numberOfContracts int, linkToken contracts.LinkToken, ...) (contracts.KeeperRegistry, []contracts.KeeperConsumerPerformance)
- func EncodeOnChainExternalJobID(jobID uuid.UUID) [32]byte
- func EncodeOnChainVRFProvingKey(vrfKey client.VRFKey) ([2]*big.Int, error)
- func ExtractRequestIDFromJobRun(jobDecodeData client.RunsResponseData) ([]byte, error)
- func FundAddresses(blockchain client.BlockchainClient, amount *big.Float, addresses ...string) error
- func FundChainlinkNodes(nodes []client.Chainlink, blockchain client.BlockchainClient, ...) error
- func FundChainlinkNodesLink(nodes []client.Chainlink, blockchain client.BlockchainClient, ...) error
- func GetMockserverInitializerDataForOTPE(OCRInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink) (interface{}, error)
- func GinkgoSuite(frameworkConfigFileLocation string)
- func LoadConfigs(frameworkConfigFileLocation string)
- func OffChainConfigParamsFromNodes(nodes []client.Chainlink, nkb []NodeKeysBundle) (contracts.OffChainAggregatorV2Config, error)
- func SetAdapterResponse(response int, ocrInstance contracts.OffchainAggregator, ...) func()
- func SetAllAdapterResponsesToDifferentValues(responses []int, ocrInstances []contracts.OffchainAggregator, ...) func()
- func SetAllAdapterResponsesToTheSameValue(response int, ocrInstances []contracts.OffchainAggregator, ...) func()
- func SetChainlinkAPIPageSize(nodes []client.Chainlink, pageSize int)
- func StartNewRound(roundNr int64, ocrInstances []contracts.OffchainAggregator, ...) func()
- func StripOCR2KeyPrefixes(key string) string
- func StripP2PIDPrefix(key string) string
- func TeardownRemoteSuite(env *environment.Environment, nets *client.Networks, ...) error
- func TeardownSuite(env *environment.Environment, nets *client.Networks, logsFolderPath string, ...) error
- type NodeKeysBundle
Constants ¶
const ( // DefaultArtifactsDir default artifacts dir DefaultArtifactsDir string = "logs" )
Variables ¶
This section is empty.
Functions ¶
func BuildNodeContractPairID ¶ added in v1.0.33
func BuildNodeContractPairID(node client.Chainlink, ocrInstance contracts.OffchainAggregator) string
func ChainlinkNodeAddresses ¶
ChainlinkNodeAddresses will return all the on-chain wallet addresses for a set of Chainlink nodes
func CreateEVMChainAndNode ¶ added in v1.1.15
func CreateKeeperJobs ¶ added in v1.0.54
func CreateKeeperJobs(chainlinkNodes []client.Chainlink, keeperRegistry contracts.KeeperRegistry)
func CreateOCRJobs ¶ added in v0.0.17
func CreateOCRJobs( ocrInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink, mockserver *client.MockserverClient, ) func()
CreateOCRJobs bootstraps the first node and to the other nodes sends ocr jobs that read from different adapters, to be used in combination with SetAdapterResponses
func CreateOracleIdentities ¶ added in v1.1.17
func CreateOracleIdentities(nkb []NodeKeysBundle) ([]confighelper.OracleIdentityExtra, error)
func DeployKeeperContracts ¶ added in v1.0.54
func DeployKeeperContracts( numberOfContracts int, linkToken contracts.LinkToken, contractDeployer contracts.ContractDeployer, chainlinkNodes []client.Chainlink, networks *client.Networks, ) (contracts.KeeperRegistry, []contracts.KeeperConsumer)
DeployKeeperContracts deploys a number of basic keeper contracts with an update interval of 5
func DeployOCRContracts ¶ added in v0.0.17
func DeployOCRContracts( numberOfContracts int, linkTokenContract contracts.LinkToken, contractDeployer contracts.ContractDeployer, chainlinkNodes []client.Chainlink, networks *client.Networks, ) []contracts.OffchainAggregator
DeployOCRContracts deploys and funds a certain number of offchain aggregator contracts
func DeployPerformanceKeeperContracts ¶ added in v1.0.54
func DeployPerformanceKeeperContracts( numberOfContracts int, linkToken contracts.LinkToken, contractDeployer contracts.ContractDeployer, chainlinkNodes []client.Chainlink, networks *client.Networks, keeperContractSettings *contracts.KeeperRegistrySettings, blockRange, blockInterval, checkGasToBurn, performGasToBurn int64, ) (contracts.KeeperRegistry, []contracts.KeeperConsumerPerformance)
DeployPerformanceKeeperContracts deploys a set amount of keeper performance contracts registered to a single registry
func EncodeOnChainExternalJobID ¶
EncodeOnChainExternalJobID encodes external job uuid to on-chain representation
func EncodeOnChainVRFProvingKey ¶
EncodeOnChainVRFProvingKey encodes uncompressed public VRF key to on-chain representation
func ExtractRequestIDFromJobRun ¶ added in v0.0.7
func ExtractRequestIDFromJobRun(jobDecodeData client.RunsResponseData) ([]byte, error)
ExtractRequestIDFromJobRun extracts RequestID from job runs response
func FundAddresses ¶ added in v1.0.27
func FundAddresses(blockchain client.BlockchainClient, amount *big.Float, addresses ...string) error
FundAddresses will fund a list of addresses with an amount of native currency
func FundChainlinkNodes ¶
func FundChainlinkNodes( nodes []client.Chainlink, blockchain client.BlockchainClient, amount *big.Float, ) error
FundChainlinkNodes will fund all of the provided Chainlink nodes with a set amount of native currency
func FundChainlinkNodesLink ¶ added in v1.0.54
func FundChainlinkNodesLink( nodes []client.Chainlink, blockchain client.BlockchainClient, linkToken contracts.LinkToken, linkAmount *big.Int, ) error
FundChainlinkNodes will fund all of the provided Chainlink nodes with a set amount of native currency
func GetMockserverInitializerDataForOTPE ¶ added in v0.0.17
func GetMockserverInitializerDataForOTPE( OCRInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink, ) (interface{}, error)
GetMockserverInitializerDataForOTPE creates mocked weiwatchers data needed for otpe
func GinkgoSuite ¶ added in v1.0.53
func GinkgoSuite(frameworkConfigFileLocation string)
GinkgoSuite provides the default setup for running a Ginkgo test suite
func LoadConfigs ¶ added in v1.0.53
func LoadConfigs(frameworkConfigFileLocation string)
func OffChainConfigParamsFromNodes ¶ added in v1.1.15
func OffChainConfigParamsFromNodes(nodes []client.Chainlink, nkb []NodeKeysBundle) (contracts.OffChainAggregatorV2Config, error)
OffChainConfigParamsFromNodes creates contracts.OffChainAggregatorV2Config
func SetAdapterResponse ¶ added in v0.0.44
func SetAdapterResponse( response int, ocrInstance contracts.OffchainAggregator, chainlinkNode client.Chainlink, mockserver *client.MockserverClient, ) func()
SetAdapterResponse sets a single adapter response that correlates with an ocr contract and a chainlink node
func SetAllAdapterResponsesToDifferentValues ¶ added in v1.0.33
func SetAllAdapterResponsesToDifferentValues( responses []int, ocrInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink, mockserver *client.MockserverClient, ) func()
SetAllAdapterResponsesToDifferentValues sets the mock responses in mockserver that are read by chainlink nodes to simulate different adapters. This sets all adapter responses for each node and contract to different responses
func SetAllAdapterResponsesToTheSameValue ¶ added in v1.0.33
func SetAllAdapterResponsesToTheSameValue( response int, ocrInstances []contracts.OffchainAggregator, chainlinkNodes []client.Chainlink, mockserver *client.MockserverClient, ) func()
SetAllAdapterResponsesToTheSameValue sets the mock responses in mockserver that are read by chainlink nodes to simulate different adapters. This sets all adapter responses for each node and contract to the same response
func SetChainlinkAPIPageSize ¶
SetChainlinkAPIPageSize specifies the page size from the Chainlink API, useful for high volume testing
func StartNewRound ¶ added in v0.0.17
func StartNewRound( roundNr int64, ocrInstances []contracts.OffchainAggregator, networks *client.Networks, ) func()
StartNewRound requests a new round from the ocr contracts and waits for confirmation
func StripOCR2KeyPrefixes ¶ added in v1.1.17
OCR2 keys are in format OCR2<key_type>_<network>_<key>
func StripP2PIDPrefix ¶ added in v1.1.17
func TeardownRemoteSuite ¶ added in v1.0.53
func TeardownRemoteSuite( env *environment.Environment, nets *client.Networks, chainlinkNodes []client.Chainlink, optionalTestReporter testreporters.TestReporter, ) error
TeardownRemoteSuite is used when running a test within a remote-test-runner, like for long-running performance and soak tests
func TeardownSuite ¶ added in v0.0.25
func TeardownSuite( env *environment.Environment, nets *client.Networks, logsFolderPath string, chainlinkNodes []client.Chainlink, optionalTestReporter testreporters.TestReporter, ) error
TeardownSuite tears down networks/clients and environment and creates a logs folder for failed tests in the specified path. Can also accept a testreporter (if one was used) to log further results