Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 55 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap | 20695742 | 23 days ago | IN | 0.2 ETH | 0.00111227 | ||||
Swap | 20692782 | 23 days ago | IN | 0.1 ETH | 0.01248341 | ||||
Swap | 20692190 | 23 days ago | IN | 0.2 ETH | 0.00670651 | ||||
Swap | 20692116 | 23 days ago | IN | 0.1 ETH | 0.0092671 | ||||
Swap | 20692083 | 23 days ago | IN | 0.1 ETH | 0.00953986 | ||||
Swap | 20691981 | 23 days ago | IN | 0.2 ETH | 0.00875643 | ||||
Swap | 20690423 | 24 days ago | IN | 0.1 ETH | 0.0013886 | ||||
Swap | 20690379 | 24 days ago | IN | 0.3 ETH | 0.00136748 | ||||
Swap | 20689963 | 24 days ago | IN | 0.1 ETH | 0.00126564 | ||||
Swap | 20689896 | 24 days ago | IN | 0.3 ETH | 0.0011352 | ||||
Swap | 20689558 | 24 days ago | IN | 0.5 ETH | 0.00102468 | ||||
Swap | 20689486 | 24 days ago | IN | 0.2 ETH | 0.00114196 | ||||
Swap | 20689395 | 24 days ago | IN | 0.13 ETH | 0.00116336 | ||||
Swap | 20689330 | 24 days ago | IN | 0.13 ETH | 0.00113073 | ||||
Swap | 20687595 | 24 days ago | IN | 0.02 ETH | 0.00123576 | ||||
Swap | 20684508 | 24 days ago | IN | 0.02 ETH | 0.00163311 | ||||
Swap | 20684363 | 24 days ago | IN | 0.05 ETH | 0.00172591 | ||||
Swap | 20684036 | 24 days ago | IN | 0.1 ETH | 0.00151844 | ||||
Swap | 20683421 | 25 days ago | IN | 0.01 ETH | 0.00146749 | ||||
Swap | 20682960 | 25 days ago | IN | 0.02 ETH | 0.00141521 | ||||
Swap | 20682466 | 25 days ago | IN | 0.05 ETH | 0.00365478 | ||||
Swap | 20681991 | 25 days ago | IN | 0.15 ETH | 0.00083332 | ||||
Swap | 20681951 | 25 days ago | IN | 0.2 ETH | 0.00105421 | ||||
Swap | 20680035 | 25 days ago | IN | 0.08 ETH | 0.0016268 | ||||
Swap | 20679738 | 25 days ago | IN | 0.2 ETH | 0.00327634 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20695742 | 23 days ago | 0.002 ETH | ||||
20695742 | 23 days ago | 0.198 ETH | ||||
20695076 | 23 days ago | 0.21622962 ETH | ||||
20695076 | 23 days ago | 0.00218413 ETH | ||||
20695076 | 23 days ago | 0.21841376 ETH | ||||
20693947 | 23 days ago | 0.5076804 ETH | ||||
20693947 | 23 days ago | 0.00512808 ETH | ||||
20693947 | 23 days ago | 0.51280848 ETH | ||||
20692782 | 23 days ago | 0.001 ETH | ||||
20692782 | 23 days ago | 0.099 ETH | ||||
20692190 | 23 days ago | 0.002 ETH | ||||
20692190 | 23 days ago | 0.198 ETH | ||||
20692116 | 23 days ago | 0.001 ETH | ||||
20692116 | 23 days ago | 0.099 ETH | ||||
20692083 | 23 days ago | 0.001 ETH | ||||
20692083 | 23 days ago | 0.099 ETH | ||||
20691981 | 23 days ago | 0.002 ETH | ||||
20691981 | 23 days ago | 0.198 ETH | ||||
20690458 | 24 days ago | 0.37026379 ETH | ||||
20690458 | 24 days ago | 0.00374003 ETH | ||||
20690458 | 24 days ago | 0.37400383 ETH | ||||
20690423 | 24 days ago | 0.001 ETH | ||||
20690423 | 24 days ago | 0.099 ETH | ||||
20690379 | 24 days ago | 0.003 ETH | ||||
20690379 | 24 days ago | 0.297 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
UniswapSwapV2Helper
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IUniswapV2Router { function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function usdcToEth(uint256 usdcAmount) external view returns (uint256); } interface IUniswapV2Factory { function getPair( address tokenA, address tokenB ) external view returns (address pair); } interface IPair { function buyTotalFee() external view returns (uint256); function sellTotalFee() external view returns (uint256); } contract UniswapSwapV2Helper { address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant ETHER_VISTA_FACTORY = 0x9a27cb5ae0B2cEe0bb71f9A85C0D60f3920757B4; address constant ETHER_VISTA_ROUTER = 0xEAaa41cB2a64B11FE761D41E747c032CdD60CaCE; address public vaultAddress = 0xcD3420a9bda59D7a54baEc1DcAaFe19b09beB521; event OrderRecord( address fromToken, address toToken, address sender, uint256 fromAmount, uint256 returnAmount ); constructor() {} receive() external payable { (bool sent, ) = vaultAddress.call{value: address(this).balance / 100}( "" ); require(sent, "Receive: Failed to send Ether to vault"); (sent, ) = tx.origin.call{value: address(this).balance}(""); require(sent, "Receive: Failed to send Ether to tx.origin"); } function swap( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable { uint256 fee = amountIn / 100; amountIn = msg.value - fee; require(path[0] == WETH, "Buy: Path[0] has to be WETH"); require(path[1] != address(0), "Buy: Path[1] can not be address 0"); IERC20 token = IERC20(path[1]); uint256 tokenBalanceDiff; { uint256 tokenBalanceBefore = token.balanceOf(address(this)); IUniswapV2Router(ETHER_VISTA_ROUTER) .swapExactETHForTokensSupportingFeeOnTransferTokens{ value: amountIn }(amountOutMin, path, address(this), deadline); uint256 tokeBalanceAfter = token.balanceOf(address(this)); require( tokeBalanceAfter > tokenBalanceBefore, "Buy: Token balance did not increase" ); tokenBalanceDiff = tokeBalanceAfter - tokenBalanceBefore; require( tokenBalanceDiff > amountOutMin, "Buy: Not enough output amount" ); } token.transfer(to, tokenBalanceDiff); { (bool sent, ) = vaultAddress.call{value: address(this).balance}(""); require(sent, "Buy: Failed to send Ether to vault"); } emit OrderRecord( address(0), path[1], msg.sender, amountIn, tokenBalanceDiff ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@uniswap/v3-core/=lib/v3-core/contracts/", "@uniswap/v3-periphery/=lib/v3-periphery/contracts/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/", "v3-core/=lib/v3-core/", "v3-periphery/=lib/v3-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"fromToken","type":"address"},{"indexed":false,"internalType":"address","name":"toToken","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"returnAmount","type":"uint256"}],"name":"OrderRecord","type":"event"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"vaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040525f80546001600160a01b03191673cd3420a9bda59d7a54baec1dcaafe19b09beb5211790553480156033575f80fd5b506108e9806100415f395ff3fe60806040526004361061002b575f3560e01c8063430bf08a1461019857806390f11e84146101d2575f80fd5b36610194575f80546001600160a01b03166100476064476106e7565b6040515f81818185875af1925050503d805f8114610080576040519150601f19603f3d011682016040523d82523d5f602084013e610085565b606091505b50509050806100ea5760405162461bcd60e51b815260206004820152602660248201527f526563656976653a204661696c656420746f2073656e6420457468657220746f604482015265081d985d5b1d60d21b60648201526084015b60405180910390fd5b604051329047905f81818185875af1925050503d805f8114610127576040519150601f19603f3d011682016040523d82523d5f602084013e61012c565b606091505b505080915050806101925760405162461bcd60e51b815260206004820152602a60248201527f526563656976653a204661696c656420746f2073656e6420457468657220746f604482015269103a3c1737b934b3b4b760b11b60648201526084016100e1565b005b5f80fd5b3480156101a3575f80fd5b505f546101b6906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6101926101e0366004610721565b5f6101ec6064886106e7565b90506101f881346107bb565b965073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc285855f8161021f5761021f6107e0565b905060200201602081019061023491906107f4565b6001600160a01b03161461028a5760405162461bcd60e51b815260206004820152601b60248201527f4275793a20506174685b305d2068617320746f2062652057455448000000000060448201526064016100e1565b5f8585600181811061029e5761029e6107e0565b90506020020160208101906102b391906107f4565b6001600160a01b0316036103135760405162461bcd60e51b815260206004820152602160248201527f4275793a20506174685b315d2063616e206e6f742062652061646472657373206044820152600360fc1b60648201526084016100e1565b5f85856001818110610327576103276107e0565b905060200201602081019061033c91906107f4565b6040516370a0823160e01b81523060048201529091505f9081906001600160a01b038416906370a0823190602401602060405180830381865afa158015610385573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a99190610814565b60405163b6f9de9560e01b815290915073eaaa41cb2a64b11fe761d41e747c032cdd60cace9063b6f9de95908c906103ed908d908d908d9030908d9060040161082b565b5f604051808303818588803b158015610404575f80fd5b505af1158015610416573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f93506001600160a01b03871692506370a082319150602401602060405180830381865afa15801561045f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104839190610814565b90508181116104e05760405162461bcd60e51b815260206004820152602360248201527f4275793a20546f6b656e2062616c616e636520646964206e6f7420696e63726560448201526261736560e81b60648201526084016100e1565b6104ea82826107bb565b925089831161053b5760405162461bcd60e51b815260206004820152601d60248201527f4275793a204e6f7420656e6f756768206f757470757420616d6f756e7400000060448201526064016100e1565b505060405163a9059cbb60e01b81526001600160a01b0386811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af1158015610589573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105ad9190610894565b505f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146105f8576040519150601f19603f3d011682016040523d82523d5f602084013e6105fd565b606091505b50509050806106595760405162461bcd60e51b815260206004820152602260248201527f4275793a204661696c656420746f2073656e6420457468657220746f207661756044820152611b1d60f21b60648201526084016100e1565b507f1bb43f2da90e35f7b0cf38521ca95a49e68eb42fac49924930a5bd73cdf7576c5f8888600181811061068f5761068f6107e0565b90506020020160208101906106a491906107f4565b604080516001600160a01b0393841681529290911660208301523390820152606081018b90526080810183905260a00160405180910390a1505050505050505050565b5f8261070157634e487b7160e01b5f52601260045260245ffd5b500490565b80356001600160a01b038116811461071c575f80fd5b919050565b5f805f805f8060a08789031215610736575f80fd5b8635955060208701359450604087013567ffffffffffffffff8082111561075b575f80fd5b818901915089601f83011261076e575f80fd5b81358181111561077c575f80fd5b8a60208260051b8501011115610790575f80fd5b6020830196508095505050506107a860608801610706565b9150608087013590509295509295509295565b818103818111156107da57634e487b7160e01b5f52601160045260245ffd5b92915050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610804575f80fd5b61080d82610706565b9392505050565b5f60208284031215610824575f80fd5b5051919050565b858152608060208083018290529082018590525f90869060a08401835b88811015610874576001600160a01b0361086185610706565b1682529282019290820190600101610848565b506001600160a01b03969096166040850152505050606001529392505050565b5f602082840312156108a4575f80fd5b8151801515811461080d575f80fdfea26469706673582212201fd670e998ef54652e2d495ded3e9581364e694c91e490c9120927b1c0ffccc164736f6c63430008190033
Deployed Bytecode
0x60806040526004361061002b575f3560e01c8063430bf08a1461019857806390f11e84146101d2575f80fd5b36610194575f80546001600160a01b03166100476064476106e7565b6040515f81818185875af1925050503d805f8114610080576040519150601f19603f3d011682016040523d82523d5f602084013e610085565b606091505b50509050806100ea5760405162461bcd60e51b815260206004820152602660248201527f526563656976653a204661696c656420746f2073656e6420457468657220746f604482015265081d985d5b1d60d21b60648201526084015b60405180910390fd5b604051329047905f81818185875af1925050503d805f8114610127576040519150601f19603f3d011682016040523d82523d5f602084013e61012c565b606091505b505080915050806101925760405162461bcd60e51b815260206004820152602a60248201527f526563656976653a204661696c656420746f2073656e6420457468657220746f604482015269103a3c1737b934b3b4b760b11b60648201526084016100e1565b005b5f80fd5b3480156101a3575f80fd5b505f546101b6906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6101926101e0366004610721565b5f6101ec6064886106e7565b90506101f881346107bb565b965073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc285855f8161021f5761021f6107e0565b905060200201602081019061023491906107f4565b6001600160a01b03161461028a5760405162461bcd60e51b815260206004820152601b60248201527f4275793a20506174685b305d2068617320746f2062652057455448000000000060448201526064016100e1565b5f8585600181811061029e5761029e6107e0565b90506020020160208101906102b391906107f4565b6001600160a01b0316036103135760405162461bcd60e51b815260206004820152602160248201527f4275793a20506174685b315d2063616e206e6f742062652061646472657373206044820152600360fc1b60648201526084016100e1565b5f85856001818110610327576103276107e0565b905060200201602081019061033c91906107f4565b6040516370a0823160e01b81523060048201529091505f9081906001600160a01b038416906370a0823190602401602060405180830381865afa158015610385573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a99190610814565b60405163b6f9de9560e01b815290915073eaaa41cb2a64b11fe761d41e747c032cdd60cace9063b6f9de95908c906103ed908d908d908d9030908d9060040161082b565b5f604051808303818588803b158015610404575f80fd5b505af1158015610416573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f93506001600160a01b03871692506370a082319150602401602060405180830381865afa15801561045f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104839190610814565b90508181116104e05760405162461bcd60e51b815260206004820152602360248201527f4275793a20546f6b656e2062616c616e636520646964206e6f7420696e63726560448201526261736560e81b60648201526084016100e1565b6104ea82826107bb565b925089831161053b5760405162461bcd60e51b815260206004820152601d60248201527f4275793a204e6f7420656e6f756768206f757470757420616d6f756e7400000060448201526064016100e1565b505060405163a9059cbb60e01b81526001600160a01b0386811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af1158015610589573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105ad9190610894565b505f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146105f8576040519150601f19603f3d011682016040523d82523d5f602084013e6105fd565b606091505b50509050806106595760405162461bcd60e51b815260206004820152602260248201527f4275793a204661696c656420746f2073656e6420457468657220746f207661756044820152611b1d60f21b60648201526084016100e1565b507f1bb43f2da90e35f7b0cf38521ca95a49e68eb42fac49924930a5bd73cdf7576c5f8888600181811061068f5761068f6107e0565b90506020020160208101906106a491906107f4565b604080516001600160a01b0393841681529290911660208301523390820152606081018b90526080810183905260a00160405180910390a1505050505050505050565b5f8261070157634e487b7160e01b5f52601260045260245ffd5b500490565b80356001600160a01b038116811461071c575f80fd5b919050565b5f805f805f8060a08789031215610736575f80fd5b8635955060208701359450604087013567ffffffffffffffff8082111561075b575f80fd5b818901915089601f83011261076e575f80fd5b81358181111561077c575f80fd5b8a60208260051b8501011115610790575f80fd5b6020830196508095505050506107a860608801610706565b9150608087013590509295509295509295565b818103818111156107da57634e487b7160e01b5f52601160045260245ffd5b92915050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610804575f80fd5b61080d82610706565b9392505050565b5f60208284031215610824575f80fd5b5051919050565b858152608060208083018290529082018590525f90869060a08401835b88811015610874576001600160a01b0361086185610706565b1682529282019290820190600101610848565b506001600160a01b03969096166040850152505050606001529392505050565b5f602082840312156108a4575f80fd5b8151801515811461080d575f80fdfea26469706673582212201fd670e998ef54652e2d495ded3e9581364e694c91e490c9120927b1c0ffccc164736f6c63430008190033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.