diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 07:39:27 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 22:34:47 +0800 |
commit | 4159a8fe6e621fa01ccac6b97778374be658d984 (patch) | |
tree | c349f02ce2b705afe4e09e76e2d876771ca29fe8 /packages/contracts | |
parent | d8b44283a2247858c84fc2c319634c3118091a71 (diff) | |
download | dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar.gz dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar.bz2 dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar.lz dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar.xz dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.tar.zst dexon-sol-tools-4159a8fe6e621fa01ccac6b97778374be658d984.zip |
Add comments for deploying with constant ZRX_ASSET_DATA
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/AssetProxy/ERC721Proxy.sol | 4 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/libs/LibConstants.sol | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/AssetProxy/ERC721Proxy.sol b/packages/contracts/src/2.0.0/protocol/AssetProxy/ERC721Proxy.sol index 53f5a14e0..6a70c9f60 100644 --- a/packages/contracts/src/2.0.0/protocol/AssetProxy/ERC721Proxy.sol +++ b/packages/contracts/src/2.0.0/protocol/AssetProxy/ERC721Proxy.sol @@ -93,7 +93,7 @@ contract ERC721Proxy is // | | 4 | 12 + 20 | 1. token address | // | | 36 | | 2. tokenId | - // We construct calldata for the `token.safeTransferFrom` ABI. + // We construct calldata for the `token.transferFrom` ABI. // The layout of this calldata is in the table below. // // | Area | Offset | Length | Contents | @@ -116,7 +116,7 @@ contract ERC721Proxy is } /////// Setup Header Area /////// - // This area holds the 4-byte `transferFromSelector`. + // This area holds the 4-byte `transferFrom` selector. // Any trailing data in transferFromSelector will be // overwritten in the next `mstore` call. mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000) diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibConstants.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibConstants.sol index 6918d755e..8d2732cd3 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibConstants.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibConstants.sol @@ -19,11 +19,23 @@ pragma solidity 0.4.24; +// solhint-disable max-line-length contract LibConstants { // Asset data for ZRX token. Used for fee transfers. // @TODO: Hardcode constant when we deploy. Currently // not constant to make testing easier. + + // The proxyId for ZRX_ASSET_DATA is bytes4(keccak256("ERC20Token(address)")) = 0xf47261b0 + + // Kovan ZRX address is 0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570. + // The ABI encoded proxyId and address is 0xf47261b00000000000000000000000006ff6c0ff1d68b964901f986d4c9fa3ac68346570 + // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xf6\xc0\xff\x1d\x68\xb9\x64\x90\x1f\x98\x6d\x4c\x9f\xa3\xac\x68\x34\x65\x70"; + + // Mainnet ZRX address is 0xe41d2489571d322189246dafa5ebde1f4699f498. + // The ABI encoded proxyId and address is 0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498 + // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x1d\x24\x89\x57\x1d\x32\x21\x89\x24\x6d\xaf\xa5\xeb\xde\x1f\x46\x99\xf4\x98"; + // solhint-disable-next-line var-name-mixedcase bytes public ZRX_ASSET_DATA; @@ -34,3 +46,4 @@ contract LibConstants { ZRX_ASSET_DATA = zrxAssetData; } } +// solhint-enable max-line-length |