dclgenutil

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (AppModule) ConsensusVersion() uint64

FIXME issue 99: review (differs from cosmos's v0.44.* version: 1) ConsensusVersion implements ConsensusVersion.

func (AppModule) EndBlock

EndBlock executes all ABCI EndBlock logic respective to the dclgenutil module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage

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.

func (AppModule) Name

func (am AppModule) Name() string

Name returns the dclgenutil module's name.

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(cdc *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

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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