Documentation ¶
Index ¶
- Variables
- func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker string, ...) (appGenTxs []sdk.Tx, persistentPeers string, err error)
- func DeliverGenTxs(ctx sdk.Context, genTxs []json.RawMessage, ...) ([]abci.ValidatorUpdate, error)
- func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, ...) (appState json.RawMessage, err error)
- func InitGenesis(ctx sdk.Context, validatorKeeper types.ValidatorKeeper, deliverTx deliverTxfn, ...) (validators []abci.ValidatorUpdate, err error)
- func NewAppModule(accountKeeper types.AccountKeeper, validatorKeeper types.ValidatorKeeper, ...) module.AppModule
- func SetGenTxsInAppGenesisState(cdc codec.JSONCodec, txJSONEncoder sdk.TxEncoder, ...) (map[string]json.RawMessage, error)
- func ValidateAccountInGenesis(appGenesisState map[string]json.RawMessage, ...) error
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) Name() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
- func (a AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, ...) error
- type InitConfig
Constants ¶
This section is empty.
Variables ¶
var ( // functions aliases. ExportGenesisFile = cosmosgenutil.ExportGenesisFile ExportGenesisFileWithTime = cosmosgenutil.ExportGenesisFileWithTime NewInitConfig = cosmosgenutiltypes.NewInitConfig InitializeNodeValidatorFiles = cosmosgenutil.InitializeNodeValidatorFiles InitializeNodeValidatorFilesFromMnemonic = cosmosgenutil.InitializeNodeValidatorFilesFromMnemonic )
Functions ¶
func CollectTxs ¶
func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker string, genTxsDir string, genDoc tmtypes.GenesisDoc, genAccIterator dclauthtypes.GenesisAccountsIterator, ) (appGenTxs []sdk.Tx, persistentPeers string, err error)
CollectTxs processes and validates application's genesis Txs and returns the list of appGenTxs, and persistent peers required to generate genesis.json.
func DeliverGenTxs ¶
func DeliverGenTxs( ctx sdk.Context, genTxs []json.RawMessage, validatorKeeper types.ValidatorKeeper, deliverTx deliverTxfn, txEncodingConfig client.TxEncodingConfig, ) ([]abci.ValidatorUpdate, error)
DeliverGenTxs iterates over all genesis txs, decodes each into a Tx and invokes the provided deliverTxfn with the decoded Tx. It returns the result of the validator module's ApplyAndReturnValidatorSetUpdates.
func GenAppStateFromConfig ¶
func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, config *cfg.Config, initCfg types.InitConfig, genDoc tmtypes.GenesisDoc, genAccIterator dclauthtypes.GenesisAccountsIterator, ) (appState json.RawMessage, err error)
GenAppStateFromConfig gets the genesis app state from the config.
func InitGenesis ¶
func InitGenesis( ctx sdk.Context, validatorKeeper types.ValidatorKeeper, deliverTx deliverTxfn, genesisState types.GenesisState, txEncodingConfig client.TxEncodingConfig, ) (validators []abci.ValidatorUpdate, err error)
InitGenesis - initialize accounts and deliver genesis transactions.
func NewAppModule ¶
func NewAppModule(accountKeeper types.AccountKeeper, validatorKeeper types.ValidatorKeeper, deliverTx deliverTxfn, txEncodingConfig client.TxEncodingConfig, ) module.AppModule
NewAppModule creates a new AppModule object.
func SetGenTxsInAppGenesisState ¶
func SetGenTxsInAppGenesisState( cdc codec.JSONCodec, txJSONEncoder sdk.TxEncoder, appGenesisState map[string]json.RawMessage, genTxs []sdk.Tx, ) (map[string]json.RawMessage, error)
SetGenTxsInAppGenesisState - sets the genesis transactions in the app genesis state.
func ValidateAccountInGenesis ¶
func ValidateAccountInGenesis( appGenesisState map[string]json.RawMessage, genAccIterator dclauthtypes.GenesisAccountsIterator, addr sdk.Address, cdc codec.JSONCodec, ) error
ValidateAccountInGenesis checks that the provided account is presented in the set of genesis accounts.
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements the AppModule interface for the dclgenutil module.
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock executes all ABCI BeginBlock logic respective to the dclgenutil module.
func (AppModule) ConsensusVersion ¶
FIXME issue 99: review (differs from cosmos's v0.44.* version: 1) ConsensusVersion implements ConsensusVersion.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock executes all ABCI EndBlock logic respective to the dclgenutil module. It returns no validator updates.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the dclgenutil module's exported genesis state as raw JSON bytes.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs the dclgenutil module's genesis initialization It returns no validator updates.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic implements the AppModuleBasic interface for the dclgenutil module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns the dclgenutil module's default genesis state.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns the dclgenutil module's root query command.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns the dclgenutil module's root tx command.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the dclgenutil module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterInterfaces ¶
func (a AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interface types.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
RegisterRESTRoutes registers the dclgenutil module's REST service handlers.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the dclgenutil module.
type InitConfig ¶
type InitConfig = cosmosgenutiltypes.InitConfig