bank

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ModuleName      = "bank"
	Cdc             = txs.Cdc
	GetMapper       = mapper.GetMapper
	GetAccount      = mapper.GetAccount
	RegisterCodec   = txs.RegisterCodec
	NewGenesisState = types.NewGenesisState
	DefaultGenesis  = types.DefaultGenesisState
	ValidateGenesis = types.ValidateGenesis

	TxCommands    = client.TxCommands
	QueryCommands = client.QueryCommands

	NeedInvariantCheck = mapper.NeedInvariantCheck

	NewLockInfo = types.NewLockInfo
)

Functions

func EndBlocker

func EndBlocker(ctx context.Context, req abci.RequestEndBlock)

func ExportGenesis

func ExportGenesis(ctx context.Context) types.GenesisState

状态数据导出

func InitGenesis

func InitGenesis(ctx context.Context, data types.GenesisState)

func NewAppModule

func NewAppModule() types.AppModule

func ReleaseLockedAccount added in v0.0.8

func ReleaseLockedAccount(ctx context.Context, lockInfo LockInfo)

Types

type AppModule

type AppModule struct {
	AppModuleBasic
}

模块结构

func (AppModule) BeginBlock

App BeginBlocker 中执行操作

func (AppModule) EndBlock

App EndBlocker 中执行操作

func (AppModule) ExportGenesis

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

导出状态数据

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data json.RawMessage) []abci.ValidatorUpdate

初始化本模块

func (AppModule) RegisterInvariants

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

注册数据验证

func (AppModule) RegisterQuerier

func (am AppModule) RegisterQuerier(types.QueryRegistry)

返回本模块自定义应用查询路由信息

type AppModuleBasic

type AppModuleBasic struct{}

基础模块结构

func (AppModuleBasic) DefaultGenesis

func (amb AppModuleBasic) DefaultGenesis() json.RawMessage

默认初始状态数据

func (AppModuleBasic) GetMapperAndHooks

func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks

返回数据库操作 Mapper

func (AppModuleBasic) GetQueryCmds

func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command

返回查询命令集合

func (AppModuleBasic) GetTxCmds

func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command

返回交易命令集合

func (AppModuleBasic) Name

func (amb AppModuleBasic) Name() string

模块名

func (AppModuleBasic) RegisterCodec

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

amino 相关类/对象注册

func (AppModuleBasic) RegisterRestRoutes added in v0.0.8

func (amb AppModuleBasic) RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router)

func (AppModuleBasic) ValidateGenesis

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

校验初始状态数据

type GenesisState

type GenesisState = types.GenesisState

type LockInfo added in v0.0.8

type LockInfo = types.LockInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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