aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-06-06 07:44:47 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-08 06:39:40 +0800
commitb19276bb0f36059e67bb57b14e9f1e9e0efc17f2 (patch)
tree0498c3216a19f19f402e01d542cd401d32d71a39 /packages/contracts/src
parent774d831fae5809408f9ddfcf9393d579416b1bfb (diff)
downloaddexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.gz
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.bz2
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.lz
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.xz
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.tar.zst
dexon-sol-tools-b19276bb0f36059e67bb57b14e9f1e9e0efc17f2.zip
Fixed merge error when rebasing wrt length variable in asset data decoders
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol4
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol4
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]);