OrderMixin
Last updated
Last updated
Regular Limit Order mixin
Permitable
Returns unfilled amount for order. Throws if order does not exist
Parameters:
orderHash
bytes32
Returns unfilled amount for order
orderHash
bytes32
Result
uint256
Unfilled amount of order plus one if order exists. Otherwise 0
Same as remainingRaw
but for multiple orders
orderHashes
bytes32[]
Calls every target with corresponding data. Then reverts with CALL_RESULTS_0101011 where zeroes and ones denote failure or success of the corresponding call
targets
address[]
Array of addresses that will be called
data
bytes[]
Array of data that will be passed to each call
Cancels order by setting remaining amount to zero
order
struct OrderLib.Order
Fills an order. If one doesn't exist (first fill) it will be created using order.makerAssetData
order
struct OrderLib.Order
Order quote to fill
signature
bytes
Signature to confirm quote ownership
interaction
bytes
Making amount
makingAmount
uint256
Taking amount
takingAmount
uint256
Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount
thresholdAmount
uint256
Same as fillOrder
but calls permit first, allowing to approve token spending and make a swap in one transaction. Also allows to specify funds destination instead of msg.sender
See tests for examples
order
struct OrderLib.Order
Order quote to fill
signature
bytes
Signature to confirm quote ownership
interaction
bytes
Making amount
makingAmount
uint256
Taking amount
takingAmount
uint256
Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount
thresholdAmount
uint256
Address that will receive swap funds
target
address
Should consist of abiencoded token address and encoded IERC20Permit.permit
call.
permit
bytes
Same as fillOrder
but allows to specify funds destination instead of msg.sender
order_
struct OrderLib.Order
Order quote to fill
signature
bytes
Signature to confirm quote ownership
interaction
bytes
Making amount
makingAmount
uint256
Taking amount
takingAmount
uint256
Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount
thresholdAmount
uint256
Address that will receive swap funds
target
address
Checks order predicate
order
struct OrderLib.Order
order
struct OrderLib.Order
Emitted every time order gets filled, including partial fills
maker
address
orderHash
bytes32
remaining
uint256
Emitted when order gets cancelled
maker
address
orderHash
bytes32
remainingRaw
uint256
Parameters:
Return Values:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Parameters: