dex

package
v0.1.429-bweng-test-1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CtxKeyExecTermSignal    = CtxKeyType("execution-termination-signals")
	CtxKeyExecutingContract = CtxKeyType("executing-contract")
)
View Source
const SynchronizationTimeoutInSeconds = 5

Variables

This section is empty.

Functions

func DeepDelete

func DeepDelete(kvStore sdk.KVStore, storePrefix []byte, matcher func([]byte) bool)

func GetExecutingContract

func GetExecutingContract(ctx sdk.Context) *types.ContractInfoV2

func GetTerminationSignals

func GetTerminationSignals(ctx sdk.Context) *datastructures.TypedSyncMap[string, chan struct{}]

Types

type BlockCancellations

type BlockCancellations struct {
	// contains filtered or unexported fields
}

func NewCancels

func NewCancels(cancelStore prefix.Store) *BlockCancellations

func (*BlockCancellations) Add

func (o *BlockCancellations) Add(newItem *types.Cancellation)

func (*BlockCancellations) Get

func (o *BlockCancellations) Get() (list []*types.Cancellation)

func (*BlockCancellations) GetIdsToCancel

func (o *BlockCancellations) GetIdsToCancel() (list []uint64)

func (*BlockCancellations) Has

func (o *BlockCancellations) Has(cancel *types.Cancellation) bool

type BlockOrders

type BlockOrders struct {
	// contains filtered or unexported fields
}

func NewOrders

func NewOrders(orderStore prefix.Store) *BlockOrders

func (*BlockOrders) Add

func (o *BlockOrders) Add(newItem *types.Order)

func (*BlockOrders) Get

func (o *BlockOrders) Get() (list []*types.Order)

func (*BlockOrders) GetByID

func (o *BlockOrders) GetByID(id uint64) *types.Order

func (*BlockOrders) GetLimitOrders

func (o *BlockOrders) GetLimitOrders(direction types.PositionDirection) []*types.Order

func (*BlockOrders) GetSortedMarketOrders

func (o *BlockOrders) GetSortedMarketOrders(direction types.PositionDirection, includeLiquidationOrders bool) []*types.Order

func (*BlockOrders) GetTriggeredOrders

func (o *BlockOrders) GetTriggeredOrders() []*types.Order

func (*BlockOrders) MarkFailedToPlace

func (o *BlockOrders) MarkFailedToPlace(failedOrders []wasm.UnsuccessfulOrder)

type CtxKeyType

type CtxKeyType string

type DepositInfo

type DepositInfo struct {
	// contains filtered or unexported fields
}

func NewDepositInfo

func NewDepositInfo(store prefix.Store) *DepositInfo

func (*DepositInfo) Add

func (d *DepositInfo) Add(newItem *types.DepositInfoEntry)

func (*DepositInfo) Get

func (d *DepositInfo) Get() (list []*types.DepositInfoEntry)

type MemState

type MemState struct {
	// contains filtered or unexported fields
}

func NewMemState

func NewMemState(storeKey sdk.StoreKey) *MemState

func (*MemState) Clear

func (s *MemState) Clear(ctx sdk.Context)

func (*MemState) ClearCancellationForPair

func (s *MemState) ClearCancellationForPair(ctx sdk.Context, contractAddr typesutils.ContractAddress, pair typesutils.PairString)

func (*MemState) DeepCopy

func (s *MemState) DeepCopy() *MemState

func (*MemState) DeepFilterAccount

func (s *MemState) DeepFilterAccount(ctx sdk.Context, account string)

func (*MemState) GetAllBlockOrders

func (s *MemState) GetAllBlockOrders(ctx sdk.Context, contractAddr typesutils.ContractAddress) (list []*types.Order)

func (*MemState) GetBlockCancels

func (s *MemState) GetBlockCancels(ctx sdk.Context, contractAddr typesutils.ContractAddress, pair typesutils.PairString) *BlockCancellations

func (*MemState) GetBlockOrders

func (s *MemState) GetBlockOrders(ctx sdk.Context, contractAddr typesutils.ContractAddress, pair typesutils.PairString) *BlockOrders

func (*MemState) GetDepositInfo

func (s *MemState) GetDepositInfo(ctx sdk.Context, contractAddr typesutils.ContractAddress) *DepositInfo

func (*MemState) SynchronizeAccess

func (s *MemState) SynchronizeAccess(ctx sdk.Context, contractAddr typesutils.ContractAddress)

Jump to

Keyboard shortcuts

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