mapping

package
v0.0.0-...-25b3476 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const (
	DefaultParamspace = types.ModuleName
)

Default parameter namespace

Variables

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

func NewHandler(keeper Keeper) sdk.Handler

NewHandler returns a handler for token type messages.

func NewMappingProposalHandler

func NewMappingProposalHandler(k Keeper) govtypes.Handler

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamTable for staking module

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

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

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

module begin-block

func (AppModule) EndBlock

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) Name

func (AppModule) Name() string

module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

module querier route name

func (AppModule) RegisterInvariants

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

register invariants

func (AppModule) Route

func (AppModule) Route() string

module message route name

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) Name

func (AppModuleBasic) Name() string

module name

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

type GenesisState struct {
	Params types.Params `json:"params"`
}

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 (Keeper) CancelSwap

func (k Keeper) CancelSwap(ctx sdk.Context, fromCUAddr sdk.CUAddress, swapType int, orderID string) sdk.Result

func (Keeper) CreateDirectSwapOrder

func (k Keeper) CreateDirectSwapOrder(ctx sdk.Context, owner sdk.CUAddress, swapInfo DirectSwapInfo, orderID string) sdk.Result

func (Keeper) CreateFreeSwapOrder

func (k Keeper) CreateFreeSwapOrder(ctx sdk.Context, owner sdk.CUAddress, swapInfo FreeSwapInfo, orderID string) sdk.Result

func (Keeper) GetDirectSwapOrder

func (k Keeper) GetDirectSwapOrder(ctx sdk.Context, orderID string) *DirectSwapOrder

func (Keeper) GetDirectSwapOrderIterator

func (k Keeper) GetDirectSwapOrderIterator(ctx sdk.Context) sdk.Iterator

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 (k Keeper) GetFreeSwapOrderIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetFreeSwapOrders

func (k Keeper) GetFreeSwapOrders(ctx sdk.Context) []FreeSwapOrder

func (Keeper) GetIssueSymbolIterator

func (k Keeper) GetIssueSymbolIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetIssueSymbols

func (k Keeper) GetIssueSymbols(ctx sdk.Context) []sdk.Symbol

func (Keeper) GetMappingInfo

func (k Keeper) GetMappingInfo(ctx sdk.Context, issueSymbol sdk.Symbol) *MappingInfo

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

Get all parameteras as types.Params

func (Keeper) HasTargetSymbol

func (k Keeper) HasTargetSymbol(ctx sdk.Context, targetSymbol sdk.Symbol) bool

func (Keeper) IsSwapOrderExist

func (k Keeper) IsSwapOrderExist(ctx sdk.Context, OrderID string, swapType int) bool

func (Keeper) NewMappingFee

func (k Keeper) NewMappingFee(ctx sdk.Context) (res sdk.Int)

func (Keeper) SetMappingInfo

func (k Keeper) SetMappingInfo(ctx sdk.Context, mappingInfo *MappingInfo)

Set the entire MappingInfo

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

set the params

func (Keeper) SwapSymbol

func (k Keeper) SwapSymbol(ctx sdk.Context, fromCUAddr sdk.CUAddress, swapType int, orderID string, swapAmount sdk.Int) sdk.Result

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

type SwapPool

type SwapPool = types.SwapPool

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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