diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-06-06 07:44:47 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-06-08 06:39:40 +0800 |
commit | b19276bb0f36059e67bb57b14e9f1e9e0efc17f2 (patch) | |
tree | 0498c3216a19f19f402e01d542cd401d32d71a39 /packages | |
parent | 774d831fae5809408f9ddfcf9393d579416b1bfb (diff) | |
download | dexon-0x-contracts-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.gz dexon-0x-contracts-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.zst dexon-0x-contracts-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.zip |
Fixed merge error when rebasing wrt length variable in asset data decoders
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol | 4 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol index 50632400e..dd25bf41a 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol @@ -91,13 +91,13 @@ contract ERC20Proxy is // Validate encoded data length uint256 length = assetData.length; require( - assetData.length == 21, + length == 21, LENGTH_21_REQUIRED ); // Decode data token = readAddress(assetData, 0); - proxyId = uint8(assetData[length-1]); + proxyId = uint8(assetData[length - 1]); return (proxyId, token); } diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol index 21e5518c6..499d8d96e 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol @@ -106,14 +106,14 @@ contract ERC721Proxy is // Validate encoded data length uint256 length = assetData.length; require( - assetData.length >= 53, + length >= 53, LENGTH_AT_LEAST_53_REQUIRED ); // Decode asset data. token = readAddress(assetData, 0); tokenId = readUint256(assetData, 20); - if (assetData.length > 53) { + if (length > 53) { receiverData = readBytes(assetData, 52); } proxyId = uint8(assetData[length-1]); |