Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 14 from a total of 14 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer | 18385461 | 877 days ago | IN | 0.01 ETH | 0.00161295 | ||||
| Transfer | 18381227 | 878 days ago | IN | 0.145 ETH | 0.0013296 | ||||
| Transfer | 18379469 | 878 days ago | IN | 0.01 ETH | 0.00130915 | ||||
| Transfer | 18342083 | 883 days ago | IN | 0.0045 ETH | 0.00151107 | ||||
| Transfer | 18272791 | 893 days ago | IN | 0.01 ETH | 0.0013485 | ||||
| Transfer | 18140175 | 911 days ago | IN | 0.01 ETH | 0.00150305 | ||||
| Transfer | 18052486 | 924 days ago | IN | 0.01223904 ETH | 0.00151556 | ||||
| Transfer | 18028492 | 927 days ago | IN | 0.01 ETH | 0.00690398 | ||||
| Transfer | 17931759 | 941 days ago | IN | 0.01 ETH | 0.00339034 | ||||
| Transfer | 17929252 | 941 days ago | IN | 0.03 ETH | 0.00431295 | ||||
| Transfer | 17928597 | 941 days ago | IN | 0.01 ETH | 0.00425284 | ||||
| Transfer | 17928565 | 941 days ago | IN | 0.01 ETH | 0.00486831 | ||||
| Transfer | 17928306 | 941 days ago | IN | 0.01 ETH | 0.00433443 | ||||
| Transfer | 17927840 | 941 days ago | IN | 0.01 ETH | 0.00396564 |
Latest 14 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Swap Exact ETH F... | 18385461 | 877 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 18381227 | 878 days ago | 0.145 ETH | ||||
| Swap Exact ETH F... | 18379469 | 878 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 18342083 | 883 days ago | 0.0045 ETH | ||||
| Swap Exact ETH F... | 18272791 | 893 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 18140175 | 911 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 18052486 | 924 days ago | 0.01223904 ETH | ||||
| Swap Exact ETH F... | 18028492 | 927 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 17931759 | 941 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 17929252 | 941 days ago | 0.03 ETH | ||||
| Swap Exact ETH F... | 17928597 | 941 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 17928565 | 941 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 17928306 | 941 days ago | 0.01 ETH | ||||
| Swap Exact ETH F... | 17927840 | 941 days ago | 0.01 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Swap
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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 amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` 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 amount) external returns (bool);
}
// File: @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
// File: @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
// File: contracts/swap.sol
pragma solidity ^0.8.0;
contract Swap {
IUniswapV2Router02 public uniswapRouter;
address public usdcToken;
constructor(address _uniswapRouter, address _usdcToken) {
uniswapRouter = IUniswapV2Router02(_uniswapRouter);
usdcToken = _usdcToken;
}
receive() external payable {
address[] memory path = new address[](2);
path[0] = uniswapRouter.WETH();
path[1] = usdcToken;
uniswapRouter.swapExactETHForTokens{value: msg.value}(
0,
path,
msg.sender,
block.timestamp + 3600
);
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_usdcToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdcToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405234801561001057600080fd5b506040516109ce3803806109ce8339818101604052810190610032919061011d565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061015d565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100ea826100bf565b9050919050565b6100fa816100df565b811461010557600080fd5b50565b600081519050610117816100f1565b92915050565b60008060408385031215610134576101336100ba565b5b600061014285828601610108565b925050602061015385828601610108565b9150509250929050565b6108628061016c6000396000f3fe60806040526004361061002d5760003560e01c806311eac8551461028b578063735de9f7146102b657610286565b36610286576000600267ffffffffffffffff81111561004f5761004e61032b565b5b60405190808252806020026020018201604052801561007d5781602001602082028036833780820191505090505b50905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010f91906103cc565b81600081518110610123576101226103f9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110610194576101936103f9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ff36ab53460008433610e104261021d9190610461565b6040518663ffffffff1660e01b815260040161023c94939291906105b6565b60006040518083038185885af115801561025a573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906102849190610758565b005b600080fd5b34801561029757600080fd5b506102a06102e1565b6040516102ad91906107a1565b60405180910390f35b3480156102c257600080fd5b506102cb610307565b6040516102d89190610811565b60405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103998261036e565b9050919050565b6103a98161038e565b81146103b457600080fd5b50565b6000815190506103c6816103a0565b92915050565b6000602082840312156103e2576103e1610364565b5b60006103f0848285016103b7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061046c82610428565b915061047783610428565b925082820190508082111561048f5761048e610432565b5b92915050565b6000819050919050565b6000819050919050565b60006104c46104bf6104ba84610495565b61049f565b610428565b9050919050565b6104d4816104a9565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61050f8161038e565b82525050565b60006105218383610506565b60208301905092915050565b6000602082019050919050565b6000610545826104da565b61054f81856104e5565b935061055a836104f6565b8060005b8381101561058b5781516105728882610515565b975061057d8361052d565b92505060018101905061055e565b5085935050505092915050565b6105a18161038e565b82525050565b6105b081610428565b82525050565b60006080820190506105cb60008301876104cb565b81810360208301526105dd818661053a565b90506105ec6040830185610598565b6105f960608301846105a7565b95945050505050565b600080fd5b6000601f19601f8301169050919050565b61062182610607565b810181811067ffffffffffffffff821117156106405761063f61032b565b5b80604052505050565b600061065361035a565b905061065f8282610618565b919050565b600067ffffffffffffffff82111561067f5761067e61032b565b5b602082029050602081019050919050565b600080fd5b61069e81610428565b81146106a957600080fd5b50565b6000815190506106bb81610695565b92915050565b60006106d46106cf84610664565b610649565b905080838252602082019050602084028301858111156106f7576106f6610690565b5b835b81811015610720578061070c88826106ac565b8452602084019350506020810190506106f9565b5050509392505050565b600082601f83011261073f5761073e610602565b5b815161074f8482602086016106c1565b91505092915050565b60006020828403121561076e5761076d610364565b5b600082015167ffffffffffffffff81111561078c5761078b610369565b5b6107988482850161072a565b91505092915050565b60006020820190506107b66000830184610598565b92915050565b60006107d76107d26107cd8461036e565b61049f565b61036e565b9050919050565b60006107e9826107bc565b9050919050565b60006107fb826107de565b9050919050565b61080b816107f0565b82525050565b60006020820190506108266000830184610802565b9291505056fea2646970667358221220381a88fc87eb703cb9621050c2e7afa7d51a6ead3371f91ceb0c898009ae05d964736f6c634300081300330000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Deployed Bytecode
0x60806040526004361061002d5760003560e01c806311eac8551461028b578063735de9f7146102b657610286565b36610286576000600267ffffffffffffffff81111561004f5761004e61032b565b5b60405190808252806020026020018201604052801561007d5781602001602082028036833780820191505090505b50905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010f91906103cc565b81600081518110610123576101226103f9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110610194576101936103f9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ff36ab53460008433610e104261021d9190610461565b6040518663ffffffff1660e01b815260040161023c94939291906105b6565b60006040518083038185885af115801561025a573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f820116820180604052508101906102849190610758565b005b600080fd5b34801561029757600080fd5b506102a06102e1565b6040516102ad91906107a1565b60405180910390f35b3480156102c257600080fd5b506102cb610307565b6040516102d89190610811565b60405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103998261036e565b9050919050565b6103a98161038e565b81146103b457600080fd5b50565b6000815190506103c6816103a0565b92915050565b6000602082840312156103e2576103e1610364565b5b60006103f0848285016103b7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061046c82610428565b915061047783610428565b925082820190508082111561048f5761048e610432565b5b92915050565b6000819050919050565b6000819050919050565b60006104c46104bf6104ba84610495565b61049f565b610428565b9050919050565b6104d4816104a9565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61050f8161038e565b82525050565b60006105218383610506565b60208301905092915050565b6000602082019050919050565b6000610545826104da565b61054f81856104e5565b935061055a836104f6565b8060005b8381101561058b5781516105728882610515565b975061057d8361052d565b92505060018101905061055e565b5085935050505092915050565b6105a18161038e565b82525050565b6105b081610428565b82525050565b60006080820190506105cb60008301876104cb565b81810360208301526105dd818661053a565b90506105ec6040830185610598565b6105f960608301846105a7565b95945050505050565b600080fd5b6000601f19601f8301169050919050565b61062182610607565b810181811067ffffffffffffffff821117156106405761063f61032b565b5b80604052505050565b600061065361035a565b905061065f8282610618565b919050565b600067ffffffffffffffff82111561067f5761067e61032b565b5b602082029050602081019050919050565b600080fd5b61069e81610428565b81146106a957600080fd5b50565b6000815190506106bb81610695565b92915050565b60006106d46106cf84610664565b610649565b905080838252602082019050602084028301858111156106f7576106f6610690565b5b835b81811015610720578061070c88826106ac565b8452602084019350506020810190506106f9565b5050509392505050565b600082601f83011261073f5761073e610602565b5b815161074f8482602086016106c1565b91505092915050565b60006020828403121561076e5761076d610364565b5b600082015167ffffffffffffffff81111561078c5761078b610369565b5b6107988482850161072a565b91505092915050565b60006020820190506107b66000830184610598565b92915050565b60006107d76107d26107cd8461036e565b61049f565b61036e565b9050919050565b60006107e9826107bc565b9050919050565b60006107fb826107de565b9050919050565b61080b816107f0565b82525050565b60006020820190506108266000830184610802565b9291505056fea2646970667358221220381a88fc87eb703cb9621050c2e7afa7d51a6ead3371f91ceb0c898009ae05d964736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
-----Decoded View---------------
Arg [0] : _uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [1] : _usdcToken (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.