aboutsummaryrefslogtreecommitdiffstats
path: root/packages
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 /packages
parent4caf1271e42cea743cb24a93bbf832982e656cb2 (diff)
downloaddexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.gz
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.bz2
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.lz
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.xz
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.tar.zst
dexon-sol-tools-dbaf1fcd43637f2acc08af5a30cc3c1890dacb24.zip
ERC721 inline return
Diffstat (limited to 'packages')
-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)
}
}