Source Code
Latest 25 from a total of 26 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 16974503 | 1072 days ago | IN | 0 ETH | 0.00113856 | ||||
| Withdraw | 16972273 | 1073 days ago | IN | 0 ETH | 0.00413777 | ||||
| Withdraw | 16972136 | 1073 days ago | IN | 0 ETH | 0.00128584 | ||||
| Withdraw | 16972060 | 1073 days ago | IN | 0 ETH | 0.00123921 | ||||
| Withdraw | 16971984 | 1073 days ago | IN | 0 ETH | 0.00116119 | ||||
| Withdraw | 16971925 | 1073 days ago | IN | 0 ETH | 0.00118204 | ||||
| Withdraw | 16971898 | 1073 days ago | IN | 0 ETH | 0.00128879 | ||||
| Withdraw | 16971851 | 1073 days ago | IN | 0 ETH | 0.00124277 | ||||
| Withdraw | 16971837 | 1073 days ago | IN | 0 ETH | 0.00136798 | ||||
| Withdraw | 16971774 | 1073 days ago | IN | 0 ETH | 0.00123592 | ||||
| Withdraw | 16971643 | 1073 days ago | IN | 0 ETH | 0.00144615 | ||||
| Withdraw | 16971532 | 1073 days ago | IN | 0 ETH | 0.00126041 | ||||
| Withdraw | 16971432 | 1073 days ago | IN | 0 ETH | 0.00132883 | ||||
| Withdraw | 16971370 | 1073 days ago | IN | 0 ETH | 0.00139996 | ||||
| Withdraw | 16971336 | 1073 days ago | IN | 0 ETH | 0.00144291 | ||||
| Withdraw | 16971298 | 1073 days ago | IN | 0 ETH | 0.00157135 | ||||
| Withdraw | 16971268 | 1073 days ago | IN | 0 ETH | 0.0010971 | ||||
| Withdraw | 16971223 | 1073 days ago | IN | 0 ETH | 0.00191314 | ||||
| Withdraw | 16971204 | 1073 days ago | IN | 0 ETH | 0.00211845 | ||||
| Swap Eth For Tok... | 16971181 | 1073 days ago | IN | 0 ETH | 0.00823346 | ||||
| Swap Eth For Tok... | 16971119 | 1073 days ago | IN | 0 ETH | 0.00535738 | ||||
| Swap Eth For Tok... | 16971088 | 1073 days ago | IN | 0 ETH | 0.00580519 | ||||
| Swap Eth For Tok... | 16971027 | 1073 days ago | IN | 0 ETH | 0.01115815 | ||||
| Swap Eth For Tok... | 16963259 | 1074 days ago | IN | 0 ETH | 0.00254214 | ||||
| Transfer | 16963252 | 1074 days ago | IN | 0.1 ETH | 0.00040129 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 16974503 | 1072 days ago | 0.37876738 ETH | ||||
| Transfer | 16972496 | 1073 days ago | 0.03833822 ETH | ||||
| Transfer | 16972387 | 1073 days ago | 0.03823476 ETH | ||||
| Transfer | 16972370 | 1073 days ago | 0.18963384 ETH | ||||
| Transfer | 16972304 | 1073 days ago | 0.11256054 ETH | ||||
| Transfer | 16972273 | 1073 days ago | 0.93861172 ETH | ||||
| Transfer | 16972271 | 1073 days ago | 0.14867646 ETH | ||||
| Transfer | 16972256 | 1073 days ago | 0.11046575 ETH | ||||
| Transfer | 16972241 | 1073 days ago | 0.18215178 ETH | ||||
| Transfer | 16972226 | 1073 days ago | 0.07218302 ETH | ||||
| Transfer | 16972217 | 1073 days ago | 0.35521442 ETH | ||||
| Transfer | 16972192 | 1073 days ago | 0.03500633 ETH | ||||
| Transfer | 16972156 | 1073 days ago | 0.03491391 ETH | ||||
| Transfer | 16972136 | 1073 days ago | 0.51282415 ETH | ||||
| Transfer | 16972135 | 1073 days ago | 0.1041903 ETH | ||||
| Transfer | 16972130 | 1073 days ago | 0.34141836 ETH | ||||
| Transfer | 16972100 | 1073 days ago | 0.03365171 ETH | ||||
| Transfer | 16972077 | 1073 days ago | 0.03356377 ETH | ||||
| Transfer | 16972060 | 1073 days ago | 1.24339832 ETH | ||||
| Transfer | 16972056 | 1073 days ago | 0.33086469 ETH | ||||
| Transfer | 16972044 | 1073 days ago | 0.32238462 ETH | ||||
| Transfer | 16972036 | 1073 days ago | 0.09510326 ETH | ||||
| Transfer | 16972033 | 1073 days ago | 0.34251228 ETH | ||||
| Transfer | 16972015 | 1073 days ago | 0.03066231 ETH | ||||
| Transfer | 16972002 | 1073 days ago | 0.06109068 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Swapper
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
import "contracts/lib/Ownable.sol";
import "contracts/lib/Withdrawable.sol";
import "contracts/swaper/IUniswapV2Router02.sol";
contract Swapper is Ownable, Withdrawable {
address constant dead = 0x000000000000000000000000000000000000dEaD;
IUniswapV2Router02 internal constant _uniswapV2Router =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public tokenAddress;
constructor(address tokenAddress_) Withdrawable(msg.sender) {
tokenAddress = tokenAddress_;
}
receive() external payable {}
function swapEthForTokens() external onlyWithdrawer {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = _uniswapV2Router.WETH();
path[1] = tokenAddress;
// make the swap
_uniswapV2Router.swapExactETHForTokens{value: address(this).balance}(
0,
path,
dead,
block.timestamp
);
}
function setTokenAddress(address tokenAddress_) external onlyWithdrawer {
tokenAddress = tokenAddress_;
}
function swapExactEthForTokens(uint256 eth) external onlyWithdrawer {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = _uniswapV2Router.WETH();
path[1] = tokenAddress;
// make the swap
_uniswapV2Router.swapExactETHForTokens{value: eth}(
0,
path,
dead,
block.timestamp
);
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
interface IOwnable {
function owner() external view returns (address);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwnership(address newOwner) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
import "./IOwnable.sol";
contract Ownable is IOwnable {
address _owner;
constructor() {
_owner = msg.sender;
}
modifier onlyOwner() {
require(_owner == msg.sender, "caller is not the owner");
_;
}
function owner() external view virtual returns (address) {
return _owner;
}
function transferOwnership(address newOwner) external override onlyOwner {
address lastOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(lastOwner, newOwner);
}
}abstract contract Withdrawable {
address internal _withdrawAddress;
constructor(address withdrawAddress__) {
_withdrawAddress = withdrawAddress__;
}
modifier onlyWithdrawer() {
require(msg.sender == _withdrawAddress);
_;
}
function withdraw() external onlyWithdrawer {
_withdraw();
}
function _withdraw() internal {
payable(_withdrawAddress).transfer(address(this).balance);
}
function setWithdrawAddress(address newWithdrawAddress)
external
onlyWithdrawer
{
_withdrawAddress = newWithdrawAddress;
}
function withdrawAddress() external view returns (address) {
return _withdrawAddress;
}
}pragma solidity ^0.8.7;
interface IUniswapV2Router02 {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
}{
"optimizer": {
"enabled": true,
"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":"tokenAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress_","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWithdrawAddress","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapEthForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"swapExactEthForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405234801561001057600080fd5b5060405161090938038061090983398101604081905261002f9161006f565b60008054336001600160a01b03199182168117909255600180548216909217909155600280549091166001600160a01b039290921691909117905561009f565b60006020828403121561008157600080fd5b81516001600160a01b038116811461009857600080fd5b9392505050565b61085b806100ae6000396000f3fe60806040526004361061008a5760003560e01c80638da5cb5b116100595780638da5cb5b146101235780639d76ea5814610141578063b14e055e14610161578063b9a1454f14610176578063f2fde38b1461019657600080fd5b80631581b6001461009657806326a4e8d2146100cc5780633ab1a494146100ee5780633ccfd60b1461010e57600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156100d857600080fd5b506100ec6100e7366004610677565b6101b6565b005b3480156100fa57600080fd5b506100ec610109366004610677565b6101ef565b34801561011a57600080fd5b506100ec610228565b34801561012f57600080fd5b506000546001600160a01b03166100b0565b34801561014d57600080fd5b506002546100b0906001600160a01b031681565b34801561016d57600080fd5b506100ec610249565b34801561018257600080fd5b506100ec61019136600461069b565b6103e0565b3480156101a257600080fd5b506100ec6101b1366004610677565b610578565b6001546001600160a01b031633146101cd57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461020657600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461023f57600080fd5b610247610626565b565b6001546001600160a01b0316331461026057600080fd5b604080516002808252606082018352600092602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906106ca565b8160008151811061030a5761030a6106e7565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061033b5761033b6106e7565b6001600160a01b0390921660209283029190910190910152604051637ff36ab560e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d90637ff36ab590479061039590600090869061dead9042906004016106fd565b60006040518083038185885af11580156103b3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103dc9190810190610767565b5050565b6001546001600160a01b031633146103f757600080fd5b604080516002808252606082018352600092602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048e91906106ca565b816000815181106104a1576104a16106e7565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106104d2576104d26106e7565b6001600160a01b0390921660209283029190910190910152604051637ff36ab560e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d90637ff36ab590849061052c90600090869061dead9042906004016106fd565b60006040518083038185885af115801561054a573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526105739190810190610767565b505050565b6000546001600160a01b031633146105d65760405162461bcd60e51b815260206004820152601760248201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604482015260640160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561065f573d6000803e3d6000fd5b50565b6001600160a01b038116811461065f57600080fd5b60006020828403121561068957600080fd5b813561069481610662565b9392505050565b6000602082840312156106ad57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106dc57600080fd5b815161069481610662565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156107475784516001600160a01b031683529383019391830191600101610722565b50506001600160a01b039690961660408501525050506060015292915050565b6000602080838503121561077a57600080fd5b825167ffffffffffffffff8082111561079257600080fd5b818501915085601f8301126107a657600080fd5b8151818111156107b8576107b86106b4565b8060051b604051601f19603f830116810181811085821117156107dd576107dd6106b4565b6040529182528482019250838101850191888311156107fb57600080fd5b938501935b8285101561081957845184529385019392850192610800565b9897505050505050505056fea26469706673582212203995bdeee21bd36e58058df1683d284a897fb122fffd402aead1534b5f05dda664736f6c63430008110033000000000000000000000000a876f27f13a9eb6e621202cefdd5afc4a90e6457
Deployed Bytecode
0x60806040526004361061008a5760003560e01c80638da5cb5b116100595780638da5cb5b146101235780639d76ea5814610141578063b14e055e14610161578063b9a1454f14610176578063f2fde38b1461019657600080fd5b80631581b6001461009657806326a4e8d2146100cc5780633ab1a494146100ee5780633ccfd60b1461010e57600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156100d857600080fd5b506100ec6100e7366004610677565b6101b6565b005b3480156100fa57600080fd5b506100ec610109366004610677565b6101ef565b34801561011a57600080fd5b506100ec610228565b34801561012f57600080fd5b506000546001600160a01b03166100b0565b34801561014d57600080fd5b506002546100b0906001600160a01b031681565b34801561016d57600080fd5b506100ec610249565b34801561018257600080fd5b506100ec61019136600461069b565b6103e0565b3480156101a257600080fd5b506100ec6101b1366004610677565b610578565b6001546001600160a01b031633146101cd57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461020657600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461023f57600080fd5b610247610626565b565b6001546001600160a01b0316331461026057600080fd5b604080516002808252606082018352600092602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906106ca565b8160008151811061030a5761030a6106e7565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061033b5761033b6106e7565b6001600160a01b0390921660209283029190910190910152604051637ff36ab560e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d90637ff36ab590479061039590600090869061dead9042906004016106fd565b60006040518083038185885af11580156103b3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103dc9190810190610767565b5050565b6001546001600160a01b031633146103f757600080fd5b604080516002808252606082018352600092602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048e91906106ca565b816000815181106104a1576104a16106e7565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106104d2576104d26106e7565b6001600160a01b0390921660209283029190910190910152604051637ff36ab560e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d90637ff36ab590849061052c90600090869061dead9042906004016106fd565b60006040518083038185885af115801561054a573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526105739190810190610767565b505050565b6000546001600160a01b031633146105d65760405162461bcd60e51b815260206004820152601760248201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604482015260640160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561065f573d6000803e3d6000fd5b50565b6001600160a01b038116811461065f57600080fd5b60006020828403121561068957600080fd5b813561069481610662565b9392505050565b6000602082840312156106ad57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106dc57600080fd5b815161069481610662565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156107475784516001600160a01b031683529383019391830191600101610722565b50506001600160a01b039690961660408501525050506060015292915050565b6000602080838503121561077a57600080fd5b825167ffffffffffffffff8082111561079257600080fd5b818501915085601f8301126107a657600080fd5b8151818111156107b8576107b86106b4565b8060051b604051601f19603f830116810181811085821117156107dd576107dd6106b4565b6040529182528482019250838101850191888311156107fb57600080fd5b938501935b8285101561081957845184529385019392850192610800565b9897505050505050505056fea26469706673582212203995bdeee21bd36e58058df1683d284a897fb122fffd402aead1534b5f05dda664736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a876f27f13a9eb6e621202cefdd5afc4a90e6457
-----Decoded View---------------
Arg [0] : tokenAddress_ (address): 0xA876f27F13A9eB6E621202cEFDD5AFc4a90E6457
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a876f27f13a9eb6e621202cefdd5afc4a90e6457
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.