Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "CONFIG_ETHEREUM"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientRegistry ¶ added in v0.10.0
type Config ¶ added in v0.10.0
type Config struct { // Keys is a list of Ethereum keys. Keys []ConfigKey `hcl:"key,block"` // RandKeys is a list of random keys. RandKeys []string `hcl:"rand_keys,optional"` // Clients is a list of Ethereum clients. Clients []ConfigClient `hcl:"client,block"` // HCL fields: Content hcl.BodyContent `hcl:",content"` // contains filtered or unexported fields }
Config contains the configuration for Ethereum clients and keys.
func (*Config) ClientRegistry ¶ added in v0.10.0
func (c *Config) ClientRegistry(d Dependencies) (ClientRegistry, error)
ClientRegistry returns the list of configured Ethereum clients.
func (*Config) KeyRegistry ¶ added in v0.10.0
func (c *Config) KeyRegistry(d Dependencies) (KeyRegistry, error)
KeyRegistry returns the list of configured Ethereum keys.
type ConfigClient ¶ added in v0.10.0
type ConfigClient struct { // Name is the unique name of the client that can be referenced by other // services. Name string `hcl:"name,label"` // RPCURLs is a list of RPC URLs to use for the client. If multiple URLs // are provided, then RPC-Splitter will be used. RPCURLs []config.URL `hcl:"rpc_urls"` // Total timeout for the request, in seconds. Timeout uint32 `hcl:"timeout,optional"` // GracefulTimeout is the time to wait for the response, in seconds, for // slower nodes after reaching minimum number of responses required for the // request. GracefulTimeout uint32 `hcl:"graceful_timeout,optional"` // MaxBlocksBehind is the maximum number of blocks behind the node with the // highest block number can be. RPC-Splitter will use the lowest block number // from all nodes that is not more than MaxBlocksBehind behind the highest // block number. MaxBlocksBehind uint64 `hcl:"max_blocks_behind,optional"` // EthereumKey is the name of the Ethereum key to use for signing // transactions. EthereumKey string `hcl:"ethereum_key,optional"` // ChainID is the chain ID to use for signing transactions. ChainID uint64 `hcl:"chain_id,optional"` // Transaction configuration: TransactionType string `hcl:"tx_type,optional"` GasFeeMultiplier float64 `hcl:"gas_fee_multiplier,optional"` GasPriorityFeeMultiplier float64 `hcl:"gas_priority_fee_multiplier,optional"` MaxGasFee *big.Int `hcl:"max_gas_fee,optional"` MaxGasPriorityFee *big.Int `hcl:"max_gas_priority_fee,optional"` MaxGasLimit *big.Int `hcl:"max_gas_limit,optional"` // HCL fields: Range hcl.Range `hcl:",range"` Content hcl.BodyContent `hcl:",content"` // contains filtered or unexported fields }
ConfigClient contains the configuration for an Ethereum client.
func (*ConfigClient) Client ¶ added in v0.10.0
func (c *ConfigClient) Client(logger log.Logger, keys KeyRegistry) (rpc.RPC, error)
Client returns the configured RPC client.
type ConfigKey ¶ added in v0.10.0
type ConfigKey struct { // Name is the unique name of the key that can be referenced by other // services. Name string `hcl:"name,label"` // Address is the address of the key in hex format. Address types.Address `hcl:"address"` // KeystorePath is the path to the keystore directory. KeystorePath string `hcl:"keystore_path"` // PassphraseFile is the path to the file containing the passphrase for the // key. If empty, then the passphrase is not provided. PassphraseFile string `hcl:"passphrase_file,optional"` // HCL fields: Content hcl.BodyContent `hcl:",content"` // contains filtered or unexported fields }
ConfigKey contains the configuration for an Ethereum key.
type Dependencies ¶ added in v0.10.0
type KeyRegistry ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.