Documentation ¶
Index ¶
- Constants
- func AddConsumersToSubs(subToConsumerMap map[uint64][]contracts.VRFv2LoadTestConsumer, ...) error
- func CancelSubsAndReturnFunds(ctx context.Context, vrfContracts *vrfcommon.VRFContracts, ...)
- func CreateFundSubsAndAddConsumers(subscriptionFundingAmountLink *big.Float, linkToken contracts.LinkToken, ...) ([]uint64, error)
- func CreateSubAndFindSubID(coordinator contracts.VRFCoordinatorV2) (uint64, error)
- func CreateSubs(coordinator contracts.VRFCoordinatorV2, subAmountToCreate int) ([]uint64, error)
- func CreateSubsAndFund(subscriptionFundingAmountLink *big.Float, linkToken contracts.LinkToken, ...) ([]uint64, error)
- func CreateVRFV2Job(chainlinkNode *client.ChainlinkClient, ...) (*client.Job, error)
- func DeployVRFV2Consumers(client *seth.Client, coordinatorAddress string, consumerContractsAmount int) ([]contracts.VRFv2LoadTestConsumer, error)
- func DeployVRFV2Contracts(env *test_env.CLClusterTestEnv, chainID int64, ...) (*vrfcommon.VRFContracts, error)
- func DeployVRFV2WrapperConsumers(client *seth.Client, linkTokenAddress string, ...) ([]contracts.VRFv2WrapperLoadTestConsumer, error)
- func DirectFundingRequestRandomnessAndWaitForFulfillment(l zerolog.Logger, consumer contracts.VRFv2WrapperLoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsFulfilled, error)
- func FundSubscriptions(subscriptionFundingAmountLink *big.Float, linkAddress contracts.LinkToken, ...) error
- func FundVRFCoordinatorV2Subscription(linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2, ...) error
- func RequestRandomness(l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsRequested, error)
- func RequestRandomnessAndWaitForFulfillment(l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsRequested, ...)
- func RequestRandomnessWithForceFulfillAndWaitForFulfillment(l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, ...) (*contracts.CoordinatorConfigSet, *contracts.CoordinatorRandomWordsFulfilled, ...)
- func SetupNewConsumersAndSubs(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]contracts.VRFv2LoadTestConsumer, []uint64, error)
- func SetupSubsAndConsumersForExistingEnv(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]uint64, []contracts.VRFv2LoadTestConsumer, error)
- func SetupVRFOwnerContractIfNeeded(useVRFOwner bool, vrfContracts *vrfcommon.VRFContracts, ...) (*vrfcommon.VRFOwnerConfig, error)
- func SetupVRFV2Contracts(env *test_env.CLClusterTestEnv, chainID int64, linkToken contracts.LinkToken, ...) (*vrfcommon.VRFContracts, error)
- func SetupVRFV2Environment(ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, ...) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, ...)
- func SetupVRFV2ForExistingEnv(t *testing.T, envConfig vrfcommon.VRFEnvConfig, l zerolog.Logger) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, ...)
- func SetupVRFV2ForNewEnv(ctx context.Context, t *testing.T, envConfig vrfcommon.VRFEnvConfig, ...) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, ...)
- func SetupVRFV2Universe(ctx context.Context, t *testing.T, envConfig vrfcommon.VRFEnvConfig, ...) (*test_env.CLClusterTestEnv, *vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, ...)
- func VRFV2RegisterProvingKey(vrfKey *client.VRFKey, oracleAddress string, ...) (vrfcommon.VRFEncodedProvingKey, error)
- func WaitRandomWordsFulfilledEvent(coordinator contracts.Coordinator, requestId *big.Int, ...) (*contracts.CoordinatorRandomWordsFulfilled, error)
- type VRFV2WrapperContracts
Constants ¶
View Source
const ( ErrDeployCoordinatorV2 = "error deploying VRF CoordinatorV2" ErrDeployBatchCoordinatorV2 = "error deploying Batch VRF CoordinatorV2" ErrDeployVRFV2Wrapper = "error deploying VRFV2Wrapper" ErrCreateVRFV2Jobs = "error creating VRF V2 Jobs" ErrDeployVRFV2Contracts = "error deploying VRFV2 contracts" ErrCreatingVRFv2Job = "error creating VRFv2 job" ErrAdvancedConsumer = "error deploying VRFv2 Advanced Consumer" )
Variables ¶
This section is empty.
Functions ¶
func AddConsumersToSubs ¶
func AddConsumersToSubs( subToConsumerMap map[uint64][]contracts.VRFv2LoadTestConsumer, coordinator contracts.VRFCoordinatorV2, ) error
func CreateSubAndFindSubID ¶
func CreateSubAndFindSubID(coordinator contracts.VRFCoordinatorV2) (uint64, error)
func CreateSubs ¶
func CreateSubs( coordinator contracts.VRFCoordinatorV2, subAmountToCreate int, ) ([]uint64, error)
func CreateSubsAndFund ¶
func CreateVRFV2Job ¶
func CreateVRFV2Job( chainlinkNode *client.ChainlinkClient, vrfJobSpecConfig vrfcommon.VRFJobSpecConfig, ) (*client.Job, error)
func DeployVRFV2Consumers ¶
func DeployVRFV2Contracts ¶
func DeployVRFV2Contracts( env *test_env.CLClusterTestEnv, chainID int64, linkTokenContract contracts.LinkToken, linkEthFeedContract contracts.VRFMockETHLINKFeed, useVRFOwner bool, useTestCoordinator bool, ) (*vrfcommon.VRFContracts, error)
func DeployVRFV2WrapperConsumers ¶
func DeployVRFV2WrapperConsumers(client *seth.Client, linkTokenAddress string, vrfV2Wrapper contracts.VRFV2Wrapper, consumerContractsAmount int) ([]contracts.VRFv2WrapperLoadTestConsumer, error)
func DirectFundingRequestRandomnessAndWaitForFulfillment ¶
func DirectFundingRequestRandomnessAndWaitForFulfillment( l zerolog.Logger, consumer contracts.VRFv2WrapperLoadTestConsumer, coordinator contracts.Coordinator, subID uint64, vrfv2KeyData *vrfcommon.VRFKeyData, minimumConfirmations uint16, callbackGasLimit uint32, numberOfWords uint32, randomnessRequestCountPerRequest uint16, randomnessRequestCountPerRequestDeviation uint16, randomWordsFulfilledEventTimeout time.Duration, ) (*contracts.CoordinatorRandomWordsFulfilled, error)
func FundSubscriptions ¶
func RequestRandomness ¶
func RequestRandomness( l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, coordinator contracts.Coordinator, subID uint64, vrfKeyData *vrfcommon.VRFKeyData, minimumConfirmations uint16, callbackGasLimit uint32, numberOfWords uint32, randomnessRequestCountPerRequest uint16, randomnessRequestCountPerRequestDeviation uint16, keyNum int, ) (*contracts.CoordinatorRandomWordsRequested, error)
func RequestRandomnessAndWaitForFulfillment ¶
func RequestRandomnessAndWaitForFulfillment( l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, coordinator contracts.Coordinator, subID uint64, vrfKeyData *vrfcommon.VRFKeyData, minimumConfirmations uint16, callbackGasLimit uint32, numberOfWords uint32, randomnessRequestCountPerRequest uint16, randomnessRequestCountPerRequestDeviation uint16, randomWordsFulfilledEventTimeout time.Duration, keyNum int, ) (*contracts.CoordinatorRandomWordsRequested, *contracts.CoordinatorRandomWordsFulfilled, error)
func RequestRandomnessWithForceFulfillAndWaitForFulfillment ¶
func RequestRandomnessWithForceFulfillAndWaitForFulfillment( l zerolog.Logger, consumer contracts.VRFv2LoadTestConsumer, coordinator contracts.Coordinator, vrfOwner contracts.VRFOwner, vrfv2KeyData *vrfcommon.VRFKeyData, minimumConfirmations uint16, callbackGasLimit uint32, numberOfWords uint32, randomnessRequestCountPerRequest uint16, randomnessRequestCountPerRequestDeviation uint16, subTopUpAmount *big.Int, linkAddress common.Address, randomWordsFulfilledEventTimeout time.Duration, ) (*contracts.CoordinatorConfigSet, *contracts.CoordinatorRandomWordsFulfilled, *vrf_owner.VRFOwnerRandomWordsForced, error)
func SetupNewConsumersAndSubs ¶
func SetupNewConsumersAndSubs( env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2, testConfig tc.TestConfig, linkToken contracts.LinkToken, numberOfConsumerContractsToDeployAndAddToSub int, numberOfSubToCreate int, l zerolog.Logger, ) ([]contracts.VRFv2LoadTestConsumer, []uint64, error)
func SetupSubsAndConsumersForExistingEnv ¶
func SetupSubsAndConsumersForExistingEnv( env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2, linkToken contracts.LinkToken, numberOfConsumerContractsToDeployAndAddToSub int, numberOfSubToCreate int, testConfig tc.TestConfig, l zerolog.Logger, ) ([]uint64, []contracts.VRFv2LoadTestConsumer, error)
func SetupVRFV2Contracts ¶
func SetupVRFV2Contracts( env *test_env.CLClusterTestEnv, chainID int64, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, useVRFOwner bool, useTestCoordinator bool, vrfv2Config *testconfig.General, l zerolog.Logger, ) (*vrfcommon.VRFContracts, error)
func SetupVRFV2Environment ¶
func SetupVRFV2Environment( ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, nodesToCreate []vrfcommon.VRFNodeType, vrfv2TestConfig types.VRFv2TestConfig, useVRFOwner bool, useTestCoordinator bool, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, registerProvingKeyAgainstAddress string, numberOfTxKeysToCreate int, l zerolog.Logger, ) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
SetupVRFV2Environment will create specified number of subscriptions and add the same conumer/s to each of them
func SetupVRFV2ForExistingEnv ¶
func SetupVRFV2ForExistingEnv(t *testing.T, envConfig vrfcommon.VRFEnvConfig, l zerolog.Logger) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, error)
func SetupVRFV2ForNewEnv ¶
func SetupVRFV2ForNewEnv( ctx context.Context, t *testing.T, envConfig vrfcommon.VRFEnvConfig, newEnvConfig vrfcommon.NewEnvConfig, l zerolog.Logger, ) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
func SetupVRFV2Universe ¶
func SetupVRFV2Universe( ctx context.Context, t *testing.T, envConfig vrfcommon.VRFEnvConfig, newEnvConfig vrfcommon.NewEnvConfig, l zerolog.Logger, ) (*test_env.CLClusterTestEnv, *vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
func VRFV2RegisterProvingKey ¶
func VRFV2RegisterProvingKey( vrfKey *client.VRFKey, oracleAddress string, coordinator contracts.VRFCoordinatorV2, ) (vrfcommon.VRFEncodedProvingKey, error)
Types ¶
type VRFV2WrapperContracts ¶
type VRFV2WrapperContracts struct { VRFV2Wrapper contracts.VRFV2Wrapper LoadTestConsumers []contracts.VRFv2WrapperLoadTestConsumer }
func DeployVRFV2DirectFundingContracts ¶
func DeployVRFV2DirectFundingContracts( client *seth.Client, linkTokenAddress string, linkEthFeedAddress string, coordinator contracts.VRFCoordinatorV2, consumerContractsAmount int, ) (*VRFV2WrapperContracts, error)
func SetupVRFV2WrapperEnvironment ¶
func SetupVRFV2WrapperEnvironment( ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, vrfv2TestConfig tc.VRFv2TestConfig, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, coordinator contracts.VRFCoordinatorV2, keyHash [32]byte, wrapperConsumerContractsAmount int, ) (*VRFV2WrapperContracts, *uint64, error)
Click to show internal directories.
Click to hide internal directories.