ERC721 inline return

This commit is contained in:
Remco Bloemen
2018-06-25 21:30:13 +02:00
committed by Amir Bandeali
parent 4caf1271e4
commit dbaf1fcd43

View File

@@ -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)
}
}