ETH Price: $2,550.33 (+1.65%)

Transaction Decoder

Block:
16014740 at Nov-21-2022 12:14:59 AM +UTC
Transaction Fee:
0.001728817143826944 ETH $4.41
Gas Used:
146,368 Gas / 11.811442008 Gwei

Emitted Events:

213 StargateEthVault.Deposit( dst=[Receiver] RouterETH, wad=5000000000000000 )
214 StargateEthVault.Approval( src=[Receiver] RouterETH, guy=Router, wad=5000000000000000 )
215 StargateEthVault.Transfer( src=[Receiver] RouterETH, dst=Pool, wad=5000000000000000 )
216 Pool.Transfer( from=0x0000000000000000000000000000000000000000, to=[Sender] 0xb681e94cadf59bb445dd30439912e3e8e6c8ea32, value=4999644951355868 )
217 Pool.Mint( to=[Sender] 0xb681e94cadf59bb445dd30439912e3e8e6c8ea32, amountLP=4999644951355868, amountSD=5000000000000000, mintFeeAmountSD=0 )

Account State Difference:

  Address   Before After State Difference Code
0x10181654...633390A2E
(builder0x69)
2.047242799321466976 Eth2.047462351321466976 Eth0.000219552
0x72E2F483...FeF72eD9c 5,279.593581735030438595 Eth5,279.598581735030438595 Eth0.005
0xb681e94c...8e6C8eA32
0.477332555557989183 Eth
Nonce: 176
0.470603738414162239 Eth
Nonce: 177
0.006728817143826944

Execution Trace

ETH 0.005 RouterETH.CALL( )
  • ETH 0.005 StargateEthVault.CALL( )
  • StargateEthVault.approve( guy=0x8731d54E9D02c286767d56ac03e8037C07e01e98, wad=5000000000000000 ) => ( True )
  • Router.addLiquidity( _poolId=13, _amountLD=5000000000000000, _to=0xb681e94cadf59bb445Dd30439912E3e8e6C8eA32 )
    • Factory.getPool( 13 ) => ( 0x101816545F6bd2b1076434B54383a1E633390A2E )
    • Pool.STATICCALL( )
    • Pool.STATICCALL( )
    • StargateEthVault.transferFrom( src=0x150f94B44927F078737562f0fcF3C95c01Cc2376, dst=0x101816545F6bd2b1076434B54383a1E633390A2E, wad=5000000000000000 ) => ( True )
    • Pool.mint( _to=0xb681e94cadf59bb445Dd30439912E3e8e6C8eA32, _amountLD=5000000000000000 ) => ( 5000000000000000 )
      File 1 of 5: RouterETH
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      // SPDX-License-Identifier: BUSL-1.1
      pragma solidity 0.7.6;
      pragma abicoder v2;
      import "./interfaces/IStargateRouter.sol";
      import "./interfaces/IStargateEthVault.sol";
      contract RouterETH {
      address public immutable stargateEthVault;
      IStargateRouter public immutable stargateRouter;
      uint16 public immutable poolId;
      constructor(address _stargateEthVault, address _stargateRouter, uint16 _poolId){
      require(_stargateEthVault != address(0x0), "RouterETH: _stargateEthVault cant be 0x0");
      require(_stargateRouter != address(0x0), "RouterETH: _stargateRouter cant be 0x0");
      stargateEthVault = _stargateEthVault;
      stargateRouter = IStargateRouter(_stargateRouter);
      poolId = _poolId;
      }
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      File 2 of 5: StargateEthVault
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      // 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.7.6;
      import "@openzeppelin/contracts/access/Ownable.sol";
      import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
      import "./interfaces/IStargateEthVault.sol";
      // This contract always UNWRAPS the erc20 for native gas token on transfer + transferFrom.
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      File 3 of 5: Pool
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      // SPDX-License-Identifier: BUSL-1.1
      pragma solidity 0.7.6;
      pragma abicoder v2;
      // imports
      import "@openzeppelin/contracts/access/Ownable.sol";
      import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
      import "./LPTokenERC20.sol";
      import "./interfaces/IStargateFeeLibrary.sol";
      // libraries
      import "@openzeppelin/contracts/math/SafeMath.sol";
      /// Pool contracts on other chains and managed by the Stargate protocol.
      contract Pool is LPTokenERC20, ReentrancyGuard {
      using SafeMath for uint256;
      //---------------------------------------------------------------------------
      // CONSTANTS
      bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      File 4 of 5: Router
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      // SPDX-License-Identifier: BUSL-1.1
      pragma solidity 0.7.6;
      pragma abicoder v2;
      // imports
      import "@openzeppelin/contracts/access/Ownable.sol";
      import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
      import "./Factory.sol";
      import "./Pool.sol";
      import "./Bridge.sol";
      // interfaces
      import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
      import "./interfaces/IStargateRouter.sol";
      import "./interfaces/IStargateReceiver.sol";
      // libraries
      import "@openzeppelin/contracts/math/SafeMath.sol";
      contract Router is IStargateRouter, Ownable, ReentrancyGuard {
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      File 5 of 5: Factory
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      // SPDX-License-Identifier: BUSL-1.1
      pragma solidity 0.7.6;
      pragma abicoder v2;
      import "@openzeppelin/contracts/math/SafeMath.sol";
      import "@openzeppelin/contracts/access/Ownable.sol";
      import "./Pool.sol";
      contract Factory is Ownable {
      using SafeMath for uint256;
      //---------------------------------------------------------------------------
      // VARIABLES
      mapping(uint256 => Pool) public getPool; // poolId -> PoolInfo
      address[] public allPools;
      address public immutable router;
      address public defaultFeeLibrary; // address for retrieving fee params for swaps
      //---------------------------------------------------------------------------
      // MODIFIERS
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX