Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
- func NewHandler(keeper Keeper) sdk.Handler
- func NewMappingProposalHandler(k Keeper) govtypes.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func ParamKeyTable() params.KeyTable
- 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 (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir 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 DirectSwapInfo
- type DirectSwapOrder
- type FreeSwapInfo
- type FreeSwapOrder
- type GenesisState
- type Keeper
- func (k Keeper) CancelSwap(ctx sdk.Context, fromCUAddr sdk.CUAddress, swapType int, orderID string) sdk.Result
- func (k Keeper) CreateDirectSwapOrder(ctx sdk.Context, owner sdk.CUAddress, swapInfo DirectSwapInfo, orderID string) sdk.Result
- func (k Keeper) CreateFreeSwapOrder(ctx sdk.Context, owner sdk.CUAddress, swapInfo FreeSwapInfo, orderID string) sdk.Result
- func (k Keeper) GetDirectSwapOrder(ctx sdk.Context, orderID string) *DirectSwapOrder
- func (k Keeper) GetDirectSwapOrderIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetDirectSwapOrders(ctx sdk.Context) []DirectSwapOrder
- func (k Keeper) GetFreeSwapOrder(ctx sdk.Context, orderID string) *FreeSwapOrder
- func (k Keeper) GetFreeSwapOrderIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetFreeSwapOrders(ctx sdk.Context) []FreeSwapOrder
- func (k Keeper) GetIssueSymbolIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetIssueSymbols(ctx sdk.Context) []sdk.Symbol
- func (k Keeper) GetMappingInfo(ctx sdk.Context, issueSymbol sdk.Symbol) *MappingInfo
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) HasTargetSymbol(ctx sdk.Context, targetSymbol sdk.Symbol) bool
- func (k Keeper) IsSwapOrderExist(ctx sdk.Context, OrderID string, swapType int) bool
- func (k Keeper) NewMappingFee(ctx sdk.Context) (res sdk.Int)
- func (k Keeper) SetMappingInfo(ctx sdk.Context, mappingInfo *MappingInfo)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SwapSymbol(ctx sdk.Context, fromCUAddr sdk.CUAddress, swapType int, orderID string, ...) sdk.Result
- type MappingBalanceFlow
- type MappingInfo
- type MsgCancelSwap
- type MsgCreateDirectSwap
- type MsgCreateFreeSwap
- type MsgMappingSwap
- type MsgSwapSymbol
- type QueryDirectSwapOrderList
- type QueryDirectSwapOrderListParams
- type QueryDirectSwapOrderParams
- type QueryFreeSwapOrderList
- type QueryFreeSwapOrderListParams
- type QueryFreeSwapOrderParams
- type QueryMappingListParams
- type QueryMappingParams
- type QueryResMappingInfo
- type QueryResMappingList
- type SwapPool
Constants ¶
const ( DefaultCodespace = types.DefaultCodespace ModuleName = types.ModuleName RouterKey = types.RouterKey StoreKey = types.StoreKey QuerierRoute = types.QuerierRoute QueryInfo = types.QueryInfo QueryList = types.QueryList QueryFreeSwapInfo = types.QueryFreeSwapInfo QueryDirectSwapInfo = types.QueryDirectSwapInfo QueryFreeSwapList = types.QueryFreeSwapList QueryDirectSwapList = types.QueryDirectSwapList )
const (
DefaultParamspace = types.ModuleName
)
Default parameter namespace
Variables ¶
var ( ModuleCdc = types.ModuleCdc RegisterCodec = types.RegisterCodec NewMsgMappingSwap = types.NewMsgMappingSwap )
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
InitGenesis sets distribution information for genesis.
func NewHandler ¶
NewHandler returns a handler for token type messages.
func NewQuerier ¶
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
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 (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
register invariants
type AppModuleBasic ¶
type AppModuleBasic struct {
// contains filtered or unexported fields
}
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 DirectSwapInfo ¶
type DirectSwapInfo = types.DirectSwapInfo
type DirectSwapOrder ¶
type DirectSwapOrder = types.DirectSwapOrder
type FreeSwapInfo ¶
type FreeSwapInfo = types.FreeSwapInfo
type FreeSwapOrder ¶
type FreeSwapOrder = types.FreeSwapOrder
type GenesisState ¶
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(params types.Params) GenesisState
NewGenesisState creates a new genesis state.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper for mapping module
func NewKeeper ¶
func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec, tk internal.TokenKeeper, ck internal.CUKeeper, rk internal.ReceiptKeeper, trk internal.TransferKeeper, paramstore params.Subspace) Keeper
func (Keeper) CancelSwap ¶
func (Keeper) CreateDirectSwapOrder ¶
func (Keeper) CreateFreeSwapOrder ¶
func (Keeper) GetDirectSwapOrder ¶
func (k Keeper) GetDirectSwapOrder(ctx sdk.Context, orderID string) *DirectSwapOrder
func (Keeper) GetDirectSwapOrderIterator ¶
func (Keeper) GetDirectSwapOrders ¶
func (k Keeper) GetDirectSwapOrders(ctx sdk.Context) []DirectSwapOrder
func (Keeper) GetFreeSwapOrder ¶
func (k Keeper) GetFreeSwapOrder(ctx sdk.Context, orderID string) *FreeSwapOrder
func (Keeper) GetFreeSwapOrderIterator ¶
func (Keeper) GetFreeSwapOrders ¶
func (k Keeper) GetFreeSwapOrders(ctx sdk.Context) []FreeSwapOrder
func (Keeper) GetIssueSymbolIterator ¶
func (Keeper) GetMappingInfo ¶
func (Keeper) HasTargetSymbol ¶
func (Keeper) IsSwapOrderExist ¶
func (Keeper) SetMappingInfo ¶
func (k Keeper) SetMappingInfo(ctx sdk.Context, mappingInfo *MappingInfo)
Set the entire MappingInfo
type MappingBalanceFlow ¶
type MappingBalanceFlow = receipt.MappingBalanceFlow
type MappingInfo ¶
type MappingInfo = types.MappingInfo
type MsgCancelSwap ¶
type MsgCancelSwap = types.MsgCancelSwap
type MsgCreateDirectSwap ¶
type MsgCreateDirectSwap = types.MsgCreateDirectSwap
type MsgCreateFreeSwap ¶
type MsgCreateFreeSwap = types.MsgCreateFreeSwap
type MsgMappingSwap ¶
type MsgMappingSwap = types.MsgMappingSwap
type MsgSwapSymbol ¶
type MsgSwapSymbol = types.MsgSwapSymbol
type QueryDirectSwapOrderList ¶
type QueryDirectSwapOrderList = types.QueryDirectSwapOrderList
type QueryDirectSwapOrderListParams ¶
type QueryDirectSwapOrderListParams = types.QueryDirectSwapOrderListParams
type QueryDirectSwapOrderParams ¶
type QueryDirectSwapOrderParams = types.QueryDirectSwapOrderParams
type QueryFreeSwapOrderList ¶
type QueryFreeSwapOrderList = types.QueryFreeSwapOrderList
type QueryFreeSwapOrderListParams ¶
type QueryFreeSwapOrderListParams = types.QueryFreeSwapOrderListParams
type QueryFreeSwapOrderParams ¶
type QueryFreeSwapOrderParams = types.QueryFreeSwapOrderParams
type QueryMappingListParams ¶
type QueryMappingListParams = types.QueryMappingListParams
type QueryMappingParams ¶
type QueryMappingParams = types.QueryMappingParams
type QueryResMappingInfo ¶
type QueryResMappingInfo = types.QueryResMappingInfo
type QueryResMappingList ¶
type QueryResMappingList = types.QueryResMappingList