From 6921943afffa4a8588e652caf194ce5abb3976e1 Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Mon, 25 Jun 2018 19:02:50 +0200 Subject: Inline ERC20 tranferFrom selector constant --- .../contracts/current/protocol/AssetProxy/MixinERC20Transfer.sol | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packages/contracts') 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. -- cgit v1.2.3