dex

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

nolint aliases generated for the following subdirectories: ALIASGEN: github.com/zenchainprotocol/zenchain-node/x/dex/keeper ALIASGEN: github.com/zenchainprotocol/zenchain-node/x/dex/types

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	DefaultCodespace  = types.DefaultCodespace
	DefaultParamspace = types.DefaultParamspace
	TokenPairStoreKey = types.TokenPairStoreKey
	QuerierRoute      = types.QuerierRoute
	RouterKey         = types.RouterKey
	StoreKey          = types.StoreKey

	DefaultMaxPriceDigitSize    = types.DefaultMaxPriceDigitSize
	DefaultMaxQuantityDigitSize = types.DefaultMaxQuantityDigitSize

	AuthFeeCollector = auth.FeeCollectorName
)

Variables

View Source
var (
	ModuleCdc               = types.ModuleCdc
	DefaultTokenPairDeposit = types.DefaultTokenPairDeposit

	RegisterCodec       = types.RegisterCodec
	NewQuerier          = keeper.NewQuerier
	NewKeeper           = keeper.NewKeeper
	GetBuiltInTokenPair = keeper.GetBuiltInTokenPair
	DefaultParams       = types.DefaultParams

	NewMsgList     = types.NewMsgList
	NewMsgDeposit  = types.NewMsgDeposit
	NewMsgWithdraw = types.NewMsgWithdraw

	ErrTokenPairNotFound = types.ErrTokenPairNotFound
)

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, k IKeeper)

EndBlocker called every block

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper IKeeper, data GenesisState)

InitGenesis initialize default parameters and the keeper's address to pubkey map

func NewHandler

func NewHandler(k IKeeper) sdk.Handler

NewHandler handles all "dex" type messages.

func NewProposalHandler

func NewProposalHandler(k *Keeper) govTypes.Handler

NewProposalHandler handles "gov" type message in "dex"

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the slashing genesis parameters

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule represents app module

func NewAppModule

func NewAppModule(version ProtocolVersionType, keeper IKeeper, supplyKeeper SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

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

BeginBlock returns module begin-block

func (AppModule) EndBlock

EndBlock returns module end-block

func (AppModule) ExportGenesis

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

ExportGenesis exports module genesis

func (AppModule) InitGenesis

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

InitGenesis inits module genesis

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns module querier route name

func (AppModule) RegisterInvariants

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

RegisterInvariants registers invariants

func (AppModule) Route

func (AppModule) Route() string

Route returns module message route name

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic represents a app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state

func (AppModuleBasic) GetQueryCmd

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

GetQueryCmd returns the root query command of this module

func (AppModuleBasic) GetTxCmd

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

GetTxCmd returns the root tx command of this module

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns module name

func (AppModuleBasic) RegisterCodec

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

RegisterCodec registers module codec

func (AppModuleBasic) RegisterRESTRoutes

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

RegisterRESTRoutes registers rest routes

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis validates genesis

type BankKeeper

type BankKeeper = keeper.BankKeeper

type DEXOperator

type DEXOperator = types.DEXOperator

type DEXOperators

type DEXOperators = types.DEXOperators

type GenesisState

type GenesisState struct {
	Params         Params                    `json:"params"`
	TokenPairs     []*TokenPair              `json:"token_pairs"`
	WithdrawInfos  WithdrawInfos             `json:"withdraw_infos"`
	ProductLocks   ordertypes.ProductLockMap `json:"product_locks"`
	Operators      DEXOperators              `json:"operators"`
	MaxTokenPairID uint64                    `json:"max_token_pair_id" yaml:"max_token_pair_id"`
}

GenesisState - all dex state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - default GenesisState used by Cosmos Hub TODO: check how the added params' influence export facility

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper IKeeper) (data GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

type IKeeper

type IKeeper = keeper.IKeeper

type Keeper

type Keeper = keeper.Keeper

Keepers

type MsgConfirmOwnership

type MsgConfirmOwnership = types.MsgConfirmOwnership

type MsgCreateOperator

type MsgCreateOperator = types.MsgCreateOperator

type MsgDeposit

type MsgDeposit = types.MsgDeposit

type MsgList

type MsgList = types.MsgList

Messages

type MsgTransferOwnership

type MsgTransferOwnership = types.MsgTransferOwnership

type MsgUpdateOperator

type MsgUpdateOperator = types.MsgUpdateOperator

type MsgWithdraw

type MsgWithdraw = types.MsgWithdraw

type Params

type Params = types.Params

type ProtocolVersionType

type ProtocolVersionType = version.ProtocolVersionType

type StakingKeeper

type StakingKeeper = keeper.StakingKeeper

type StreamKeeper

type StreamKeeper = keeper.StreamKeeper

type SupplyKeeper

type SupplyKeeper = keeper.SupplyKeeper

type TokenKeeper

type TokenKeeper = keeper.TokenKeeper

type TokenPair

type TokenPair = types.TokenPair

type WithdrawInfo

type WithdrawInfo = types.WithdrawInfo

type WithdrawInfos

type WithdrawInfos = types.WithdrawInfos

Directories

Path Synopsis
cli
legacy

Jump to

Keyboard shortcuts

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