Documentation
¶
Overview ¶
Package confg is a placeholder package for settings that will probably be config values at some point in the future. I couldn't decide on a config package or library. It's hard coded here for now in a way that I hope is convenient for refactoring in the future.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContractAddresses ¶
type ContractAddresses struct {
// PoS
StateSyncSenderAddress *string `mapstructure:"state_sync_sender_address"`
StateSyncReceiverAddress *string `mapstructure:"state_sync_receiver_address"`
CheckpointAddress *string `mapstructure:"checkpoint_address"`
// zkEVM
GlobalExitRootL2Address *string `mapstructure:"global_exit_root_l2_address"`
ZkEVMBridgeAddress *string `mapstructure:"zkevm_bridge_address"`
RollupManagerAddress *string `mapstructure:"rollup_manager_address"`
}
type CustomNetwork ¶
type CustomNetwork struct {
Name string `mapstructure:"name"`
ChainID uint64 `mapstructure:"chain_id"`
}
func (CustomNetwork) GetChainID ¶
func (n CustomNetwork) GetChainID() uint64
GetChainID returns the network chain ID.
func (CustomNetwork) GetName ¶
func (n CustomNetwork) GetName() string
GetName returns the network name.
type ExchangeRates ¶
type HTTP ¶
type HTTP struct {
Port int `mapstructure:"port" validate:"required"`
Address string `mapstructure:"address" validate:"required"`
Path string `mapstructure:"path" validate:"required"`
}
HTTP defines the HTTP properties that we'll use for exposing metrics.
type HashDivergence ¶
type HashDivergence struct {
Interval uint `mapstructure:"interval"`
}
type HeimdallEndpoint ¶
type HeimdallEndpoint struct {
Name string `mapstructure:"name"`
TendermintURL string `mapstructure:"tendermint_url" validate:"url,required_with=Name"`
HeimdallURL string `mapstructure:"heimdall_url" validate:"url,required_with=Name"`
Label string `mapstructure:"label" validate:"required_with=Name"`
Interval uint `mapstructure:"interval"`
}
type Providers ¶
type Providers struct {
RPCs []RPC `mapstructure:"rpc" validate:"dive"`
HeimdallEndpoints []HeimdallEndpoint `mapstructure:"heimdall" validate:"dive"`
SensorNetworks []SensorNetwork `mapstructure:"sensor_network" validate:"dive"`
HashDivergence *HashDivergence `mapstructure:"hash_divergence"`
System *System `mapstructure:"system"`
ExchangeRates *ExchangeRates `mapstructure:"exchange_rates"`
}
type RPC ¶
type RPC struct {
Name string `mapstructure:"name"`
URL string `mapstructure:"url" validate:"url,required_with=Name"`
Label string `mapstructure:"label" validate:"required_with=Name"`
Interval uint `mapstructure:"interval"`
Contracts ContractAddresses `mapstructure:"contracts"`
TimeToMine *TimeToMine `mapstructure:"time_to_mine"`
Accounts []string `mapstructure:"accounts"`
}
RPC defines the various RPC providers that will be monitored.
type Runner ¶
type Runner struct {
Interval uint `mapstructure:"interval" validate:"required"`
}
Runner holds the config values that are needed to manage the job system.
type SensorNetwork ¶
type TimeToMine ¶
type TimeToMine struct {
Sender string `mapstructure:"sender" validate:"required"`
SenderPrivateKey string `mapstructure:"sender_private_key" validate:"required"`
Receiver string `mapstructure:"receiver" validate:"required"`
Value int64 `mapstructure:"value" validate:"required"`
Data string `mapstructure:"data"`
GasPriceFactor int64 `mapstructure:"gas_price_factor"`
GasLimit uint64 `mapstructure:"gas_limit" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.