Documentation ¶
Index ¶
- Constants
- func AddConsumersToSubs(subToConsumerMap map[*big.Int][]contracts.VRFv2PlusLoadTestConsumer, ...) error
- func CancelSubsAndReturnFunds(ctx context.Context, vrfContracts *vrfcommon.VRFContracts, ...)
- func CreateFundSubsAndAddConsumers(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]*big.Int, error)
- func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, chainID int64, ...) (*big.Int, error)
- func CreateSubs(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]*big.Int, error)
- func CreateSubsAndFund(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]*big.Int, error)
- func CreateVRFV2PlusJob(chainlinkNode *client.ChainlinkClient, ...) (*client.Job, error)
- func DeployVRFV2PlusConsumers(contractDeployer contracts.ContractDeployer, ...) ([]contracts.VRFv2PlusLoadTestConsumer, error)
- func DeployVRFV2PlusWrapperConsumers(contractDeployer contracts.ContractDeployer, ...) ([]contracts.VRFv2PlusWrapperLoadTestConsumer, error)
- func DeployVRFV2_5Contracts(contractDeployer contracts.ContractDeployer, chainClient blockchain.EVMClient) (*vrfcommon.VRFContracts, error)
- func DirectFundingRequestRandomnessAndWaitForFulfillment(consumer contracts.VRFv2PlusWrapperLoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsFulfilled, error)
- func FundSubscriptions(env *test_env.CLClusterTestEnv, chainID int64, ...) error
- func FundVRFCoordinatorV2_5Subscription(linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2_5, ...) error
- func GetCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2_5) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error)
- func GetUpgradedCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error)
- func LogMigrationCompletedEvent(l zerolog.Logger, ...)
- func LogRandRequest(l zerolog.Logger, consumer string, coordinator string, subID *big.Int, ...)
- func LogSubDetailsAfterMigration(l zerolog.Logger, newCoordinator contracts.Coordinator, subID *big.Int, ...)
- func RequestRandomness(consumer contracts.VRFv2PlusLoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsRequested, error)
- func RequestRandomnessAndWaitForFulfillment(consumer contracts.VRFv2PlusLoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsRequested, ...)
- func SetupNewConsumersAndSubs(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]contracts.VRFv2PlusLoadTestConsumer, []*big.Int, error)
- func SetupSubsAndConsumersForExistingEnv(env *test_env.CLClusterTestEnv, chainID int64, ...) ([]*big.Int, []contracts.VRFv2PlusLoadTestConsumer, error)
- func SetupVRFV2PlusContracts(env *test_env.CLClusterTestEnv, chainID int64, linkToken contracts.LinkToken, ...) (*vrfcommon.VRFContracts, error)
- func SetupVRFV2PlusForExistingEnv(ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, ...) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, ...)
- func SetupVRFV2PlusForNewEnv(ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, ...) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, ...)
- func SetupVRFV2PlusUniverse(ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, ...) (*test_env.CLClusterTestEnv, *vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, ...)
- func SetupVRFV2_5Environment(ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, ...) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, ...)
- func VRFV2PlusUpgradedVersionRegisterProvingKey(vrfKey *client.VRFKey, ...) (vrfcommon.VRFEncodedProvingKey, error)
- func VRFV2_5RegisterProvingKey(vrfKey *client.VRFKey, coordinator contracts.VRFCoordinatorV2_5, ...) (vrfcommon.VRFEncodedProvingKey, error)
- func WaitRandomWordsFulfilledEvent(coordinator contracts.Coordinator, requestId *big.Int, subID *big.Int, ...) (*contracts.CoordinatorRandomWordsFulfilled, error)
- func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsumer, ...) (*contracts.CoordinatorRandomWordsRequested, string, error)
- type VRFV2PlusWrapperContracts
- func DeployVRFV2PlusDirectFundingContracts(contractDeployer contracts.ContractDeployer, chainClient blockchain.EVMClient, ...) (*VRFV2PlusWrapperContracts, error)
- func SetupVRFV2PlusWrapperEnvironment(ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, ...) (*VRFV2PlusWrapperContracts, *big.Int, error)
Constants ¶
View Source
const ( ErrCreatingVRFv2PlusKey = "error creating VRFv2Plus key" ErrAdvancedConsumer = "error deploying VRFv2Plus Advanced Consumer" ErrCreatingVRFv2PlusJob = "error creating VRFv2Plus job" ErrDeployVRFV2_5Contracts = "error deploying VRFV2_5 contracts" ErrAddConsumerToSub = "error adding consumer to VRF Subscription" ErrFundSubWithNativeToken = "error funding subscription with native token" ErrSetLinkNativeLinkFeed = "error setting Link and ETH/LINK feed for VRF Coordinator contract" ErrCreateVRFV2PlusJobs = "error creating VRF V2 Plus Jobs" ErrRequestRandomnessDirectFundingLinkPayment = "error requesting randomness with direct funding and link payment" ErrRequestRandomnessDirectFundingNativePayment = "error requesting randomness with direct funding and native payment" ErrLinkTotalBalance = "error waiting for RandomWordsFulfilled event" ErrNativeTokenBalance = "error waiting for RandomWordsFulfilled event" ErrDeployWrapper = "error deploying VRFV2PlusWrapper" )
Variables ¶
This section is empty.
Functions ¶
func AddConsumersToSubs ¶
func AddConsumersToSubs( subToConsumerMap map[*big.Int][]contracts.VRFv2PlusLoadTestConsumer, coordinator contracts.VRFCoordinatorV2_5, ) error
func CreateFundSubsAndAddConsumers ¶
func CreateFundSubsAndAddConsumers( env *test_env.CLClusterTestEnv, chainID int64, subscriptionFundingAmountNative *big.Float, subscriptionFundingAmountLink *big.Float, linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2_5, consumers []contracts.VRFv2PlusLoadTestConsumer, numberOfSubToCreate int, ) ([]*big.Int, error)
func CreateSubAndFindSubID ¶
func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2_5) (*big.Int, error)
func CreateSubs ¶
func CreateSubs( env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2_5, subAmountToCreate int, ) ([]*big.Int, error)
func CreateSubsAndFund ¶
func CreateVRFV2PlusJob ¶
func CreateVRFV2PlusJob( chainlinkNode *client.ChainlinkClient, vrfJobSpecConfig vrfcommon.VRFJobSpecConfig, ) (*client.Job, error)
func DeployVRFV2PlusConsumers ¶
func DeployVRFV2PlusConsumers(contractDeployer contracts.ContractDeployer, coordinator contracts.VRFCoordinatorV2_5, consumerContractsAmount int) ([]contracts.VRFv2PlusLoadTestConsumer, error)
func DeployVRFV2PlusWrapperConsumers ¶
func DeployVRFV2PlusWrapperConsumers(contractDeployer contracts.ContractDeployer, vrfV2PlusWrapper contracts.VRFV2PlusWrapper, consumerContractsAmount int) ([]contracts.VRFv2PlusWrapperLoadTestConsumer, error)
func DeployVRFV2_5Contracts ¶
func DeployVRFV2_5Contracts( contractDeployer contracts.ContractDeployer, chainClient blockchain.EVMClient, ) (*vrfcommon.VRFContracts, error)
func DirectFundingRequestRandomnessAndWaitForFulfillment ¶
func DirectFundingRequestRandomnessAndWaitForFulfillment( consumer contracts.VRFv2PlusWrapperLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plus_config.General, l zerolog.Logger, ) (*contracts.CoordinatorRandomWordsFulfilled, error)
func FundSubscriptions ¶
func LogMigrationCompletedEvent ¶
func LogMigrationCompletedEvent(l zerolog.Logger, migrationCompletedEvent *vrf_coordinator_v2_5.VRFCoordinatorV25MigrationCompleted, coordinator contracts.Coordinator)
func LogRandRequest ¶
func LogSubDetailsAfterMigration ¶
func LogSubDetailsAfterMigration(l zerolog.Logger, newCoordinator contracts.Coordinator, subID *big.Int, migratedSubscription vrf_v2plus_upgraded_version.GetSubscription)
func RequestRandomness ¶
func RequestRandomness( consumer contracts.VRFv2PlusLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plus_config.General, l zerolog.Logger, ) (*contracts.CoordinatorRandomWordsRequested, error)
func RequestRandomnessAndWaitForFulfillment ¶
func RequestRandomnessAndWaitForFulfillment( consumer contracts.VRFv2PlusLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plus_config.General, l zerolog.Logger, ) (*contracts.CoordinatorRandomWordsRequested, *contracts.CoordinatorRandomWordsFulfilled, error)
func SetupNewConsumersAndSubs ¶
func SetupNewConsumersAndSubs( env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2_5, testConfig tc.TestConfig, linkToken contracts.LinkToken, consumerContractsAmount int, numberOfSubToCreate int, l zerolog.Logger, ) ([]contracts.VRFv2PlusLoadTestConsumer, []*big.Int, error)
func SetupSubsAndConsumersForExistingEnv ¶
func SetupSubsAndConsumersForExistingEnv( env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2_5, linkToken contracts.LinkToken, numberOfConsumerContractsToDeployAndAddToSub int, numberOfSubToCreate int, testConfig tc.TestConfig, l zerolog.Logger, ) ([]*big.Int, []contracts.VRFv2PlusLoadTestConsumer, error)
func SetupVRFV2PlusContracts ¶
func SetupVRFV2PlusContracts( env *test_env.CLClusterTestEnv, chainID int64, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, configGeneral *vrfv2plus_config.General, l zerolog.Logger, ) (*vrfcommon.VRFContracts, error)
func SetupVRFV2PlusForExistingEnv ¶
func SetupVRFV2PlusForExistingEnv(ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, cleanupFn func(), l zerolog.Logger) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, error)
func SetupVRFV2PlusForNewEnv ¶
func SetupVRFV2PlusForNewEnv( ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, cleanupFn func(), newEnvConfig vrfcommon.NewEnvConfig, l zerolog.Logger, ) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, *test_env.CLClusterTestEnv, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
func SetupVRFV2PlusUniverse ¶
func SetupVRFV2PlusUniverse(ctx context.Context, t *testing.T, testConfig tc.TestConfig, chainID int64, cleanupFn func(), newEnvConfig vrfcommon.NewEnvConfig, l zerolog.Logger) (*test_env.CLClusterTestEnv, *vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
func SetupVRFV2_5Environment ¶
func SetupVRFV2_5Environment( ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, nodesToCreate []vrfcommon.VRFNodeType, vrfv2PlusTestConfig types.VRFv2PlusTestConfig, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, numberOfTxKeysToCreate int, l zerolog.Logger, ) (*vrfcommon.VRFContracts, *vrfcommon.VRFKeyData, map[vrfcommon.VRFNodeType]*vrfcommon.VRFNode, error)
SetupVRFV2_5Environment will create specified number of subscriptions and add the same conumer/s to each of them
func VRFV2PlusUpgradedVersionRegisterProvingKey ¶
func VRFV2PlusUpgradedVersionRegisterProvingKey( vrfKey *client.VRFKey, coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion, gasLaneMaxGasPrice uint64, ) (vrfcommon.VRFEncodedProvingKey, error)
func VRFV2_5RegisterProvingKey ¶
func VRFV2_5RegisterProvingKey( vrfKey *client.VRFKey, coordinator contracts.VRFCoordinatorV2_5, gasLaneMaxGas uint64, ) (vrfcommon.VRFEncodedProvingKey, error)
func WrapperRequestRandomness ¶
func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plus_config.General, l zerolog.Logger) (*contracts.CoordinatorRandomWordsRequested, string, error)
Types ¶
type VRFV2PlusWrapperContracts ¶
type VRFV2PlusWrapperContracts struct { VRFV2PlusWrapper contracts.VRFV2PlusWrapper LoadTestConsumers []contracts.VRFv2PlusWrapperLoadTestConsumer }
func DeployVRFV2PlusDirectFundingContracts ¶
func DeployVRFV2PlusDirectFundingContracts( contractDeployer contracts.ContractDeployer, chainClient blockchain.EVMClient, linkTokenAddress string, linkEthFeedAddress string, coordinator contracts.VRFCoordinatorV2_5, consumerContractsAmount int, wrapperSubId *big.Int, ) (*VRFV2PlusWrapperContracts, error)
func SetupVRFV2PlusWrapperEnvironment ¶
func SetupVRFV2PlusWrapperEnvironment( ctx context.Context, env *test_env.CLClusterTestEnv, chainID int64, vrfv2PlusTestConfig types.VRFv2PlusTestConfig, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.MockETHLINKFeed, coordinator contracts.VRFCoordinatorV2_5, keyHash [32]byte, wrapperConsumerContractsAmount int, ) (*VRFV2PlusWrapperContracts, *big.Int, error)
Click to show internal directories.
Click to hide internal directories.