Documentation ¶
Index ¶
- Constants
- Variables
- func CollectStdTxs(cdc *codec.Codec, moniker, genTxsDir string, genDoc tmtypes.GenesisDoc, ...) (appGenTxs []authtypes.StdTx, persistentPeers string, err error)
- func DeliverGenTxs(ctx sdk.Context, cdc *codec.Codec, genTxs []json.RawMessage, ...) []abci.ValidatorUpdate
- func GenAppStateFromConfig(cdc *codec.Codec, config *cfg.Config, initCfg InitConfig, ...) (appState json.RawMessage, err error)
- func InitGenesis(ctx sdk.Context, cdc *codec.Codec, stakingKeeper types.StakingKeeper, ...) []abci.ValidatorUpdate
- func NewAppModule(accountKeeper types.AccountKeeper, stakingKeeper types.StakingKeeper, ...) module.AppModule
- func ValidateAccountInGenesis(appGenesisState map[string]json.RawMessage, ...) error
- type AppModule
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(_ *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type GenesisAccountsIterator
- type GenesisState
- type InitConfig
Constants ¶
const (
ModuleName = types.ModuleName
)
const
Variables ¶
var ( // nolint ModuleCdc = types.ModuleCdc GenesisStateFromGenFile = sdkgenutil.GenesisStateFromGenFile NewGenesisState = sdkgenutil.NewGenesisState SetGenesisStateInAppState = sdkgenutil.SetGenesisStateInAppState InitializeNodeValidatorFiles = sdkgenutil.InitializeNodeValidatorFiles ExportGenesisFileWithTime = sdkgenutil.ExportGenesisFileWithTime NewInitConfig = sdkgenutil.NewInitConfig ValidateGenesis = types.ValidateGenesis GenesisStateFromGenDoc = sdkgenutil.GenesisStateFromGenDoc SetGenTxsInAppGenesisState = sdkgenutil.SetGenTxsInAppGenesisState ExportGenesisFile = sdkgenutil.ExportGenesisFile )
Functions ¶
func CollectStdTxs ¶
func CollectStdTxs(cdc *codec.Codec, moniker, genTxsDir string, genDoc tmtypes.GenesisDoc, genAccIterator types.GenesisAccountsIterator, ) (appGenTxs []authtypes.StdTx, persistentPeers string, err error)
CollectStdTxs processes and validates application's genesis StdTxs and returns the list of appGenTxs, and persistent peers required to generate genesis.json.
func DeliverGenTxs ¶
func DeliverGenTxs(ctx sdk.Context, cdc *codec.Codec, genTxs []json.RawMessage, stakingKeeper types.StakingKeeper, deliverTx deliverTxfn) []abci.ValidatorUpdate
DeliverGenTxs - deliver a genesis transaction
func GenAppStateFromConfig ¶
func GenAppStateFromConfig(cdc *codec.Codec, config *cfg.Config, initCfg InitConfig, genDoc tmtypes.GenesisDoc, genAccIterator types.GenesisAccountsIterator, ) (appState json.RawMessage, err error)
GenAppStateFromConfig gets the genesis app state from the config
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, cdc *codec.Codec, stakingKeeper types.StakingKeeper, deliverTx deliverTxfn, genesisState GenesisState) []abci.ValidatorUpdate
InitGenesis - initialize accounts and deliver genesis transactions
func NewAppModule ¶
func NewAppModule(accountKeeper types.AccountKeeper, stakingKeeper types.StakingKeeper, deliverTx deliverTxfn) module.AppModule
NewAppModule creates a new AppModule object
func ValidateAccountInGenesis ¶
func ValidateAccountInGenesis(appGenesisState map[string]json.RawMessage, genAccIterator types.GenesisAccountsIterator, key sdk.AccAddress, coins sdk.Coins, cdc *codec.Codec) error
ValidateAccountInGenesis checks that the provided key has sufficient coins in the genesis accounts
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule is the struct of this app module
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis exports the module genesis state
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis initializes the module genesis state
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic is the struct of app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns the default genesis state in json raw message
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis gives a quick validity check for module genesis
type GenesisAccountsIterator ¶
type GenesisAccountsIterator = sdkgenutiltypes.GenesisAccountsIterator
GenesisAccountsIterator is the type alias of the one in cmsdk
type GenesisState ¶
type GenesisState = types.GenesisState
GenesisState is the type alias of the one in cmsdk
type InitConfig ¶
type InitConfig = sdkgenutil.InitConfig
InitConfig is the type alias of the one in cmsdk