config

package
v0.0.0-...-28ca4d1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package config contains the config types.

Index

Constants

This section is empty.

Variables

View Source
var (
	/* Required Flags */
	ConfigFileFlag = cli.StringFlag{
		Name:     "config",
		Required: true,
		Usage:    "Load configuration from `FILE`",
	}
	CredibleSquaringDeploymentFileFlag = cli.StringFlag{
		Name:     "credible-squaring-deployment",
		Required: true,
		Usage:    "Load credible squaring contract addresses from `FILE`",
	}
	EcdsaPrivateKeyFlag = cli.StringFlag{
		Name:     "ecdsa-private-key",
		Usage:    "Ethereum private key",
		Required: true,
		EnvVar:   "ECDSA_PRIVATE_KEY",
	}
)
View Source
var Flags []cli.Flag

Flags contains the list of configuration options available to the binary.

Functions

This section is empty.

Types

type Config

type Config struct {
	EcdsaPrivateKey           *ecdsa.PrivateKey
	BlsPrivateKey             *bls.PrivateKey
	Logger                    sdklogging.Logger
	EigenMetricsIPPortAddress string
	// we need the url for the eigensdk currently... eventually standardize api so as to
	// only take an ethclient or an rpcUrl (and build the ethclient at each constructor site)
	EthHTTPRPCURL                             string
	EthHTTPClient                             eth.EthClient
	OperatorStateRetrieverAddr                common.Address
	IncredibleSquaringRegistryCoordinatorAddr common.Address
	AggregatorServerIPPortAddr                string
	RegisterOperatorOnStartup                 bool
	// json:"-" skips this field when marshaling (only used for logging to stdout), since SignerFn doesnt implement marshalJson
	SignerFn          signerv2.SignerFn `json:"-"`
	TxMgr             txmgr.TxManager
	AggregatorAddress common.Address
}

Config contains all of the configuration information for a credible squaring aggregators and challengers. Operators use a separate config. (see config-files/operator.anvil.yaml)

func NewConfig

func NewConfig(ctx *cli.Context) (*Config, error)

NewConfig parses config file to read from from flags or environment variables Note: This config is shared by challenger and aggregator and so we put in the core. Operator has a different config and is meant to be used by the operator CLI.

type ConfigRaw

type ConfigRaw struct {
	Environment                sdklogging.LogLevel `yaml:"environment"`
	EthRPCURL                  string              `yaml:"eth_rpc_url"`
	AggregatorServerIPPortAddr string              `yaml:"aggregator_server_ip_port_address"`
	RegisterOperatorOnStartup  bool                `yaml:"register_operator_on_startup"`
}

ConfigRaw These are read from ConfigFileFlag

type IncredibleSquaringContractsRaw

type IncredibleSquaringContractsRaw struct {
	RegistryCoordinatorAddr    string `json:"registryCoordinator"`
	OperatorStateRetrieverAddr string `json:"operatorStateRetriever"`
}

type IncredibleSquaringDeploymentRaw

type IncredibleSquaringDeploymentRaw struct {
	Addresses IncredibleSquaringContractsRaw `json:"addresses"`
}

IncredibleSquaringDeploymentRaw These are read from CredibleSquaringDeploymentFileFlag

Jump to

Keyboard shortcuts

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