aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-13 07:08:00 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commit37cfeed0f5f17d6231c25327c13e528a2f30610a (patch)
tree90a5cb15e2c8555d461b728e6e245131f1648ae3 /packages/contracts
parentcb27fe17cdfec3ead79ed17903836cc628593327 (diff)
downloaddexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.gz
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.bz2
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.lz
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.xz
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.zst
dexon-sol-tools-37cfeed0f5f17d6231c25327c13e528a2f30610a.zip
Rearranged preconditions in ERC721 proxy
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
index e27a104b9..abb709bd7 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
@@ -45,14 +45,14 @@ contract ERC721Proxy is
// No work to do if amount is zero
if (amount == 0) return;
+ // There exists only 1 of each token.
+ require(amount == 1);
+
// Decode metadata
address token;
uint256 tokenId;
(token, tokenId) = decodeMetadata(assetMetadata);
- // There exists only 1 of each token.
- require(amount == 1);
-
// Either succeeds or throws.
ERC721Token(token).transferFrom(from, to, tokenId);
}