Transaction Hash:
Block:
12615069 at Jun-11-2021 07:16:36 PM +UTC
Transaction Fee:
0.004839128 ETH
$9.17
Gas Used:
172,826 Gas / 28 Gwei
Emitted Events:
68 |
EIP20.Transfer( _from=[Sender] 0x4fc14d05b01437a82beeb9a0cc8ce2d71fdfbbae, _to=Spender, _value=5030109383897278103391 )
|
69 |
WETH9.Transfer( src=0xA424cea71C4Aea3d11877240B2F221C027c0E0Be, dst=ZeroEx, wad=490499225870716614 )
|
70 |
EIP20.Transfer( _from=Spender, _to=0xA424cea71C4Aea3d11877240B2F221C027c0E0Be, _value=5030109383897278103391 )
|
71 |
0xa424cea71c4aea3d11877240b2f221c027c0e0be.0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67( 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67, 0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff, 0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff, 000000000000000000000000000000000000000000000110aeca69fe2c40bf5f, fffffffffffffffffffffffffffffffffffffffffffffffff931658d875f313a, 000000000000000000000000000000000000000002874d9542a71d86a96f5df4, 00000000000000000000000000000000000000000000041bb01321fad271e4c4, fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe973c )
|
72 |
WETH9.Withdrawal( src=ZeroEx, wad=490499225870716614 )
|
73 |
MetaSwap.Swap( 0xbeee1e6e7fe307ddcf84b0a16137a4430ad5e2480fc4f4a8e250ab56ccd7630d, 0xa8dc30b66c6d4a8aac3d15925bfca09e42cac4a00c50f9949154b045088e2ac2, 0x0000000000000000000000004fc14d05b01437a82beeb9a0cc8ce2d71fdfbbae )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x11eDedeb...1543ec6fB | (Metamask: Fees) | 598.527454171038201402 Eth | 598.531746039264570172 Eth | 0.00429186822636877 | |
0x27702a26...A084EF628 | |||||
0x4fc14D05...71fDFbbAE |
36.01554507637532926 Eth
Nonce: 272
|
36.496913306019677104 Eth
Nonce: 273
| 0.481368229644347844 | ||
0x5A0b54D5...D3E029c4c
Miner
| (Spark Pool) | 29.54256092739290598 Eth | 29.54740005539290598 Eth | 0.004839128 | |
0xA424cea7...027c0E0Be | (Uniswap V3: ALEPH) | ||||
0xC02aaA39...83C756Cc2 | 6,457,425.283018219122467156 Eth | 6,457,424.792518993251750542 Eth | 0.490499225870716614 |
Execution Trace
MetaSwap.swap( aggregatorId=0xFeeDynamic, tokenFrom=0x27702a26126e0B3702af63Ee09aC4d1A084EF628, amount=5030109383897278103391, data=0x00000000000000000000000027702A26126E0B3702AF63EE09AC4D1A084EF6280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110AECA69FE2C40BF5F000000000000000000000000000000000000000000000000068B88ECDE62AEC10000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000F3F6E710E350200000000000000000000000011EDEDEBF63BEF0EA2D2D071BDF88F71543EC6FB00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000128803BA26D0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000110AECA69FE2C40BF5F000000000000000000000000000000000000000000000000069A5340F502622B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B27702A26126E0B3702AF63EE09AC4D1A084EF628000BB8C02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2000000000000000000000000000000000000000000869584CD00000000000000000000000011EDEDEBF63BEF0EA2D2D071BDF88F71543EC6FB0000000000000000000000000000000000000000000000BD3C47B15360C3B663000000000000000000000000000000000000000000000000 )
-
EIP20.transferFrom( _from=0x4fc14D05b01437A82BEeb9A0Cc8cE2d71fDFbbAE, _to=0x74de5d4FCbf63E00296fd95d33236B9794016631, _value=5030109383897278103391 ) => ( success=True )
Spender.swap( adapter=0x3d1d55c23dFc759C5Ae48500cA88dDF477b3c9E5, data=0x92F5F0370000000000000000000000004FC14D05B01437A82BEEB9A0CC8CE2D71FDFBBAE00000000000000000000000027702A26126E0B3702AF63EE09AC4D1A084EF6280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110AECA69FE2C40BF5F000000000000000000000000000000000000000000000000068B88ECDE62AEC10000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000F3F6E710E350200000000000000000000000011EDEDEBF63BEF0EA2D2D071BDF88F71543EC6FB00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000128803BA26D0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000110AECA69FE2C40BF5F000000000000000000000000000000000000000000000000069A5340F502622B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B27702A26126E0B3702AF63EE09AC4D1A084EF628000BB8C02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2000000000000000000000000000000000000000000869584CD00000000000000000000000011EDEDEBF63BEF0EA2D2D071BDF88F71543EC6FB0000000000000000000000000000000000000000000000BD3C47B15360C3B663000000000000000000000000000000000000000000000000 )
0x3d1d55c23dfc759c5ae48500ca88ddf477b3c9e5.92f5f037( )
-
EIP20.allowance( _owner=0x74de5d4FCbf63E00296fd95d33236B9794016631, _spender=0xDef1C0ded9bec7F1a1670819833240f027b25EfF ) => ( remaining=115792089237316195423570985008687907853269984665640564039457584007913129639935 )
ZeroEx.803ba26d( )
UniswapV3Feature.sellTokenForEthToUniswapV3( encodedPath=0x27702A26126E0B3702AF63EE09AC4D1A084EF628000BB8C02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2, sellAmount=5030109383897278103391, minBuyAmount=475784249094595115, recipient=0x0000000000000000000000000000000000000000 ) => ( buyAmount=490499225870716614 )
Uniswap V3: ALEPH.128acb08( )
-
WETH9.transfer( dst=0xDef1C0ded9bec7F1a1670819833240f027b25EfF, wad=490499225870716614 ) => ( True )
-
EIP20.balanceOf( _owner=0xA424cea71C4Aea3d11877240B2F221C027c0E0Be ) => ( balance=1931172109888422118756628 )
-
ZeroEx.fa461e33( )
-
EIP20.balanceOf( _owner=0xA424cea71C4Aea3d11877240B2F221C027c0E0Be ) => ( balance=1936202219272319396860019 )
-
WETH9.withdraw( wad=490499225870716614 )
- ETH 0.490499225870716614
ZeroEx.CALL( )
- ETH 0.490499225870716614
- ETH 0.490499225870716614
Spender.CALL( )
- ETH 0.00429186822636877
Metamask: Fees.CALL( )
-
EIP20.balanceOf( _owner=0x74de5d4FCbf63E00296fd95d33236B9794016631 ) => ( balance=0 )
- ETH 0.486207357644347844
0x4fc14d05b01437a82beeb9a0cc8ce2d71fdfbbae.CALL( )
-
swap[MetaSwap (ln:1598)]
_swap[MetaSwap (ln:1604)]
safeTransferFrom[MetaSwap (ln:1637)]
swap[MetaSwap (ln:1639)]
encode[MetaSwap (ln:1643)]
Swap[MetaSwap (ln:1648)]
File 1 of 6: MetaSwap
File 2 of 6: Spender
File 3 of 6: EIP20
File 4 of 6: ZeroEx
File 5 of 6: WETH9
File 6 of 6: UniswapV3Feature
12345678910111213141516pragma solidity ^0.6.0;import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";import "@openzeppelin/contracts/utils/Address.sol";import "../Constants.sol";contract CommonAdapter {using SafeERC20 for IERC20;using Address for address;using Address for address payable;/*** @dev Performs a swap* @param recipient The original msg.sender performing the swap* @param aggregator Address of the aggregator's contract* @param spender Address to which tokens will be approved* @param method Selector of the function to be called in the aggregator's contract* @param tokenFrom Token to be swapped
File 2 of 6: Spender
1{"Constants.84ef19f8.sol":{"content":"// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nlibrary Constants {\r\n address internalconstant ETH = 0x0000000000000000000000000000000000000000;\r\n}\r\n"},"Spender.3372a096.sol":{"content":"// SPDX-License-Identifier:MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport \"./Constants.84ef19f8.sol\";\r\n\r\ncontract Spender {\r\n address public immutable metaswap;\r\n\r\n constructor() public {\r\n metaswap = msg.sender;\r\n }\r\n\r\n /// @dev Receives ether from swaps\r\n fallback()external payable {}\r\n\r\n function swap(address adapter, bytes calldata data) external payable {\r\n require(msg.sender == metaswap,\"FORBIDDEN\");\r\n require(adapter != address(0), \"ADAPTER_NOT_PROVIDED\");\r\n _delegate(adapter, data,\"ADAPTER_DELEGATECALL_FAILED\");\r\n }\r\n\r\n /**\r\n * @dev Performs a delegatecall and bubbles up the errors, adapted from\r\n *https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol\r\n * @param target Address of the contract todelegatecall\r\n * @param data Data passed in the delegatecall\r\n * @param errorMessage Fallback revert reason\r\n */\r\n function_delegate(\r\n address target,\r\n bytes memory data,\r\n string memory errorMessage\r\n ) private returns (bytes memory){\r\n // solhint-disable-next-line avoid-low-level-calls\r\n (bool success, bytes memory returndata) = target.delegatecall(data);\r\nif (success) {\r\n return returndata;\r\n } else {\r\n // Look for revert reason and bubble it up ifpresent\r\n if (returndata.length \u003e 0) {\r\n // The easiest way to bubble the revert reason is using memory viaassembly\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n letreturndata_size := mload(returndata)\r\n revert(add(32, returndata), returndata_size)\r\n }\r\n } else{\r\n revert(errorMessage);\r\n }\r\n }\r\n }\r\n}\r\n"}}
File 3 of 6: EIP20
1{"EIP20.sol":{"content":"/*\nImplements EIP20 token standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md\nOriginal code by Consensys:https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20.sol\nWith modifications according to aleph.im needs (batch transfer, permit...)\n.*/\n\n\npragma solidity ^0.5.16;\n\nimport \"./EIP20Interface.sol\";\n\n\ncontract EIP20 is EIP20Interface {\n\n uint256 constant privateMAX_UINT256 = 2**256 - 1;\n mapping (address =\u003e uint256) public balances;\n mapping (address =\u003e mapping (address =\u003e uint256))public allowed;\n /*\n NOTE:\n The following variables are OPTIONAL vanities. One does not have to include them.\n They allow one tocustomise the token contract \u0026 in no way influences the core functionality.\n Some wallets/interfaces might not even bother to look at thisinformation.\n */\n string public name; //fancy name: eg Simon Bucks\n uint8 public decimals; //How manydecimals to show.\n string public symbol; //An identifier: eg SBX\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH =0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n\n mapping(address =\u003e uint) public nonces;\n\n constructor(\nuint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\nuint chainId;\n assembly {\n chainId := chainid\n }\n \n balances[msg.sender] = _initialAmount;// Give the creator all initial tokens\n totalSupply = _initialAmount; // Update total supply\n name =_tokenName; // Set the name for display purposes\n decimals = _decimalUnits; //Amount of decimals for display purposes\n symbol = _tokenSymbol; // Set the symbol for display purposes\n\nDOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\u0027EIP712Domain(string name,string version,uint256chainId,address verifyingContract)\u0027),\n keccak256(bytes(name)),\n keccak256(bytes(\u00271\u0027)),\nchainId,\n address(this)\n )\n );\n }\n\n function transfer(address _to, uint256 _value) public returns(bool success) {\n require(balances[msg.sender] \u003e= _value);\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars\n return true;\n }\n\n functiontransferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\n uint256 allowance = allowed[_from][msg.sender];\nrequire(balances[_from] \u003e= _value \u0026\u0026 allowance \u003e= _value);\n balances[_to] += _value;\n balances[_from] -=_value;\n if (allowance \u003c MAX_UINT256) {\n allowed[_from][msg.sender] -= _value;\n }\n emit Transfer(_from,_to, _value); //solhint-disable-line indent, no-unused-vars\n return true;\n }\n\n function balanceOf(address _owner) public viewreturns (uint256 balance) {\n return balances[_owner];\n }\n\n function _approve(address owner, address spender, uint value) private{\n allowed[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function approve(address _spender, uint256_value) public returns (bool success) {\n _approve(msg.sender, _spender, _value);\n return true;\n }\n\n function allowance(address _owner, address _spender) public view returns (uint256 remaining) {\n return allowed[_owner][_spender];\n }\n\n functionbatchTransfer(address[] memory _targets, uint256[] memory _values) public returns (bool success) {\n uint8 i = 0;\n for (i; i \u003c_targets.length; i++) {\n transfer(_targets[i], _values[i]);\n }\n return true;\n }\n\n function batchTransferFrom(address _from, address[] memory _targets, uint256[] memory _values) public returns (bool success) {\n uint8 i = 0;\n for (i; i\u003c _targets.length; i++) {\n transferFrom(_from, _targets[i], _values[i]);\n }\n return true;\n }\n\n functionpermit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline \u003e= block.timestamp, \u0027PERMIT: EXPIRED\u0027);\n bytes32 digest = keccak256(\n abi.encodePacked(\n\u0027\\x19\\x01\u0027,\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value,nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) \u0026\u0026 recoveredAddress == owner, \u0027PERMIT: INVALID_SIGNATURE\u0027);\n _approve(owner, spender,value);\n }\n}\n"},"EIP20Interface.sol":{"content":"// Abstract contract for the full ERC 20 Token standard\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md\n// Original code by Consensys: https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20Interface.sol\npragma solidity ^0.5.16;\n\n\ncontract EIP20Interface {\n /* This is a slight change to the ERC20 base standard.\n function totalSupply() constant returns (uint256 supply);\n is replaced with:\n uint256 public totalSupply;\n This automatically creates a getter function forthe totalSupply.\n This is moved to the base contract since public getter functions are not\n currently recognised as an implementation ofthe matching abstract\n function by the compiler.\n */\n /// total amount of tokens\n uint256 public totalSupply;\n\n /// @param_owner The address from which the balance will be retrieved\n /// @return The balance\n function balanceOf(address _owner) public viewreturns (uint256 balance);\n\n /// @notice send `_value` token to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n/// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transfer(address_to, uint256 _value) public returns (bool success);\n\n /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by`_from`\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _value The amount of tokento be transferred\n /// @return Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);\n\n /// @notice `msg.sender` approves `_spender` to spend `_value` tokens\n /// @param _spender The addressof the account able to transfer the tokens\n /// @param _value The amount of tokens to be approved for transfer\n /// @return Whether theapproval was successful or not\n function approve(address _spender, uint256 _value) public returns (bool success);\n\n /// @param _owner Theaddress of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return Amount ofremaining tokens allowed to spent\n function allowance(address _owner, address _spender) public view returns (uint256 remaining);\n\n //solhint-disable-next-line no-simple-event-func-name\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n eventApproval(address indexed _owner, address indexed _spender, uint256 _value);\n\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\nfunction PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n}\n"}}
File 4 of 6: ZeroEx
12345678910111213141516/*Copyright 2020 ZeroEx Intl.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.*/pragma solidity ^0.6.5;pragma experimental ABIEncoderV2;import "@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol";import "./migrations/LibBootstrap.sol";
File 5 of 6: WETH9
12345678910111213141516// Copyright (C) 2015, 2016, 2017 Dapphub// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity ^0.4.18;
File 6 of 6: UniswapV3Feature
12345678910111213141516// SPDX-License-Identifier: Apache-2.0/*Copyright 2021 ZeroEx Intl.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.*/pragma solidity ^0.6.5;pragma experimental ABIEncoderV2;import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";