OrderModule
OrderModule
Addresses
Chain | Address |
---|
Functions
props
function props() internal view returns (struct OrderPropsSchema)
orders
function orders() internal view returns (struct OrderSchema)
__OrderModule_ctor
function __OrderModule_ctor(
struct StorageInstance app_,
ContractName contractName_,
uint256 contractVersion_
) internal
__OrderModule_init
function __OrderModule_init(
struct StorageInstance app_,
ContractName contractName_,
uint256 contractVersion_
) internal
__OrderModule_setup
function __OrderModule_setup() internal
orderExecuteHandler
function orderExecuteHandler() internal view returns (contract IOrderExecuteHandler)
_domFiPerp
function _domFiPerp() internal view returns (contract IDomFiPerp)
_collateralToken
function _collateralToken() internal view returns (contract IERC20)
_oracle
function _oracle() internal view returns (contract IPriceFeed)
_feeCalculator
function _feeCalculator() internal view returns (contract IFeeCalculator)
checkValidUnresolved
Before editing an order, must check that
- it has a
submittedAt
(i.e., it's not all 0s) - it hasn't been marked executed/canceled/expired
function checkValidUnresolved(struct OrderPtr order) internal view
hasExecutableTrigger
Evaluate the specified Trigger.
function hasExecutableTrigger(struct OrderPtr order, address owner) internal returns (bool executable)
Parameters
Name | Type | Description |
---|---|---|
order | struct OrderPtr | Order whose execution trigger to evaluate |
owner | address |
Return Values
Name | Type | Description |
---|---|---|
executable | bool | True if this trigger is active; false if not |
getTradeFeeRate
function getTradeFeeRate(ProductId _productId, address _owner) internal view returns (FPUnsigned)
Types
OrderSlot
Fields
Name | Type | Description |
---|---|---|
props | struct OrderPropsSchema | |
orders | struct OrderSchema |
struct OrderSlot {
struct OrderPropsSchema props;
struct OrderSchema orders;
}