Exchange.sol
Events
Trade()
This event is emitted when a trade is executed.
parameter | type | description |
makerAddress | address | address that created the order |
takerAddress | address | address that filled the order |
orderHash | bytes32 | hash of the order |
makerFilledAsset | address | address of assets filled for maker |
takerFilledAsset | address | address of assets filled for taker |
makerFilledAmount | uint256 | amount of assets filled for maker |
takerFilledAmount | uint256 | amount of assets filled for taker |
takerFeePaid | uint256 | amount of fee paid by the taker |
makerFeeReceived | uint256 | amount of fee received by the maker |
referralFeeReceived | uint256 | amount of fee received by the referrer |
Cancel()
This event is emitted when a cancel order is executed.
parameter | type | description |
makerBuyToken | address | address of asset being bought |
makerSellToken | address | address of asset being sold |
maker | address | address that created the order |
orderHash | bytes32 | hash of the order |
Functions
getOrderInfo()
This function is used to compute the status of an order. It should be called before a contract execution is performed in order to not waste gas.
parameter | type |
partialAmount | uint256 |
order | Order struct |
orderInfo | Order struct |
trade()
This function executes a trade based on the input order and signature, it reverts if order is not valid.
parameter | type |
order | Order struct |
signature | signature |
cancelSignleOrder()
With this function an order is canceled, but only if the message sender is the same as the original order signer.
parameter | type |
order | Order struct |
signature | signature |
Last updated