v0_10

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "dex"

Variables

This section is empty.

Functions

This section is empty.

Types

type GenesisState

type GenesisState struct {
	Params        Params         `json:"params"`
	TokenPairs    []*TokenPair   `json:"token_pairs"`
	WithdrawInfos WithdrawInfos  `json:"withdraw_infos"`
	ProductLocks  ProductLockMap `json:"product_locks"`
}

GenesisState - all dex state that must be provided at genesis

type Params

type Params struct {
	ListFee              sdk.DecCoin `json:"list_fee"`
	TransferOwnershipFee sdk.DecCoin `json:"transfer_ownership_fee"`

	//  maximum period for okt holders to deposit on a dex delist proposal
	DelistMaxDepositPeriod time.Duration `json:"delist_max_deposit_period"`
	//  minimum deposit for a critical dex delist proposal to enter voting period
	DelistMinDeposit sdk.DecCoins `json:"delist_min_deposit"`
	//  length of the critical voting period for dex delist proposal
	DelistVotingPeriod time.Duration `json:"delist_voting_period"`

	WithdrawPeriod time.Duration `json:"withdraw_period"`
}

Params defines param object

type ProductLock

type ProductLock struct {
	BlockHeight  int64
	Price        sdk.Dec
	Quantity     sdk.Dec
	BuyExecuted  sdk.Dec
	SellExecuted sdk.Dec
}

type ProductLockMap

type ProductLockMap struct {
	Data map[string]*ProductLock
}

type TokenPair

type TokenPair struct {
	BaseAssetSymbol  string         `json:"base_asset_symbol"`
	QuoteAssetSymbol string         `json:"quote_asset_symbol"`
	InitPrice        sdk.Dec        `json:"price"`
	MaxPriceDigit    int64          `json:"max_price_digit"`
	MaxQuantityDigit int64          `json:"max_size_digit"`
	MinQuantity      sdk.Dec        `json:"min_trade_size"`
	ID               uint64         `json:"token_pair_id"`
	Delisting        bool           `json:"delisting"`
	Owner            sdk.AccAddress `json:"owner"`
	Deposits         sdk.DecCoin    `json:"deposits"`
	BlockHeight      int64          `json:"block_height"`
}

TokenPair represents token pair object

type WithdrawInfo

type WithdrawInfo struct {
	Owner        sdk.AccAddress `json:"owner"`
	Deposits     sdk.DecCoin    `json:"deposits"`
	CompleteTime time.Time      `json:"complete_time"`
}

WithdrawInfo represents infos for withdrawing

type WithdrawInfos

type WithdrawInfos []WithdrawInfo

WithdrawInfos defines list of WithdrawInfo

Jump to

Keyboard shortcuts

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