Skip to content

Commit

Permalink
add configurable anvil option (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Jun 18, 2024
1 parent e7b8314 commit b829aa2
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ const (
)

type AnvilConfig struct {
URL *string `toml:"url,omitempty"` // Needed if you want to fork a network. URL is the URL of the node to fork from. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockNumber *int64 `toml:"block_number,omitempty"` // Needed if fork URL is provided for forking. BlockNumber is the block number to fork from. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockTime *int64 `toml:"block_time,omitempty"` // how frequent blocks are mined. By default, it automatically generates a new block as soon as a transaction is submitted. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockGaslimit *int64 `toml:"block_gaslimit,omitempty"` // BlockGaslimit is the gas limit for each block. Refer to https://book.getfoundry.sh/reference/anvil/#options
CodeSize *int64 `toml:"code_size,omitempty"` // CodeSize is the size of the code in bytes. Refer to https://book.getfoundry.sh/reference/anvil/#options
BaseFee *int64 `toml:"base_fee,omitempty"` // BaseFee is the base fee for block. Refer to https://book.getfoundry.sh/reference/anvil/#options
Retries *int `toml:"retries,omitempty"` // Needed if fork URL is provided for forking. Number of retry requests for spurious networks (timed out requests). Refer to https://book.getfoundry.sh/reference/anvil/#options
Timeout *int64 `toml:"timeout,omitempty"` // Needed if fork URL is provided for forking. Timeout in ms for requests sent to remote JSON-RPC server in forking mode. Refer to https://book.getfoundry.sh/reference/anvil/#options
ComputePerSecond *int64 `toml:"compute_per_second,omitempty"` // Needed if fork URL is provided for forking. Sets the number of assumed available compute units per second for this provider. Refer to https://book.getfoundry.sh/reference/anvil/#options
RateLimitDisabled *bool `toml:"rate_limit_disabled,omitempty"` // Needed if fork URL is provided for forking. Rate limiting for this node’s provider. If set to true the node will start with --no-rate-limit Refer to https://book.getfoundry.sh/reference/anvil/#options
NoOfAccounts *int `toml:"no_of_accounts,omitempty"` // Number of accounts to generate. Refer to https://book.getfoundry.sh/reference/anvil/#options
EnableTracing *bool `toml:"enable_tracing,omitempty"` // Enable tracing for the node. Refer to https://book.getfoundry.sh/reference/anvil/#options
URL *string `toml:"url,omitempty"` // Needed if you want to fork a network. URL is the URL of the node to fork from. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockNumber *int64 `toml:"block_number,omitempty"` // Needed if fork URL is provided for forking. BlockNumber is the block number to fork from. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockTime *int64 `toml:"block_time,omitempty"` // how frequent blocks are mined. By default, it automatically generates a new block as soon as a transaction is submitted. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlockGaslimit *int64 `toml:"block_gaslimit,omitempty"` // BlockGaslimit is the gas limit for each block. Refer to https://book.getfoundry.sh/reference/anvil/#options
CodeSize *int64 `toml:"code_size,omitempty"` // CodeSize is the size of the code in bytes. Refer to https://book.getfoundry.sh/reference/anvil/#options
BaseFee *int64 `toml:"base_fee,omitempty"` // BaseFee is the base fee for block. Refer to https://book.getfoundry.sh/reference/anvil/#options
Retries *int `toml:"retries,omitempty"` // Needed if fork URL is provided for forking. Number of retry requests for spurious networks (timed out requests). Refer to https://book.getfoundry.sh/reference/anvil/#options
Timeout *int64 `toml:"timeout,omitempty"` // Needed if fork URL is provided for forking. Timeout in ms for requests sent to remote JSON-RPC server in forking mode. Refer to https://book.getfoundry.sh/reference/anvil/#options
ComputePerSecond *int64 `toml:"compute_per_second,omitempty"` // Needed if fork URL is provided for forking. Sets the number of assumed available compute units per second for this provider. Refer to https://book.getfoundry.sh/reference/anvil/#options
RateLimitDisabled *bool `toml:"rate_limit_disabled,omitempty"` // Needed if fork URL is provided for forking. Rate limiting for this node’s provider. If set to true the node will start with --no-rate-limit Refer to https://book.getfoundry.sh/reference/anvil/#options
NoOfAccounts *int `toml:"no_of_accounts,omitempty"` // Number of accounts to generate. Refer to https://book.getfoundry.sh/reference/anvil/#options
EnableTracing *bool `toml:"enable_tracing,omitempty"` // Enable tracing for the node. Refer to https://book.getfoundry.sh/reference/anvil/#options
BlocksToKeepInMem *int64 `toml:"blocks_to_keep_in_mem,omitempty"` // Refer to --transaction-block-keeper option in https://book.getfoundry.sh/reference/anvil/#options
GasSpikeSimulation GasSpikeSimulationConfig `toml:"GasSpikeSimulation,omitempty"`
GasLimitSimulation GasLimitSimulationConfig `toml:"GasLimitSimulation,omitempty"`
}
Expand Down

0 comments on commit b829aa2

Please sign in to comment.