config

package
v0.0.0-...-7dc920d Latest Latest
Warning

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

Go to latest
Published: May 31, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHomeDir

func GetHomeDir(defaultHome string) string

func Log

func Log() log.Logger

Types

type Config

type Config struct {
	IFile  string `yaml:"-"`
	OFile  string `yaml:"-"`
	PassWD string `yaml:"-"`

	EthAddr        string     `yaml:"eth_addr"`
	Nonce          uint64     `yaml:"nonce"`
	KeystoreDir    string     `yaml:"keystore"`
	Passphrase     string     `yaml:"passphrase"`
	AccountAddress string     `yaml:"account_address"`
	GasLimit       int        `yaml:"gas_limit"`
	Gasprice       int        `yaml:"gas_price"`
	ChainId        int        `yaml:"chain_id"`
	Contracts      []Contract `yaml:"contracts"`
	// contains filtered or unexported fields
}

func GetCfg

func GetCfg() *Config

func NewCfg

func NewCfg(defaultHomeDir string) *Config

func (*Config) Dumps

func (c *Config) Dumps()

func (*Config) GetEthClient

func (c *Config) GetEthClient() *ethclient.Client

func (*Config) GetNodeAccount

func (c *Config) GetNodeAccount() *accounts.Account

func (*Config) GetNodeKeyStore

func (c *Config) GetNodeKeyStore() *keystore.KeyStore

func (*Config) GetNonce

func (c *Config) GetNonce() uint64

func (*Config) InitEthClient

func (c *Config) InitEthClient()

func (*Config) InitLog

func (t *Config) InitLog()

func (*Config) InitNode

func (c *Config) InitNode()

func (*Config) LoadConfig

func (c *Config) LoadConfig()

type Contract

type Contract struct {
	Name    string `yaml:"name"`
	Address string `yaml:"address"`
	Abi     string `yaml:"abi"`
	Byc     string `yaml:"byc"`
}

Jump to

Keyboard shortcuts

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