config

package
v0.0.0-...-2fb1a98 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Filename configuration file name.
	Filename string
	// App configuration struct
	App AppConfig
)

Functions

func Setup

func Setup(cmd *cobra.Command, _ []string) error

Setup bind command flags and environment variables

Types

type AppConfig

type AppConfig struct {
	Blockchain BlockchainConfig
	Contract   ContractConfig
}

type BlockchainConfig

type BlockchainConfig struct {
	Address    string `mapstructure:"address"`
	Ws         string `mapstructure:"ws"`
	PrivateKey string `mapstructure:"pk"`
	Timeout    string `mapstructure:"timeout"`
	TimeoutIn  time.Duration
}

type ContractConfig

type ContractConfig struct {
	Address   string `mapstructure:"address"`
	GasLimit  int64  `mapstructure:"gas_limit"`
	GasPrice  int64  `mapstructure:"gas_price"`
	WeiFounds int64  `mapstructure:"default_wei_founds"`
}

ContractConfig struct

Jump to

Keyboard shortcuts

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