Documentation ¶
Index ¶
- Constants
- func NewApp() *cli.App
- func NewDBFromContext(c *cli.Context) (*sqlx.DB, error)
- func NewEthereumClientFromFlag(c *cli.Context) (*ethclient.Client, error)
- func NewEthereumNodeFlags() cli.Flag
- func NewLogger(c *cli.Context) (*zap.Logger, error)
- func NewPostgreSQLFlags(defaultDB string) []cli.Flag
- func ParseBigIntFlag(c *cli.Context, flag string) (*big.Int, error)
- func Validate(c *cli.Context) error
- type Address
Constants ¶
const Flag = "deployment"
Flag is the cli flag of deployment.
const (
//InfuraEndpoint is url for infura node
InfuraEndpoint = "https://mainnet.infura.io"
)
Variables ¶
This section is empty.
Functions ¶
func NewDBFromContext ¶
NewDBFromContext creates a DB instance from cli flags configuration.
func NewEthereumClientFromFlag ¶
NewEthereumClientFromFlag returns Ethereum client from flag variable, or error if occurs
func NewEthereumNodeFlags ¶
NewEthereumNodeFlags returns cli flag for ethereum node url input
func NewLogger ¶
NewLogger creates a new logger instance. The type of logger instance will be different with different application running modes.
func NewPostgreSQLFlags ¶
NewPostgreSQLFlags creates new cli flags for PostgreSQL client.
func ParseBigIntFlag ¶
ParseBigIntFlag get big.Int value from a flag
Types ¶
type Address ¶
type Address map[deployment.Deployment][]common.Address
Address is a wrapper of ethereum common Address that supports multiple deployments.
func NewAddress ¶
NewAddress returns an Address instance. Address of all deployments should be present.
func NewCrossDeploymentAddress ¶
NewCrossDeploymentAddress returns an Address with given same address for all deployments.
func (Address) MustGetFromContext ¶
MustGetFromContext returns the common address for given deployment from context.