Documentation ¶
Index ¶
- Constants
- func DeepDelete(kvStore sdk.KVStore, storePrefix []byte, matcher func([]byte) bool)
- func GetAllDownstreamContracts(ctx sdk.Context, contractAddress string, ...) []string
- func GetExecutingContract(ctx sdk.Context) *types.ContractInfoV2
- func GetTerminationSignals(ctx sdk.Context) *datastructures.TypedSyncMap[string, chan struct{}]
- type BlockCancellations
- type BlockOrders
- func (o *BlockOrders) Add(newItem *types.Order)
- func (o *BlockOrders) Get() (list []*types.Order)
- func (o *BlockOrders) GetByID(id uint64) *types.Order
- func (o *BlockOrders) GetLimitOrders(direction types.PositionDirection) []*types.Order
- func (o *BlockOrders) GetSortedMarketOrders(direction types.PositionDirection) []*types.Order
- func (o *BlockOrders) MarkFailedToPlace(failedOrders []types.UnsuccessfulOrder)
- type CtxKeyType
- type DepositInfo
- type MemState
- func (s *MemState) Clear(ctx sdk.Context)
- func (s *MemState) ClearCancellationForPair(ctx sdk.Context, contractAddr types.ContractAddress, pair types.Pair)
- func (s *MemState) ClearContractToDependencies(ctx sdk.Context)
- func (s *MemState) ContractsToProcessContains(ctx sdk.Context, contractAddress string) bool
- func (s *MemState) DeepCopy() *MemState
- func (s *MemState) DeepFilterAccount(ctx sdk.Context, account string)
- func (s *MemState) GetAllBlockOrders(ctx sdk.Context, contractAddr types.ContractAddress) (list []*types.Order)
- func (s *MemState) GetBlockCancels(ctx sdk.Context, contractAddr types.ContractAddress, pair types.Pair) *BlockCancellations
- func (s *MemState) GetBlockOrders(ctx sdk.Context, contractAddr types.ContractAddress, pair types.Pair) *BlockOrders
- func (s *MemState) GetContractToDependencies(ctx sdk.Context, contractAddress string, ...) []string
- func (s *MemState) GetContractToProcessOrderedSlice(ctx sdk.Context) []string
- func (s *MemState) GetDepositInfo(ctx sdk.Context, contractAddr types.ContractAddress) *DepositInfo
- func (s *MemState) SetDownstreamsToProcess(ctx sdk.Context, contractAddress string, ...)
- func (s *MemState) SynchronizeAccess(ctx sdk.Context, contractAddr types.ContractAddress)
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 GetAllDownstreamContracts ¶
func GetAllDownstreamContracts(ctx sdk.Context, contractAddress string, loader func(sdk.Context, string) (types.ContractInfoV2, error)) []string
BFS traversal over a acyclic graph Includes the root contract itself.
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) GetLimitOrders ¶
func (o *BlockOrders) GetLimitOrders(direction types.PositionDirection) []*types.Order
func (*BlockOrders) GetSortedMarketOrders ¶
func (o *BlockOrders) GetSortedMarketOrders(direction types.PositionDirection) []*types.Order
func (*BlockOrders) MarkFailedToPlace ¶
func (o *BlockOrders) MarkFailedToPlace(failedOrders []types.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 (*MemState) ClearCancellationForPair ¶
func (*MemState) ClearContractToDependencies ¶
func (*MemState) ContractsToProcessContains ¶
func (*MemState) DeepFilterAccount ¶
func (*MemState) GetAllBlockOrders ¶
func (*MemState) GetBlockCancels ¶
func (s *MemState) GetBlockCancels(ctx sdk.Context, contractAddr types.ContractAddress, pair types.Pair) *BlockCancellations
func (*MemState) GetBlockOrders ¶
func (s *MemState) GetBlockOrders(ctx sdk.Context, contractAddr types.ContractAddress, pair types.Pair) *BlockOrders
func (*MemState) GetContractToDependencies ¶
func (*MemState) GetContractToProcessOrderedSlice ¶
func (*MemState) GetDepositInfo ¶
func (s *MemState) GetDepositInfo(ctx sdk.Context, contractAddr types.ContractAddress) *DepositInfo
func (*MemState) SetDownstreamsToProcess ¶
func (*MemState) SynchronizeAccess ¶
func (s *MemState) SynchronizeAccess(ctx sdk.Context, contractAddr types.ContractAddress)
Click to show internal directories.
Click to hide internal directories.