config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Token       = "token"
	AccessKey   = "access_key"
	AccessKeyId = "access_key_id"

	AccountID   = "account_id"
	Username    = "username"
	Email       = "email"
	ProjectSlug = "project_slug"
	Provider    = "provider"

	OrganizationName = "org_name"

	Exports = "exports"

	Projects = "projects"
)

Variables

View Source
var DefaultChainConfig = &ChainConfig{
	HomesteadBlock:      0,
	EIP150Block:         0,
	EIP150Hash:          common.Hash{},
	EIP155Block:         0,
	EIP158Block:         0,
	ByzantiumBlock:      0,
	ConstantinopleBlock: 0,
	PetersburgBlock:     0,
	IstanbulBlock:       0,
	BerlinBlock:         0,
}
View Source
var GlobalConfigName string
View Source
var ProjectConfigName string
View Source
var ProjectDirectory string

Functions

func GetAccessKey added in v0.8.0

func GetAccessKey() string

func GetAccessKeyId added in v0.8.0

func GetAccessKeyId() string

func GetAccountId added in v0.8.0

func GetAccountId() string

func GetBool added in v0.1.5

func GetBool(key string) bool

func GetGlobalString added in v0.5.4

func GetGlobalString(key string) string

func GetString

func GetString(key string) string

func GetToken added in v0.1.5

func GetToken() string

func Init

func Init()

func IsLoggedIn added in v0.1.5

func IsLoggedIn() bool

func IsNetworkConfigured added in v0.6.0

func IsNetworkConfigured(network string) bool

func IsProjectInit added in v0.1.5

func IsProjectInit() bool

func MaybeGetMap added in v0.5.2

func MaybeGetMap(key string) map[string]interface{}

func MaybeGetString added in v0.2.5

func MaybeGetString(key string) string

func SetGlobalConfig added in v0.1.5

func SetGlobalConfig(key string, value interface{})

func SetProjectConfig added in v0.1.5

func SetProjectConfig(key string, value interface{})

func UnmarshalKey added in v0.6.0

func UnmarshalKey(key string, val interface{}) error

func WriteExportNetwork added in v0.6.0

func WriteExportNetwork(networkId string, network *ExportNetwork) error

func WriteGlobalConfig added in v0.1.5

func WriteGlobalConfig() error

func WriteProjectConfig added in v0.1.5

func WriteProjectConfig() error

Types

type BigInt added in v0.6.0

type BigInt interface{}

type ChainConfig added in v0.6.0

type ChainConfig struct {
	HomesteadBlock BigInt `mapstructure:"homestead_block,omitempty" yaml:"homestead_block,omitempty"`

	EIP150Block BigInt      `mapstructure:"eip150_block,omitempty" yaml:"eip150_block,omitempty"`
	EIP150Hash  common.Hash `mapstructure:"eip150_hash,omitempty" yaml:"eip150_hash,omitempty"`

	EIP155Block BigInt `mapstructure:"eip155_block,omitempty" yaml:"eip155_block,omitempty"`
	EIP158Block BigInt `mapstructure:"eip158_block,omitempty" yaml:"eip158_block,omitempty"`

	ByzantiumBlock      BigInt `mapstructure:"byzantium_block,omitempty" yaml:"byzantium_block,omitempty"`
	ConstantinopleBlock BigInt `mapstructure:"constantinople_block,omitempty" yaml:"constantinople_block,omitempty"`
	PetersburgBlock     BigInt `mapstructure:"petersburg_block,omitempty" yaml:"petersburg_block,omitempty"`
	IstanbulBlock       BigInt `mapstructure:"istanbul_block,omitempty" yaml:"istanbul_block,omitempty"`
	BerlinBlock         BigInt `mapstructure:"berlin_block,omitempty" yaml:"berlin_block,omitempty"`
	LondonBlock         BigInt `mapstructure:"london_block,omitempty" yaml:"london_block,omitempty"`
}

func (*ChainConfig) Config added in v0.6.0

func (c *ChainConfig) Config() (*params.ChainConfig, error)

type CliqueConfig added in v0.6.0

type CliqueConfig struct {
	Period uint64 `mapstructure:"period"`
	Epoch  uint64 `mapstructure:"epoch"`
}

type EthashConfig added in v0.6.0

type EthashConfig struct{}

type ExportNetwork added in v0.6.0

type ExportNetwork struct {
	Name          string              `mapstructure:"-"`
	ProjectSlug   string              `mapstructure:"project_slug"`
	RpcAddress    string              `mapstructure:"rpc_address"`
	Protocol      string              `mapstructure:"protocol"`
	ForkedNetwork string              `mapstructure:"forked_network"`
	ChainConfig   *params.ChainConfig `mapstructure:"chain_config"`
}

Jump to

Keyboard shortcuts

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