diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-06-27 03:59:35 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-06-27 04:57:55 +0800 |
commit | b6d8dcb6e11cfe8da6854371029fe1af3f6a68de (patch) | |
tree | e57d50e796ea356544eaf38476adfdfba2a8a68a /packages/contracts/src | |
parent | 08ee1ab2e636099344cade1c8bff67e9b3da2bb4 (diff) | |
download | dexon-0x-contracts-b6d8dcb6e11cfe8da6854371029fe1af3f6a68de.tar.gz dexon-0x-contracts-b6d8dcb6e11cfe8da6854371029fe1af3f6a68de.tar.zst dexon-0x-contracts-b6d8dcb6e11cfe8da6854371029fe1af3f6a68de.zip |
Make dispatchTransferFrom revert with reason from AssetProxy on failure
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol index 93e752af3..f7086f543 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol @@ -180,13 +180,12 @@ contract MixinAssetProxyDispatcher is cdStart, // pointer to start of input sub(cdEnd, cdStart), // length of input cdStart, // write output over input - 0 // output size is 0 bytes + 512 // reserve 512 bytes for output ) + if eq(success, 0) { + revert(cdStart, returndatasize()) + } } - require( - success, - "TRANSFER_FAILED" - ); } } } |