Documentation
¶
Overview ¶
Package actions enables common chainlink interactions
Index ¶
- Constants
- func ChainlinkNodeAddresses(nodes []client.Chainlink) ([]common.Address, error)
- func EVMNetworkFromConfigHook(config *config.Config) (client.BlockchainNetwork, error)
- func EncodeOnChainExternalJobID(jobID uuid.UUID) [32]byte
- func EncodeOnChainVRFProvingKey(vrfKey client.VRFKey) ([2]*big.Int, error)
- func EthereumClientHook(network client.BlockchainNetwork) (client.BlockchainClient, error)
- func EthereumDeployerHook(bcClient client.BlockchainClient) (contracts.ContractDeployer, error)
- func EthereumPerfNetworkHook(config *config.Config) (client.BlockchainNetwork, error)
- func ExtractRequestIDFromJobRun(jobDecodeData client.RunsResponseData) ([]byte, error)
- func FundChainlinkNodes(nodes []client.Chainlink, blockchain client.BlockchainClient, ...) error
- func NetworksFromConfigHook(config *config.Config) ([]client.BlockchainNetwork, error)
- func SetChainlinkAPIPageSize(nodes []client.Chainlink, pageSize int)
- type NetworkInfo
- type SingleNetworkSuiteSetup
- func (s *SingleNetworkSuiteSetup) Config() *config.Config
- func (s *SingleNetworkSuiteSetup) DefaultNetwork() NetworkInfo
- func (s *SingleNetworkSuiteSetup) Environment() environment.Environment
- func (s *SingleNetworkSuiteSetup) Network(index int) (NetworkInfo, error)
- func (s *SingleNetworkSuiteSetup) Networks() []NetworkInfo
- func (s *SingleNetworkSuiteSetup) TearDown() func()
- type SuiteSetup
Constants ¶
const ( KeepEnvironmentsNever = "never" KeepEnvironmentsOnFail = "onfail" KeepEnvironmentsAlways = "always" )
Keep Environments options
Variables ¶
This section is empty.
Functions ¶
func ChainlinkNodeAddresses ¶
ChainlinkNodeAddresses will return all the on-chain wallet addresses for a set of Chainlink nodes
func EVMNetworkFromConfigHook ¶ added in v0.0.13
func EVMNetworkFromConfigHook(config *config.Config) (client.BlockchainNetwork, error)
EVMNetworkFromConfigHook evm network from config hook
func EncodeOnChainExternalJobID ¶
EncodeOnChainExternalJobID encodes external job uuid to on-chain representation
func EncodeOnChainVRFProvingKey ¶
EncodeOnChainVRFProvingKey encodes uncompressed public VRF key to on-chain representation
func EthereumClientHook ¶ added in v0.0.13
func EthereumClientHook(network client.BlockchainNetwork) (client.BlockchainClient, error)
EthereumClientHook client hook
func EthereumDeployerHook ¶ added in v0.0.13
func EthereumDeployerHook(bcClient client.BlockchainClient) (contracts.ContractDeployer, error)
EthereumDeployerHook deployer hook
func EthereumPerfNetworkHook ¶ added in v0.0.13
func EthereumPerfNetworkHook(config *config.Config) (client.BlockchainNetwork, error)
EthereumPerfNetworkHook perf network func
func ExtractRequestIDFromJobRun ¶ added in v0.0.7
func ExtractRequestIDFromJobRun(jobDecodeData client.RunsResponseData) ([]byte, error)
ExtractRequestIDFromJobRun extracts RequestID from job runs response
func FundChainlinkNodes ¶
func FundChainlinkNodes( nodes []client.Chainlink, blockchain client.BlockchainClient, fromWallet client.BlockchainWallet, nativeAmount, linkAmount *big.Float, ) error
FundChainlinkNodes will fund all of the Chainlink nodes with a given amount of ETH in wei
func NetworksFromConfigHook ¶ added in v0.0.13
func NetworksFromConfigHook(config *config.Config) ([]client.BlockchainNetwork, error)
NetworksFromConfigHook networks from config hook
func SetChainlinkAPIPageSize ¶
SetChainlinkAPIPageSize specifies the page size from the Chainlink API, useful for high volume testing
Types ¶
type NetworkInfo ¶ added in v0.0.7
type NetworkInfo struct { Client client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer Link contracts.LinkToken Network client.BlockchainNetwork }
NetworkInfo helps delineate network information in a multi-network setup
func NewNetworkInfo ¶ added in v0.0.13
func NewNetworkInfo( network client.BlockchainNetwork, clientFunc types.NewClientHook, extDepFunc types.NewDeployerHook, env environment.Environment, ) (NetworkInfo, error)
NewNetworkInfo initializes the network's blockchain client and gathers all test-relevant network information
type SingleNetworkSuiteSetup ¶ added in v0.0.7
type SingleNetworkSuiteSetup struct {
// contains filtered or unexported fields
}
SingleNetworkSuiteSetup holds the data for a default setup
func (*SingleNetworkSuiteSetup) Config ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) Config() *config.Config
Config retrieves the general config for the suite
func (*SingleNetworkSuiteSetup) DefaultNetwork ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) DefaultNetwork() NetworkInfo
DefaultNetwork returns the only network in a single network environment
func (*SingleNetworkSuiteSetup) Environment ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) Environment() environment.Environment
Environment retrieves the general environment for the suite
func (*SingleNetworkSuiteSetup) Network ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) Network(index int) (NetworkInfo, error)
Network returns the only network in a single network environment
func (*SingleNetworkSuiteSetup) Networks ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) Networks() []NetworkInfo
Networks returns the only network in a single network environment
func (*SingleNetworkSuiteSetup) TearDown ¶ added in v0.0.7
func (s *SingleNetworkSuiteSetup) TearDown() func()
TearDown checks for test failure, writes logs if there is one, then tears down the test environment, based on the keep_environments config value
type SuiteSetup ¶ added in v0.0.7
type SuiteSetup interface { Config() *config.Config Environment() environment.Environment DefaultNetwork() NetworkInfo Network(index int) (NetworkInfo, error) Networks() []NetworkInfo TearDown() func() }
SuiteSetup enables common use cases, and safe handling of different blockchain networks for test scenarios
func MultiNetworkSetup ¶ added in v0.0.7
func MultiNetworkSetup( initialDeployInitFunc environment.K8sEnvSpecInit, multiNetworkInitialization types.NewMultinetworkHook, deployerFunc types.NewDeployerHook, clientFunc types.NewClientHook, configPath string, ) (SuiteSetup, error)
MultiNetworkSetup enables testing across multiple networks
func SingleNetworkSetup ¶ added in v0.0.7
func SingleNetworkSetup( initialDeployInitFunc environment.K8sEnvSpecInit, initFunc types.NewNetworkHook, deployerFunc types.NewDeployerHook, clientFunc types.NewClientHook, configPath string, ) (SuiteSetup, error)
SingleNetworkSetup setup minimum required components for test