cfg

package
v0.0.0-...-1b15b10 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigPath = "./config.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Chains []RawChainConfig `json:"chains"`
}

func GetConfig

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

func NewConfig

func NewConfig() *Config

func (*Config) ToJSON

func (c *Config) ToJSON(file string) *os.File

type RawChainConfig

type RawChainConfig struct {
	Name     string            `json:"name"`
	Type     string            `json:"type"`
	Id       string            `json:"id"`       // ChainID
	Endpoint string            `json:"endpoint"` // url for rpc endpoint
	From     string            `json:"from"`     // address of key to use
	Opts     map[string]string `json:"opts"`
}

RawChainConfig is parsed directly from the config file and should be using to construct the core.ChainConfig

Jump to

Keyboard shortcuts

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