Documentation
¶
Index ¶
Constants ¶
const EyesCacheSize = 10000
nolint TODO: move to config file
const (
FlagLogLevel = "log_level"
)
nolint
Variables ¶
var ( FlagChainID = "chain-id" DockerMode = "docker" DockerNodeID = "docker-id" )
var InitCmd = GetInitCmd()
var (
PlayFlag = "play"
)
Functions ¶
func GetInitCmd ¶
func GetStartCmd ¶
GetStartCmd - initialize a command as the start command with tick
Types ¶
type BaseConfig ¶
type BaseConfig struct {
// The root directory for all data.
// This should be set in viper so it can unmarshal into this struct
RootDir string `mapstructure:"home"`
}
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
type EthermintConfig ¶
type EthermintConfig struct {
EthChainId uint `mapstructure:"eth_chain_id"`
RootDir string `mapstructure:"home"`
ABCIAddr string `mapstructure:"abci_laddr"`
ABCIProtocol string `mapstructure:"abci_protocol"`
RPCEnabledFlag bool `mapstructure:"rpc"`
RPCListenAddrFlag string `mapstructure:"rpcaddr"`
RPCPortFlag uint `mapstructure:"rpcport"`
RPCCORSDomainFlag string `mapstructure:"rpccorsdomain"`
RPCApiFlag string `mapstructure:"rpcapi"`
WSEnabledFlag bool `mapstructure:"ws"`
WSListenAddrFlag string `mapstructure:"wsaddr"`
WSPortFlag uint `mapstructure:"wsport"`
WSApiFlag string `mapstructure:"wsapi"`
VerbosityFlag uint `mapstructure:"verbosity"`
}
func DefaultEthermintConfig ¶
func DefaultEthermintConfig() EthermintConfig
type GenesisDoc ¶
type GenesisDoc struct {
GenesisTime time.Time `json:"genesis_time"`
ChainID string `json:"chain_id"`
ConsensusParams *types.ConsensusParams `json:"consensus_params,omitempty"`
Validators []GenesisValidator `json:"validators"`
AppHash data.Bytes `json:"app_hash"`
AppOptions interface{} `json:"app_options,omitempty"`
MaxVals uint16 `json:"max_vals"`
ReserveRequirementRatio string `json:"reserve_requirement_ratio"`
}
GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set.
func GenesisDocFromFile ¶
func GenesisDocFromFile(genDocFile string) (*GenesisDoc, error)
GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.
func GenesisDocFromJSON ¶
func GenesisDocFromJSON(jsonBlob []byte) (*GenesisDoc, error)
GenesisDocFromJSON unmarshalls JSON data into a GenesisDoc.
func (*GenesisDoc) SaveAs ¶
func (genDoc *GenesisDoc) SaveAs(file string) error
SaveAs is a utility method for saving GenensisDoc as a JSON file.
func (*GenesisDoc) ValidateAndComplete ¶
func (genDoc *GenesisDoc) ValidateAndComplete() error
ValidateAndComplete checks that all necessary fields are present and fills in defaults for optional fields left empty
func (*GenesisDoc) ValidatorHash ¶
func (genDoc *GenesisDoc) ValidatorHash() []byte
ValidatorHash returns the hash of the validator set contained in the GenesisDoc
type GenesisValidator ¶
type GenesisValidator struct {
PubKey crypto.PubKey `json:"pub_key"`
Power int64 `json:"power"`
Name string `json:"name"`
Address string `json:"address"`
Cut string `json:"cut"`
MaxAmount int64 `json:"max_amount"`
}
GenesisValidator is an initial validator.
type TestAccount ¶
type UltronConfig ¶
type UltronConfig struct {
BaseConfig BaseConfig `mapstructure:",squash"`
TMConfig tmcfg.Config `mapstructure:",squash"`
EMConfig EthermintConfig `mapstructure:"vm"`
}
func DefaultConfig ¶
func DefaultConfig() *UltronConfig
func ParseConfig ¶
func ParseConfig() (*UltronConfig, error)
ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists