Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func NewQuerier(keeper Keeper) sdk.Querier
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type GenesisState
- type IBCAssetKeeperI
- type Keeper
- func (keeper Keeper) DelDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, ...)
- func (keeper Keeper) GetCUIBCAsset(context sdk.Context, addr sdk.CUAddress) exported.CUIBCAsset
- func (keeper Keeper) GetDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, ...) sdk.DepositItem
- func (keeper Keeper) GetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress) sdk.DepositList
- func (keeper Keeper) GetDepositListByHash(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string) sdk.DepositList
- func (keeper Keeper) GetOpCUsAstInfo(ctx sdk.Context, symbol string) []sdk.OpCUAstInfo
- func (keeper Keeper) GetOrNewCUIBCAsset(context sdk.Context, cuType sdk.CUType, addr sdk.CUAddress) exported.CUIBCAsset
- func (keeper Keeper) GetPendingDepositList(ctx sdk.Context, address sdk.CUAddress) map[string]sdk.DepositList
- func (ck Keeper) Hooks() hooks
- func (keeper Keeper) IsDepositExist(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, ...) bool
- func (keeper Keeper) IterateCUAssets(ctx sdk.Context, process func(asset exported.CUIBCAsset) (stop bool))
- func (keeper Keeper) Logger(ctx sdk.Context) log.Logger
- func (keeper Keeper) NewCUIBCAssetWithAddress(ctx sdk.Context, cuType sdk.CUType, address sdk.CUAddress) exported.CUIBCAsset
- func (keeper Keeper) SaveDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, ...) error
- func (keeper Keeper) SetCUIBCAsset(ctx sdk.Context, cuAst exported.CUIBCAsset)
- func (keeper Keeper) SetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress, list sdk.DepositList)
- func (keeper Keeper) SetDepositStatus(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, ...) error
Constants ¶
const ( ModuleName = types.ModuleName StoreKey = types.StoreKey FeeCollectorName = types.FeeCollectorName QuerierRoute = types.QuerierRoute DefaultParamspace = types.DefaultParamspace )
Variables ¶
var ( // variable aliases ModuleCdc = types.ModuleCdc ProtoBaseCUIBCAsset = types.ProtoBaseCUIBCAsset RegisterCodec = types.RegisterCodec )
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
InitGenesis sets distribution information for genesis.
func NewQuerier ¶
creates a querier for auth REST endpoints
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis performs basic validation of bank genesis data returning an error for any failed validation criteria.
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
___________________________ app module object
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
module begin-block
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
module init-genesis
func (AppModule) NewQuerierHandler ¶
module querier
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
register invariants
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
default genesis state
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
get the root tx command of this module
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
register module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
register rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
module validate genesis
type GenesisState ¶
type GenesisState struct { }
GenesisState is the bank state that must be provided at genesis.
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 NewGenesisState ¶
func NewGenesisState() GenesisState
NewGenesisState creates a new genesis state.
type IBCAssetKeeperI ¶
type IBCAssetKeeperI interface { // CU functions NewCUIBCAssetWithAddress(ctx sdk.Context, cuType sdk.CUType, cuaddr sdk.CUAddress) exported.CUIBCAsset GetCUIBCAsset(context sdk.Context, addresses sdk.CUAddress) exported.CUIBCAsset GetOrNewCUIBCAsset(context sdk.Context, cuType sdk.CUType, addresses sdk.CUAddress) exported.CUIBCAsset SetCUIBCAsset(ctx sdk.Context, cu exported.CUIBCAsset) Logger(ctx sdk.Context) log.Logger GetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress) sdk.DepositList GetDepositListByHash(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string) sdk.DepositList SetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress, list sdk.DepositList) SaveDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, deposit sdk.DepositItem) error DelDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) SetDepositStatus(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64, status sdk.DepositItemStatus) error GetDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) sdk.DepositItem IsDepositExist(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) bool }
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper encodes/decodes CUs using the go-amino (binary) encoding/decoding library.
func NewKeeper ¶
func NewKeeper( cdc *codec.Codec, key sdk.StoreKey, ck internal.CUKeeper, tk internal.TokenKeeper, proto func() exported.CUIBCAsset) Keeper
NewKeeper returns a new Keeper that uses go-amino to (binary) encode and decode concrete sdk.CustodianUnits. nolint
func (Keeper) DelDeposit ¶
func (keeper Keeper) DelDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64)
DelDeposit delete deposit item from store
func (Keeper) GetCUIBCAsset ¶
func (Keeper) GetDeposit ¶
func (keeper Keeper) GetDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) sdk.DepositItem
GetDeposit get deposit item from store
func (Keeper) GetDepositList ¶
func (keeper Keeper) GetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress) sdk.DepositList
---------------------------------------------------------------------- DepositList funcs
func (Keeper) GetDepositListByHash ¶
func (Keeper) GetOpCUsAstInfo ¶
GetOpCUsAstInfo returns all operation custodian units and depositList of the symbol. if symbol empty ,return all operation custodian units and depositList.
func (Keeper) GetOrNewCUIBCAsset ¶
func (Keeper) GetPendingDepositList ¶
func (Keeper) IsDepositExist ¶
func (Keeper) IterateCUAssets ¶
func (keeper Keeper) IterateCUAssets(ctx sdk.Context, process func(asset exported.CUIBCAsset) (stop bool))
IterateCUs implements sdk.Keeper.
func (Keeper) NewCUIBCAssetWithAddress ¶
func (Keeper) SaveDeposit ¶
func (keeper Keeper) SaveDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, depositItem sdk.DepositItem) error
SaveDeposit save deposit item to store
func (Keeper) SetCUIBCAsset ¶
func (keeper Keeper) SetCUIBCAsset(ctx sdk.Context, cuAst exported.CUIBCAsset)
SetCU implements sdk.Keeper.