diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-06-26 01:02:50 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-06-27 03:23:19 +0800 |
commit | 6921943afffa4a8588e652caf194ce5abb3976e1 (patch) | |
tree | e85b41d2150e23cfb143adf56678e30121d5cf36 /packages/contracts/src | |
parent | 3ce90b8257ccfceecb9bbd67995cbc2ad38ee0eb (diff) | |
download | dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar.gz dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar.bz2 dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar.lz dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar.xz dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.tar.zst dexon-sol-tools-6921943afffa4a8588e652caf194ce5abb3976e1.zip |
Inline ERC20 tranferFrom selector constant
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol index 7cf6e1989..8081e7dd3 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol @@ -88,7 +88,6 @@ contract MixinERC20Transfer is // | | 36 | | 2. to | // | | 68 | | 3. amount | - bytes4 transferFromSelector = IERC20Token(0).transferFrom.selector; bool success; assembly { /////// Token contract address /////// @@ -106,11 +105,11 @@ contract MixinERC20Transfer is let cdStart := mload(64) /////// Setup Header Area /////// - // This area holds the 4-byte `transferFromSelector`. + // This area holds the 4-byte `transferFrom` selector. // Any trailing data in transferFromSelector will be // overwritten in the next `mstore` call. - mstore(cdStart, transferFromSelector) - + mstore(cdStart, 0x23b872dd00000000000000000000000000000000000000000000000000000000) + /////// Setup Params Area /////// // We copy the fields `from`, `to` and `amount` in bulk // from our own calldata to the new calldata. |