Each order is a data packet containing order parameters and an associated signature. Order parameters are concatenated and hashed to 32 bytes via the Keccak SHA3 function. The order originator signs the order hash with their private key to produce an ECDSA signature.
Name | Data Type | Description |
---|---|---|
exchangeContractAddress | address |
Address of the Exchange contract. This address will change each time the protocol is updated. |
maker | address |
Address originating the order. |
taker | address |
Address permitted to fill the order (optional). |
makerToken | address |
Address of an ERC20 Token contract. |
takerToken | address |
Address of an ERC20 Token contract. |
makerTokenAmount | uint256 |
Total units of makerToken offered by maker. |
takerTokenAmount | uint256 |
Total units of takerToken requested by maker. |
expirationTimestampInSec | uint256 |
Time at which the order expires (seconds since unix epoch). |
salt | uint256 |
Arbitrary number that allows for uniqueness of the order's Keccak SHA3 hash. |
feeRecipient | address |
Address that recieves transaction fees (optional). |
makerFee | uint256 |
Total units of ZRX paid to feeRecipient by maker. |
takerFee | uint256 |
Total units of ZRX paid to feeRecipient by taker. |
v | uint8 |
ECDSA signature of the above arguments. |
r | bytes32 |
ECDSA signature of the above arguments. |
s | bytes32 |
ECDSA signature of the above arguments. |
Install Node v6.9.1
Install project dependencies:
npm install
Start Testrpc
npm run testrpc
Compile contracts
npm run compile
Run tests
npm run test