aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-06-26 03:30:13 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-06-27 03:23:19 +0800
commitdbaf1fcd43637f2acc08af5a30cc3c1890dacb24 (patch)
tree5a5b1b2fabd135bbfa33ab4dc6503b1b427027ce
parent4caf1271e42cea743cb24a93bbf832982e656cb2 (diff)
downloaddexon-0x-contracts-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.gz
dexon-0x-contracts-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.zst
dexon-0x-contracts-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.zip
ERC721 inline return
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol17
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol
index e00e43889..2b425b15e 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol
@@ -180,15 +180,16 @@ contract MixinERC721Transfer is
0, // write output to null
0 // output size is 0 bytes
)
-
- if iszero(success) {
- // Revert with `Error("TRANSFER_FAILED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
+ if success {
+ return(0, 0)
}
+
+ // Revert with `Error("TRANSFER_FAILED")`
+ mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
+ mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
+ mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)
+ mstore(96, 0)
+ revert(0, 100)
}
}