Documentation ¶
Index ¶
- Constants
- Variables
- func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)
- func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error
- func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error)
- func GenesisStateFromGenFile(cdc *codec.Codec, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)
- func GetRDB(stateDB string, logger log.Logger) (db dbm.DB, err error)
- func SetupContext(ctx *Context, level string) error
- type AppCreator
- type AppCreatorInit
- type AppExporter
- type AppExporterInit
- type AppGenTx
- type AppInit
- type Chain
- func (c *Chain) BeginBlocker(ctx types.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (c *Chain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (c *Chain) ExportAppStateJSON() (json.RawMessage, []types.GenesisValidator, error)
- func (app *Chain) GetSubspace(moduleName string) params.Subspace
- func (c *Chain) InitChainer(ctx sdk.Context, req tmabci.RequestInitChain) tmabci.ResponseInitChain
- type Context
- type GenesisState
- type GenesisTx
Constants ¶
View Source
const ( INITCHAINKEY = "isInitChain" FIRSTSHARD = "1" )
Variables ¶
View Source
var ( // default home directories for expected binaries MainStoreKey = sdk.NewKVStoreKey("main") ContractStoreKey = sdk.NewKVStoreKey("contract") TxIndexStoreKey = sdk.NewTransientStoreKey("tx_index") AccountStoreKey = sdk.NewKVStoreKey(account.StoreKey) ParamStoreKey = sdk.NewKVStoreKey(params.StoreKey) ParamTransStoreKey = sdk.NewTransientStoreKey(params.TStoreKey) AuthStoreKey = sdk.NewKVStoreKey(auth.StoreKey) SupplyStoreKey = sdk.NewKVStoreKey(supply.StoreKey) OrderStoreKey = sdk.NewKVStoreKey(order.StoreKey) IBCStoreKey = sdk.NewKVStoreKey(ibchost.StoreKey) DisrtStoreKey = sdk.NewKVStoreKey(k.DisrtKey) StakingStoreKey = sdk.NewKVStoreKey(staking.StoreKey) SlashingStoreKey = sdk.NewKVStoreKey(slashing.StoreKey) GravityStoreKey = sdk.NewKVStoreKey(gravity.StoreKey) WasmStoreKey = sdk.NewKVStoreKey(vm.StoreKey) MintStoreKey = sdk.NewKVStoreKey(mint.StoreKey) InfrastructureStoreKey = sdk.NewKVStoreKey(infrastructure.StoreKey) IbcTransferStoreKey = sdk.NewKVStoreKey(ibctransfertypes.StoreKey) CapabilityStoreKey = sdk.NewKVStoreKey(capabilitytypes.StoreKey) )
Functions ¶
func AppGenStateJSON ¶
func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)
func ExportGenesisFile ¶
func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error
func GenesisStateFromGenDoc ¶
func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, ) (genesisState map[string]json.RawMessage, err error)
func GenesisStateFromGenFile ¶
func GenesisStateFromGenFile(cdc *codec.Codec, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)
func SetupContext ¶
Types ¶
type AppCreator ¶
type AppCreator func(home string, logger log.Logger, statedb, traceStore string) (sdk.Application, error)
func ConstructAppCreator ¶
func ConstructAppCreator(appFn AppCreatorInit, name string) AppCreator
type AppCreatorInit ¶
type AppExporter ¶
type AppExporter func(home string, logger log.Logger, statedb, traceStore string) (json.RawMessage, []tmtypes.GenesisValidator, error)
func ConstructAppExporter ¶
func ConstructAppExporter(appFn AppExporterInit, name string) AppExporter
type AppExporterInit ¶
type AppGenTx ¶
type AppGenTx struct { // currently takes address as string because unmarshaling Ether address fails Address string `json:"address"` }
type AppInit ¶
type AppInit struct { // AppGenState creates the collactor parameters initialization. It takes in a // pubkey meant to represent the pubkey of the validator of this machine. AppGenState func(validators []types.GenesisValidator) (appState json.RawMessage, err error) GetValidator func(pk crypto.PubKey, name string) types.GenesisValidator }
Core functionality passed from the application to the server init command
func NewAppInit ¶
func NewAppInit() AppInit
type Chain ¶
func (*Chain) BeginBlocker ¶
func (c *Chain) BeginBlocker(ctx types.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
func (*Chain) EndBlocker ¶
func (c *Chain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
func (*Chain) ExportAppStateJSON ¶
func (c *Chain) ExportAppStateJSON() (json.RawMessage, []types.GenesisValidator, error)
func (*Chain) GetSubspace ¶
NOTE: This is solely to be used for testing purposes.
func (*Chain) InitChainer ¶
func (c *Chain) InitChainer(ctx sdk.Context, req tmabci.RequestInitChain) tmabci.ResponseInitChain
type Context ¶
func NewDefaultContext ¶
func NewDefaultContext() *Context
type GenesisState ¶
type GenesisState map[string]json.RawMessage
type GenesisTx ¶
type GenesisTx struct { NodeID string `json:"node_id"` IP string `json:"ip"` Validator types.GenesisValidator `json:"validator"` AppGenTx json.RawMessage `json:"app_gen_tx"` }
simple genesis tx
Source Files ¶
Click to show internal directories.
Click to hide internal directories.