custombank

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = types.ModuleName
	StoreKey   = types.StoreKey
)

Variables

View Source
var (
	NewKeeper  = keeper.NewKeeper
	NewQuerier = keeper.NewQuerier

	ModuleCdc     = types.ModuleCdc
	RegisterCodec = types.RegisterCodec
)

Functions

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, genState GenesisState)

InitGenesis sets bank information for genesis.

func NewHandler

func NewHandler(h sdk.Handler, k Keeper, govKeeper government.Keeper) sdk.Handler

NewHandler returns a handler for "bank" type messages.

func ValidateGenesis

func ValidateGenesis(_ GenesisState) error

ValidateGenesis performs basic validation of genesis data returning an error for any failed validation criteria.

Types

type AppModule

type AppModule struct {
	cosmosbank.AppModule
	// contains filtered or unexported fields
}

AppModule implements an application module for the bank module.

func NewAppModule

func NewAppModule(appModule cosmosbank.AppModule, keeper keeper.Keeper, govKeeper government.Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

BeginBlock performs a no-op.

func (AppModule) EndBlock

EndBlock returns the end blocker for the bank module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the bank module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the bank module. It returns no validator updates.

func (AppModule) Name

func (am AppModule) Name() string

Name returns the bank module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the bank module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the bank module sdk.Querier.

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

QuerierRoute returns the bank module's querier route name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers the bank module invariants.

func (AppModule) Route

func (am AppModule) Route() string

Route returns the message routing key for the bank module.

type AppModuleBasic

type AppModuleBasic struct {
	cosmosbank.AppModuleBasic
}

AppModuleBasic defines the basic application module used by the bank module.

func NewAppModuleBasic

func NewAppModuleBasic(basic cosmosbank.AppModuleBasic) AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the bank module.

func (AppModuleBasic) GetQueryCmd

func (amb AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns no root query command for the bank module.

func (AppModuleBasic) GetTxCmd

func (amb AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the bank module.

func (AppModuleBasic) Name

func (amb AppModuleBasic) Name() string

Name returns the bank module's name.

func (AppModuleBasic) RegisterCodec

func (amb AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the bank module's types for the given codec.

func (AppModuleBasic) RegisterRESTRoutes

func (amb AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the bank module.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis performs genesis state validation for the bank module.

type GenesisState

type GenesisState struct {
	bank.GenesisState
	BlockedAccounts ctypes.Addresses `json:"blocked_accounts"`
}

GenesisState - bank genesis state

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState

ExportGenesis returns a GenesisState for a given context and keeper.

func (GenesisState) MarshalJSON added in v1.3.1

func (g GenesisState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. We do this because Amino does not respect the JSON stdlib embedding semantics.

type Keeper

type Keeper = keeper.Keeper

type MsgBlockAddressSend

type MsgBlockAddressSend = types.MsgBlockAccountSend

type MsgUnlockAddressSend

type MsgUnlockAddressSend = types.MsgUnlockAccountSend

Directories

Path Synopsis
client
internal

Jump to

Keyboard shortcuts

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