vrf

package
v0.0.0-...-692deea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrDeviationShouldBeLessThanOriginal = "`RandomnessRequestCountPerRequestDeviation` should be less than `RandomnessRequestCountPerRequest`"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	General           *General           `toml:"General"`
	ExistingEnvConfig *ExistingEnvConfig `toml:"ExistingEnv"`
	Performance       *PerformanceConfig `toml:"Performance"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ExistingEnvConfig

type ExistingEnvConfig struct {
	CoordinatorAddress            *string  `toml:"coordinator_address"`
	ConsumerAddress               *string  `toml:"consumer_address"`
	LinkAddress                   *string  `toml:"link_address"`
	KeyHash                       *string  `toml:"key_hash"`
	CreateFundSubsAndAddConsumers *bool    `toml:"create_fund_subs_and_add_consumers"`
	NodeSendingKeys               []string `toml:"node_sending_keys"`
	Funding
}

func (*ExistingEnvConfig) Validate

func (c *ExistingEnvConfig) Validate() error

type Funding

type Funding struct {
	NodeSendingKeyFundingMin *float64 `toml:"node_sending_key_funding_min"`
}

func (*Funding) Validate

func (c *Funding) Validate() error

type General

type General struct {
	UseExistingEnv                  *bool    `toml:"use_existing_env"`
	CancelSubsAfterTestRun          *bool    `toml:"cancel_subs_after_test_run"`
	CLNodeMaxGasPriceGWei           *int64   `toml:"cl_node_max_gas_price_gwei"`         // Max gas price in GWei for the chainlink node
	LinkNativeFeedResponse          *int64   `toml:"link_native_feed_response"`          // Response of the LINK/ETH feed
	MinimumConfirmations            *uint16  `toml:"minimum_confirmations"`              // Minimum number of confirmations for the VRF Coordinator
	SubscriptionFundingAmountLink   *float64 `toml:"subscription_funding_amount_link"`   // Amount of LINK to fund the subscription with
	SubscriptionRefundingAmountLink *float64 `toml:"subscription_refunding_amount_link"` // Amount of LINK to fund the subscription with
	NumberOfWords                   *uint32  `toml:"number_of_words"`                    // Number of words to request
	CallbackGasLimit                *uint32  `toml:"callback_gas_limit"`                 // Gas limit for the callback
	MaxGasLimitCoordinatorConfig    *uint32  `toml:"max_gas_limit_coordinator_config"`   // Max gas limit for the VRF Coordinator config
	FallbackWeiPerUnitLink          *string  `toml:"fallback_wei_per_unit_link"`         // Fallback wei per unit LINK for the VRF Coordinator config
	StalenessSeconds                *uint32  `toml:"staleness_seconds"`                  // Staleness in seconds for the VRF Coordinator config
	GasAfterPaymentCalculation      *uint32  `toml:"gas_after_payment_calculation"`      // Gas after payment calculation for the VRF Coordinator

	NumberOfSubToCreate         *int `toml:"number_of_sub_to_create"`          // Number of subscriptions to create
	NumberOfSendingKeysToCreate *int `toml:"number_of_sending_keys_to_create"` // Number of sending keys to create

	RandomnessRequestCountPerRequest          *uint16 `toml:"randomness_request_count_per_request"`           // How many randomness requests to send per request
	RandomnessRequestCountPerRequestDeviation *uint16 `toml:"randomness_request_count_per_request_deviation"` // How many randomness requests to send per request

	RandomWordsFulfilledEventTimeout *blockchain.StrDuration `toml:"random_words_fulfilled_event_timeout"` // How long to wait for the RandomWordsFulfilled event to be emitted
	WaitFor256BlocksTimeout          *blockchain.StrDuration `toml:"wait_for_256_blocks_timeout"`          // How long to wait for 256 blocks to be mined

	// Wrapper Config
	WrapperGasOverhead      *uint32 `toml:"wrapped_gas_overhead"`
	WrapperMaxNumberOfWords *uint8  `toml:"wrapper_max_number_of_words"`

	WrapperConsumerFundingAmountNativeToken *float64 `toml:"wrapper_consumer_funding_amount_native_token"`
	WrapperConsumerFundingAmountLink        *int64   `toml:"wrapper_consumer_funding_amount_link"`

	//VRF Job Config
	VRFJobForwardingAllowed             *bool                   `toml:"vrf_job_forwarding_allowed"`
	VRFJobEstimateGasMultiplier         *float64                `toml:"vrf_job_estimate_gas_multiplier"`
	VRFJobBatchFulfillmentEnabled       *bool                   `toml:"vrf_job_batch_fulfillment_enabled"`
	VRFJobBatchFulfillmentGasMultiplier *float64                `toml:"vrf_job_batch_fulfillment_gas_multiplier"`
	VRFJobPollPeriod                    *blockchain.StrDuration `toml:"vrf_job_poll_period"`
	VRFJobRequestTimeout                *blockchain.StrDuration `toml:"vrf_job_request_timeout"`
	VRFJobSimulationBlock               *string                 `toml:"vrf_job_simulation_block"`

	//BHS Job Config
	BHSJobWaitBlocks     *int                    `toml:"bhs_job_wait_blocks"`
	BHSJobLookBackBlocks *int                    `toml:"bhs_job_lookback_blocks"`
	BHSJobPollPeriod     *blockchain.StrDuration `toml:"bhs_job_poll_period"`
	BHSJobRunTimeout     *blockchain.StrDuration `toml:"bhs_job_run_timeout"`

	//BHF Job Config
	BHFJobWaitBlocks     *int                    `toml:"bhf_job_wait_blocks"`
	BHFJobLookBackBlocks *int                    `toml:"bhf_job_lookback_blocks"`
	BHFJobPollPeriod     *blockchain.StrDuration `toml:"bhf_job_poll_period"`
	BHFJobRunTimeout     *blockchain.StrDuration `toml:"bhf_job_run_timeout"`
}

func (*General) Validate

func (c *General) Validate() error

type PerformanceConfig

type PerformanceConfig struct {
	TestDuration          *blockchain.StrDuration `toml:"test_duration"`
	RPS                   *int64                  `toml:"rps"`
	RateLimitUnitDuration *blockchain.StrDuration `toml:"rate_limit_unit_duration"`

	BHSTestDuration              *blockchain.StrDuration `toml:"bhs_test_duration"`
	BHSTestRPS                   *int64                  `toml:"bhs_test_rps"`
	BHSTestRateLimitUnitDuration *blockchain.StrDuration `toml:"bhs_test_rate_limit_unit_duration"`
}

func (*PerformanceConfig) Validate

func (c *PerformanceConfig) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL