Transaction Hash:
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 | ||
---|---|---|---|---|---|
0x10181654...633390A2E | |||||
0x690B9A9E...Db4FaC990
Miner
| (builder0x69) | 2.047242799321466976 Eth | 2.047462351321466976 Eth | 0.000219552 | |
0x72E2F483...FeF72eD9c | 5,279.593581735030438595 Eth | 5,279.598581735030438595 Eth | 0.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
File 2 of 5: StargateEthVault
File 3 of 5: Pool
File 4 of 5: Router
File 5 of 5: Factory
12345678910111213141516// SPDX-License-Identifier: BUSL-1.1pragma 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;}
File 2 of 5: StargateEthVault
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.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.
File 3 of 5: Pool
12345678910111213141516// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.7.6;pragma abicoder v2;// importsimport "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";import "./LPTokenERC20.sol";import "./interfaces/IStargateFeeLibrary.sol";// librariesimport "@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;//---------------------------------------------------------------------------// CONSTANTSbytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
File 4 of 5: Router
12345678910111213141516// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.7.6;pragma abicoder v2;// importsimport "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";import "./Factory.sol";import "./Pool.sol";import "./Bridge.sol";// interfacesimport "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "./interfaces/IStargateRouter.sol";import "./interfaces/IStargateReceiver.sol";// librariesimport "@openzeppelin/contracts/math/SafeMath.sol";contract Router is IStargateRouter, Ownable, ReentrancyGuard {
File 5 of 5: Factory
12345678910111213141516// SPDX-License-Identifier: BUSL-1.1pragma 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;//---------------------------------------------------------------------------// VARIABLESmapping(uint256 => Pool) public getPool; // poolId -> PoolInfoaddress[] public allPools;address public immutable router;address public defaultFeeLibrary; // address for retrieving fee params for swaps//---------------------------------------------------------------------------// MODIFIERS