diff options
author | F. Eugene Aumson <feuGeneA@users.noreply.github.com> | 2018-09-12 07:00:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 07:00:11 +0800 |
commit | cbb5a425dfb45d1dfda3579548d6b3f70dfca166 (patch) | |
tree | 8751979ad70ed0eb61dfda5a954bb9e1bc3d5c3b /packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol | |
parent | 800dd5fb4f0ab21388440a46aef21cd0cf0801c3 (diff) | |
parent | 45b68832aa3eb5c09db33140468ab737114be9e3 (diff) | |
download | dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar.gz dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar.bz2 dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar.lz dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar.xz dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.tar.zst dexon-0x-contracts-cbb5a425dfb45d1dfda3579548d6b3f70dfca166.zip |
Merge branch 'development' into sol-doc
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol b/packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol index 4d00e92d3..edb788fab 100644 --- a/packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol +++ b/packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol @@ -25,7 +25,6 @@ import "../../utils/LibBytes/LibBytes.sol"; contract AssetProxyOwner is MultiSigWalletWithTimeLock { - using LibBytes for bytes; event AssetProxyRegistration(address assetProxyContract, bool isRegistered); @@ -39,13 +38,13 @@ contract AssetProxyOwner is /// @dev Function will revert if the transaction does not call `removeAuthorizedAddressAtIndex` /// on an approved AssetProxy contract. modifier validRemoveAuthorizedAddressAtIndexTx(uint256 transactionId) { - Transaction storage tx = transactions[transactionId]; + Transaction storage txn = transactions[transactionId]; require( - isAssetProxyRegistered[tx.destination], + isAssetProxyRegistered[txn.destination], "UNREGISTERED_ASSET_PROXY" ); require( - tx.data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR, + txn.data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR, "INVALID_FUNCTION_SELECTOR" ); _; @@ -97,14 +96,13 @@ contract AssetProxyOwner is fullyConfirmed(transactionId) validRemoveAuthorizedAddressAtIndexTx(transactionId) { - Transaction storage tx = transactions[transactionId]; - tx.executed = true; - // solhint-disable-next-line avoid-call-value - if (tx.destination.call.value(tx.value)(tx.data)) + Transaction storage txn = transactions[transactionId]; + txn.executed = true; + if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) { emit Execution(transactionId); - else { + } else { emit ExecutionFailure(transactionId); - tx.executed = false; + txn.executed = false; } } } |