ETH Price: $3,319.42 (+2.20%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
V2Swap Exact ETH...184622672023-10-30 10:05:47459 days ago1698660347IN
0xAce00EEe...4363b941c
0.00001 ETH0.002814514.32243873
V2Swap Exact ETH...184612822023-10-30 6:47:23459 days ago1698648443IN
0xAce00EEe...4363b941c
0.001 ETH0.00183369.36221934
V2Swap Tokens Fo...178263502023-08-02 9:14:23548 days ago1690967663IN
0xAce00EEe...4363b941c
0 ETH0.0032825215
V2Swap Exact Tok...178255882023-08-02 6:41:11548 days ago1690958471IN
0xAce00EEe...4363b941c
0 ETH0.0042540915
V2Swap Tokens Fo...178255522023-08-02 6:33:59548 days ago1690958039IN
0xAce00EEe...4363b941c
0 ETH0.003641220.60155144
V2Swap Exact Tok...178255222023-08-02 6:27:59548 days ago1690957679IN
0xAce00EEe...4363b941c
0 ETH0.0044620515.00141548
V2Swap ETH For E...178255142023-08-02 6:26:23548 days ago1690957583IN
0xAce00EEe...4363b941c
0.001 ETH0.0031687115.25487966
V3Swap Exact Out...178243212023-08-02 2:26:23548 days ago1690943183IN
0xAce00EEe...4363b941c
0 ETH0.0025510217.67454716
V3Swap Exact Inp...178243122023-08-02 2:24:35549 days ago1690943075IN
0xAce00EEe...4363b941c
0 ETH0.002106815.8
V2Swap Tokens Fo...178242902023-08-02 2:20:11549 days ago1690942811IN
0xAce00EEe...4363b941c
0 ETH0.0022909116.26022324
V2Swap Exact Tok...178242702023-08-02 2:16:11549 days ago1690942571IN
0xAce00EEe...4363b941c
0 ETH0.0026473715.78955076
V2Swap Tokens Fo...178242632023-08-02 2:14:47549 days ago1690942487IN
0xAce00EEe...4363b941c
0 ETH0.0030866417.46394503
V2Swap Exact Tok...178242002023-08-02 2:02:11549 days ago1690941731IN
0xAce00EEe...4363b941c
0 ETH0.0030989518.4047378
V2Swap Exact Tok...178241782023-08-02 1:57:35549 days ago1690941455IN
0xAce00EEe...4363b941c
0 ETH0.0039503918.18646768
V2Swap Exact ETH...178241522023-08-02 1:52:23549 days ago1690941143IN
0xAce00EEe...4363b941c
0.001 ETH0.0037336919
V2Swap Exact ETH...178241422023-08-02 1:50:23549 days ago1690941023IN
0xAce00EEe...4363b941c
0.001 ETH0.0035972918.36741262
V2Swap Exact ETH...178191672023-08-01 9:10:35549 days ago1690881035IN
0xAce00EEe...4363b941c
0.001 ETH0.0042970121.9401355

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
184622672023-10-30 10:05:47459 days ago1698660347
0xAce00EEe...4363b941c
0.00001 ETH
184612822023-10-30 6:47:23459 days ago1698648443
0xAce00EEe...4363b941c
0.001 ETH
181842592023-09-21 12:30:11498 days ago1695299411
0xAce00EEe...4363b941c
0.025 ETH
181842592023-09-21 12:30:11498 days ago1695299411
0xAce00EEe...4363b941c
0.025 ETH
181803002023-09-20 23:11:47499 days ago1695251507
0xAce00EEe...4363b941c
0.004 ETH
181803002023-09-20 23:11:47499 days ago1695251507
0xAce00EEe...4363b941c
0.004 ETH
181785542023-09-20 17:20:11499 days ago1695230411
0xAce00EEe...4363b941c
0.065 ETH
181785542023-09-20 17:20:11499 days ago1695230411
0xAce00EEe...4363b941c
0.065 ETH
180898302023-09-08 6:10:59511 days ago1694153459
0xAce00EEe...4363b941c
0.0001 ETH
180898302023-09-08 6:10:59511 days ago1694153459
0xAce00EEe...4363b941c
0.0001 ETH
180897952023-09-08 6:03:59511 days ago1694153039
0xAce00EEe...4363b941c
0.0001 ETH
180897952023-09-08 6:03:59511 days ago1694153039
0xAce00EEe...4363b941c
0.0001 ETH
180343202023-08-31 11:40:35519 days ago1693482035
0xAce00EEe...4363b941c
0.001 ETH
180343202023-08-31 11:40:35519 days ago1693482035
0xAce00EEe...4363b941c
0.001 ETH
180334992023-08-31 8:55:59519 days ago1693472159
0xAce00EEe...4363b941c
0.0001 ETH
180334992023-08-31 8:55:59519 days ago1693472159
0xAce00EEe...4363b941c
0.0001 ETH
180334472023-08-31 8:45:35519 days ago1693471535
0xAce00EEe...4363b941c
0.0001 ETH
180334472023-08-31 8:45:35519 days ago1693471535
0xAce00EEe...4363b941c
0.0001 ETH
180329912023-08-31 7:14:11519 days ago1693466051
0xAce00EEe...4363b941c
0.05 ETH
180329912023-08-31 7:14:11519 days ago1693466051
0xAce00EEe...4363b941c
0.05 ETH
180329882023-08-31 7:13:35519 days ago1693466015
0xAce00EEe...4363b941c
0.001 ETH
180329882023-08-31 7:13:35519 days ago1693466015
0xAce00EEe...4363b941c
0.001 ETH
180329812023-08-31 7:12:11519 days ago1693465931
0xAce00EEe...4363b941c
0.001 ETH
180329812023-08-31 7:12:11519 days ago1693465931
0xAce00EEe...4363b941c
0.001 ETH
180329792023-08-31 7:11:47519 days ago1693465907
0xAce00EEe...4363b941c
0.00000009 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapCentral

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : SwapCentral.sol
// SPDX-License-Identifier: MIT
pragma solidity >= 0.8.16;

import "./interfaces/IWETH.sol";
import "./interfaces/ISwapV2Router.sol";
import "./interfaces/ISwapV3Router.sol";
import "./libraries/TransferHelper.sol";


contract SwapCentral {
    address public immutable WETH;
    address public owner;
    address private constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
    address private constant UNISWAP_V3_ROUTER = 0xE592427A0AEce92De3Edee1F18E0157C05861564;

    ISwapV2Router private constant routerV2 = ISwapV2Router(UNISWAP_V2_ROUTER);
    ISwapV3Router private constant routerV3 = ISwapV3Router(UNISWAP_V3_ROUTER);

    event NewOwner(address indexed owner, uint time);
    event WithdrawETH(uint amount, uint time);
    event WithdrawToken(address indexed token, uint amount, uint time);
    
    constructor(address _WETH){
        require(_WETH != address(0), "please put the correct WETH token address");
        WETH = _WETH;
        owner = msg.sender;
    }

    modifier onlyOwner(){
        require(msg.sender == owner, "you're not the owner");
        _;
    }

    //---------------Uniswap V2 Starts Here----------------------//
    //get estimation output
    function V2GetEstimatedOut(uint amountIn, address tokenIn, address tokenOut) external view returns (uint[] memory){
        address[] memory path = createPath(tokenIn, tokenOut);
        return routerV2.getAmountsOut(amountIn, path);
    }

    //get estimation input
    function V2GetEstimatedIn(uint amountOutDesired, address tokenIn, address tokenOut) external view returns (uint[] memory){
        address[] memory path = createPath(tokenIn, tokenOut);
        return routerV2.getAmountsIn(amountOutDesired, path);
    }


    //1. token exact amount in, exact token -> token 
    function V2SwapExactTokensForTokens(
        address caller,
        address tokenIn, 
        address tokenOut, 
        uint amountIn, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external returns (uint[] memory amounts)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountIn);

        address[] memory path = createPath(tokenIn, tokenOut);
        amounts = routerV2.swapExactTokensForTokens(
            amountIn,
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }

    //2. token exact amount out, token -> exact token
    function V2SwapTokensForExactTokens(
        address caller, 
        address tokenIn,
        address tokenOut,
        uint amountOutDesired,
        uint amountInMax,
        uint deadlineInSeconds
    ) external returns (uint[] memory amounts) 
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountInMax);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountInMax);

        address[] memory path = createPath(tokenIn, tokenOut);
        amounts = routerV2.swapTokensForExactTokens(
            amountOutDesired,
            amountInMax,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );

        // refund the change to caller
        if(amounts[0] < amountInMax){
            TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, 0);
            TransferHelper.safeTransfer(tokenIn, caller, amountInMax - amounts[0]);
        }
    }

    //3. ETH exact amount in, exact ETH -> token
    function V2SwapExactETHForTokens(
        address caller, 
        address tokenOut, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external payable returns (uint[] memory amounts)
    {
        address[] memory path = createPath(WETH, tokenOut);
        amounts = routerV2.swapExactETHForTokens{value: msg.value}(
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }

    //4. ETH exact amount out, token -> exact ETH
    function V2SwapTokensForExactETH(
        address caller, 
        address tokenIn, 
        uint amountOut, 
        uint amountInMax,
        uint deadlineInSeconds
    ) external returns (uint[] memory amounts)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountInMax);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountInMax);

        address[] memory path = createPath(tokenIn, WETH);
        amounts = routerV2.swapTokensForExactETH(
            amountOut,
            amountInMax,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );

        // refund the change to caller
        if(amounts[0] < amountInMax){
            TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, 0);
            TransferHelper.safeTransfer(tokenIn, caller, amountInMax - amounts[0]);
        }
    }

    // 5. token exact amount in, exact token -> ETH
    function V2SwapExactTokensForETH(
        address caller, 
        address tokenIn, 
        uint amountIn, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external returns (uint[] memory amounts)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountIn);

        address[] memory path = createPath(tokenIn, WETH);
        amounts = routerV2.swapExactTokensForETH(
            amountIn,
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }

    // 6. token exact amout out, ETH -> exact token
    function V2SwapETHForExactTokens(
        address caller, 
        address tokenOut, 
        uint amountOut,
        uint deadlineInSeconds
    ) external payable returns (uint[] memory amounts)
    {
        address[] memory path = createPath(WETH, tokenOut);
        amounts = routerV2.swapETHForExactTokens{value: msg.value}(
            amountOut,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
        // refund the change to caller
        if(amounts[0] < msg.value){
            TransferHelper.safeTransferETH(caller, msg.value - amounts[0]);
        }
    }

    // These functions below are for tokens that require fee when doing transactions
    // 7. token exact input -> token
    function V2SwapExactTokensForTokensSupportingFeeOnTransferTokens(
        address caller, 
        address tokenIn, 
        address tokenOut, 
        uint amountIn, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external 
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountIn);

        address[] memory path = createPath(tokenIn, tokenOut);
        routerV2.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            amountIn,
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }

    // 8. ETH exact input -> token
    function V2SwapExactETHForTokensSupportingFeeOnTransferTokens(
        address caller, 
        address tokenOut, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external payable
    {
        address[] memory path = createPath(WETH, tokenOut);
        routerV2.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }

    // 9. Token exact input -> ETH 
    function V2SwapExactTokensForETHSupportingFeeOnTransferTokens(
        address caller, 
        address tokenIn, 
        uint amountIn, 
        uint amountOutMin,
        uint deadlineInSeconds
    ) external
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn);
        TransferHelper.safeApprove(tokenIn, UNISWAP_V2_ROUTER, amountIn);

        address[] memory path = createPath(tokenIn, WETH);
        routerV2.swapExactTokensForETHSupportingFeeOnTransferTokens(
            amountIn,
            amountOutMin,
            path,
            caller,
            block.timestamp + deadlineInSeconds
        );
    }


    // create path
    function createPath(address tokenIn, address tokenOut) private pure returns (address[] memory){
        address[] memory path = new address[](2);
        path[0] = tokenIn; //input token
        path[1] = tokenOut; //output token
        return path;
    }

    //---------------Uniswap V3 Starts Here----------------------//
    function V3SwapExactInputSingleHop(
        address caller, 
        address tokenIn, 
        address tokenOut,
        uint24 fee, 
        uint amountIn, 
        uint amountOutMin, 
        uint deadlineInSeconds,
        uint160 sqrtPriceLimitX96
    ) external returns (uint amountOut)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn);
        TransferHelper.safeApprove(tokenIn, address(UNISWAP_V3_ROUTER), amountIn);
        

        ISwapV3Router.ExactInputSingleParams memory params = ISwapV3Router
            .ExactInputSingleParams({ 
                tokenIn: tokenIn,
                tokenOut: tokenOut,
                fee: fee,
                recipient: caller,
                deadline: block.timestamp + deadlineInSeconds,
                amountIn: amountIn,
                amountOutMinimum: amountOutMin,
                sqrtPriceLimitX96: sqrtPriceLimitX96
            });
        amountOut = routerV3.exactInputSingle(params);
    }

    function V3SwapExactOutputSingleHop(
        address caller, 
        address tokenIn, 
        address tokenOut, 
        uint24 fee, 
        uint amountOut, 
        uint amountInMax,
        uint deadlineInSeconds,
        uint160 sqrtPriceLimitX96
    ) external returns (uint amountIn)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(this), amountInMax);
        TransferHelper.safeApprove(tokenIn, address(UNISWAP_V3_ROUTER), amountInMax);
        
        ISwapV3Router.ExactOutputSingleParams memory params = ISwapV3Router
            .ExactOutputSingleParams({
                tokenIn: tokenIn,
                tokenOut: tokenOut,
                fee: fee,
                recipient: caller,
                deadline: block.timestamp + deadlineInSeconds,
                amountOut: amountOut,
                amountInMaximum: amountInMax,
                sqrtPriceLimitX96: sqrtPriceLimitX96
            });
        amountIn = routerV3.exactOutputSingle(params);

        // refund to caller
        if (amountIn < amountInMax) {
            TransferHelper.safeApprove(tokenIn, address(UNISWAP_V3_ROUTER), 0);
            TransferHelper.safeTransfer(tokenIn, caller, amountInMax - amountIn);
        }
    }

    //---------------Universal Getter Functions----------------------//
    
    function checkETHBalance() external view returns (uint) {
        return address(this).balance;
    }

    function checkTokenBalance(address token) external view returns (uint){
        return IERC20(token).balanceOf(address(this));
    }

    function withdrawETH() external onlyOwner {
        uint amount = address(this).balance;

        emit WithdrawETH(amount, block.timestamp);
        TransferHelper.safeTransferETH(owner, amount);  
    }

    function withdrawToken(address token) external onlyOwner {
        uint amount = IERC20(token).balanceOf(address(this));
    
        emit WithdrawToken(token, amount, block.timestamp);
        TransferHelper.safeTransfer(token, owner, amount);    
    }

    function changeOwner(address newOwner) external onlyOwner {      
        require(newOwner != address(0), "new candidate can't be address zero");
        owner = newOwner;

        emit NewOwner(newOwner, block.timestamp);
    }
    receive() external payable {}
    fallback() external payable {}
}

File 2 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

interface IERC20 {
    function totalSupply() external view returns (uint256);

    function balanceOf(address _owner) external view returns (uint256);

    function transfer(address to, uint256 amount) external;

    function allowance(
        address from,
        address to,
        uint256 amount
    ) external view returns (bool);

    function approve(address sender, uint256 amount) external;

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external;

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed from, address indexed to, uint256 amount);
}

File 3 of 6 : ISwapV2Router.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

interface ISwapV2Router {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    //token exact amount in, token -> token 1
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    //token exact amount out, token -> token 2
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    //ETH exact amount in, exact ETH -> token 3
    function swapExactETHForTokens
    (uint amountOutMin, 
    address[] calldata path, 
    address to, 
    uint deadline
    ) external payable returns (uint[] memory amounts);

    //ETH exact amount out, token -> exact ETH 4
    function swapTokensForExactETH(
        uint amountOut, 
        uint amountInMax, 
        address[] calldata path, 
        address to, 
        uint deadline
        ) external returns (uint[] memory amounts);


    // token exact amount in, exact token -> ETH 5
    function swapExactTokensForETH(
        uint amountIn, 
        uint amountOutMin, 
        address[] calldata path, 
        address to, 
        uint deadline
        )
        external
        returns (uint[] memory amounts);

    // token exact amout out, ETH -> exact token 6
    function swapETHForExactTokens(
        uint amountOut, 
        address[] calldata path, 
        address to, 
        uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    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;

    // calculate maximum output token, useful for exact token -> token
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    // calculate minimum input token, useful for token -> exact token
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 4 of 6 : ISwapV3Router.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.6;
pragma abicoder v2;

interface ISwapV3Router {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint deadline;
        uint amountIn;
        uint amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    function exactInputSingle(ExactInputSingleParams calldata params)
        external
        payable
        returns (uint amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint deadline;
        uint amountIn;
        uint amountOutMinimum;
    }

    function exactInput(ExactInputParams calldata params)
        external
        payable
        returns (uint amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint deadline;
        uint amountOut;
        uint amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    function exactOutputSingle(ExactOutputSingleParams calldata params)
        external
        payable
        returns (uint amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint deadline;
        uint amountOut;
        uint amountInMaximum;
    }

    function exactOutput(ExactOutputParams calldata params)
        external
        payable
        returns (uint amountIn);
}

File 5 of 6 : IWETH.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.8.18;

interface IWETH {
    function deposit() external payable;

    function withdraw(uint) external;

    function totalSupply() external view returns (uint);

    function balanceOf(address account) external view returns (uint);

    function transfer(address recipient, uint amount) external returns (bool);

    function allowance(address owner, address spender)
        external
        view
        returns (uint);

    function approve(address spender, uint amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint amount
    ) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}

File 6 of 6 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.16;

import '../interfaces/IERC20.sol';

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"WithdrawToken","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"amountOutDesired","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"}],"name":"V2GetEstimatedIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"}],"name":"V2GetEstimatedOut","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutDesired","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"}],"name":"V2SwapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"V3SwapExactInputSingleHop","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"uint256","name":"deadlineInSeconds","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"V3SwapExactOutputSingleHop","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkETHBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"checkTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801561001057600080fd5b50604051611cf2380380611cf283398101604081905261002f916100be565b6001600160a01b03811661009b5760405162461bcd60e51b815260206004820152602960248201527f706c65617365207075742074686520636f7272656374205745544820746f6b656044820152686e206164647265737360b81b606482015260840160405180910390fd5b6001600160a01b0316608052600080546001600160a01b031916331790556100ee565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b608051611bbf610133600039600081816102d601528181610555015281816105ff015281816109fa01528181610d5201528181610e0301526111340152611bbf6000f3fe6080604052600436106101175760003560e01c8063894760691161009a578063c97106bc11610061578063c97106bc14610318578063cdf67b7b14610338578063d6df2ad414610358578063e086e5ec14610378578063e7523cae1461038d57005b8063894760691461024c5780638da5cb5b1461026c578063a6f9dae1146102a4578063ad5c4648146102c4578063c2ea66fc146102f857005b806335cd87c7116100de57806335cd87c7146101b95780634c0a21ce146101d957806351a0e681146101f9578063539794f514610219578063727c7d211461022c57005b8063126cbe6014610120578063131b15221461015357806324e972bf146101665780632554ccd6146101865780632e771e451461019957005b3661011e57005b005b34801561012c57600080fd5b5061014061013b36600461163b565b6103ad565b6040519081526020015b60405180910390f35b34801561015f57600080fd5b5047610140565b34801561017257600080fd5b5061014061018136600461165f565b61041e565b61011e6101943660046116f5565b61054e565b6101ac6101a73660046116f5565b6105f6565b60405161014a919061173b565b3480156101c557600080fd5b506101ac6101d436600461177f565b61070a565b3480156101e557600080fd5b506101406101f436600461165f565b6107d4565b34801561020557600080fd5b5061011e61021436600461177f565b610941565b6101ac6102273660046116f5565b6109f1565b34801561023857600080fd5b506101ac6102473660046117e4565b610ab3565b34801561025857600080fd5b5061011e61026736600461163b565b610b45565b34801561027857600080fd5b5060005461028c906001600160a01b031681565b6040516001600160a01b03909116815260200161014a565b3480156102b057600080fd5b5061011e6102bf36600461163b565b610c45565b3480156102d057600080fd5b5061028c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561030457600080fd5b5061011e610313366004611826565b610d25565b34801561032457600080fd5b506101ac610333366004611826565b610dd4565b34801561034457600080fd5b506101ac61035336600461177f565b610f25565b34801561036457600080fd5b506101ac6103733660046117e4565b611044565b34801561038457600080fd5b5061011e611088565b34801561039957600080fd5b506101ac6103a8366004611826565b611105565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104189190611877565b92915050565b600061042c883330886111ee565b61044b8873e592427a0aece92de3edee1f18e0157c05861564876112f8565b60006040518061010001604052808a6001600160a01b03168152602001896001600160a01b031681526020018862ffffff1681526020018b6001600160a01b03168152602001854261049d91906118a6565b8152602001878152602001868152602001846001600160a01b0316815250905073e592427a0aece92de3edee1f18e0157c058615646001600160a01b031663414bf389826040518263ffffffff1660e01b81526004016104fd91906118b9565b6020604051808303816000875af115801561051c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105409190611877565b9a9950505050505050505050565b600061057a7f0000000000000000000000000000000000000000000000000000000000000000856113f8565b9050600080516020611b6a83398151915263b6f9de953485848961059e88426118a6565b6040518663ffffffff1660e01b81526004016105bd9493929190611967565b6000604051808303818588803b1580156105d657600080fd5b505af11580156105ea573d6000803e3d6000fd5b50505050505050505050565b606060006106247f0000000000000000000000000000000000000000000000000000000000000000866113f8565b9050600080516020611b6a83398151915263fb3bdb413486848a61064889426118a6565b6040518663ffffffff1660e01b81526004016106679493929190611967565b60006040518083038185885af1158015610685573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526106ae91908101906119b2565b915034826000815181106106c4576106c4611a64565b602002602001015110156107015761070186836000815181106106e9576106e9611a64565b6020026020010151346106fc9190611a7a565b611485565b50949350505050565b6060610718863330876111ee565b61073186600080516020611b6a833981519152866112f8565b600061073d87876113f8565b9050600080516020611b6a8339815191526338ed17398686848c61076189426118a6565b6040518663ffffffff1660e01b8152600401610781959493929190611a8d565b6000604051808303816000875af11580156107a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c891908101906119b2565b98975050505050505050565b60006107e2883330876111ee565b6108018873e592427a0aece92de3edee1f18e0157c05861564866112f8565b60006040518061010001604052808a6001600160a01b03168152602001896001600160a01b031681526020018862ffffff1681526020018b6001600160a01b03168152602001854261085391906118a6565b8152602001878152602001868152602001846001600160a01b0316815250905073e592427a0aece92de3edee1f18e0157c058615646001600160a01b031663db3e2198826040518263ffffffff1660e01b81526004016108b391906118b9565b6020604051808303816000875af11580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f69190611877565b915084821015610934576109208973e592427a0aece92de3edee1f18e0157c0586156460006112f8565b610934898b61092f8589611a7a565b61152d565b5098975050505050505050565b61094d853330866111ee565b61096685600080516020611b6a833981519152856112f8565b600061097286866113f8565b9050600080516020611b6a833981519152635c11d7958585848b61099688426118a6565b6040518663ffffffff1660e01b81526004016109b6959493929190611a8d565b600060405180830381600087803b1580156109d057600080fd5b505af11580156109e4573d6000803e3d6000fd5b5050505050505050505050565b60606000610a1f7f0000000000000000000000000000000000000000000000000000000000000000866113f8565b9050600080516020611b6a833981519152637ff36ab53486848a610a4389426118a6565b6040518663ffffffff1660e01b8152600401610a629493929190611967565b60006040518083038185885af1158015610a80573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610aa991908101906119b2565b9695505050505050565b60606000610ac184846113f8565b60405163d06ca61f60e01b8152909150600080516020611b6a8339815191529063d06ca61f90610af79088908590600401611ac9565b600060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b3c91908101906119b2565b95945050505050565b6000546001600160a01b03163314610b785760405162461bcd60e51b8152600401610b6f90611aea565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190611877565b604080518281524260208201529192506001600160a01b038416917f7575c9e41ba6d91ef21e39bd62b5b9df62fc9b0401379fdf9fe1fa372f41e7c1910160405180910390a2600054610c419083906001600160a01b03168361152d565b5050565b6000546001600160a01b03163314610c6f5760405162461bcd60e51b8152600401610b6f90611aea565b6001600160a01b038116610cd15760405162461bcd60e51b815260206004820152602360248201527f6e65772063616e6469646174652063616e27742062652061646472657373207a60448201526265726f60e81b6064820152608401610b6f565b600080546001600160a01b0319166001600160a01b0383169081179091556040514281527fed04b67fc8dcef86f1128afaecff6471d2e3732f6113cfee4304fabed8d112469060200160405180910390a250565b610d31843330866111ee565b610d4a84600080516020611b6a833981519152856112f8565b6000610d76857f00000000000000000000000000000000000000000000000000000000000000006113f8565b9050600080516020611b6a83398151915263791ac9478585848a610d9a88426118a6565b6040518663ffffffff1660e01b8152600401610dba959493929190611a8d565b600060405180830381600087803b1580156105d657600080fd5b6060610de2853330866111ee565b610dfb85600080516020611b6a833981519152856112f8565b6000610e27867f00000000000000000000000000000000000000000000000000000000000000006113f8565b9050600080516020611b6a833981519152634a25d94a8686848b610e4b89426118a6565b6040518663ffffffff1660e01b8152600401610e6b959493929190611a8d565b6000604051808303816000875af1158015610e8a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eb291908101906119b2565b91508382600081518110610ec857610ec8611a64565b60200260200101511015610f1b57610ef086600080516020611b6a83398151915260006112f8565b610f1b868884600081518110610f0857610f08611a64565b60200260200101518761092f9190611a7a565b5095945050505050565b6060610f33863330866111ee565b610f4c86600080516020611b6a833981519152856112f8565b6000610f5887876113f8565b9050600080516020611b6a833981519152638803dbee8686848c610f7c89426118a6565b6040518663ffffffff1660e01b8152600401610f9c959493929190611a8d565b6000604051808303816000875af1158015610fbb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fe391908101906119b2565b91508382600081518110610ff957610ff9611a64565b602002602001015110156110395761102187600080516020611b6a83398151915260006112f8565b611039878984600081518110610f0857610f08611a64565b509695505050505050565b6060600061105284846113f8565b6040516307c0329d60e21b8152909150600080516020611b6a83398151915290631f00ca7490610af79088908590600401611ac9565b6000546001600160a01b031633146110b25760405162461bcd60e51b8152600401610b6f90611aea565b6040805147808252426020830152917ff688aff73316e4513e874095e308eb34c9ab5e4812904528a5f3b909aa609a1d910160405180910390a1600054611102906001600160a01b031682611485565b50565b6060611113853330876111ee565b61112c85600080516020611b6a833981519152866112f8565b6000611158867f00000000000000000000000000000000000000000000000000000000000000006113f8565b9050600080516020611b6a8339815191526318cbafe58686848b61117c89426118a6565b6040518663ffffffff1660e01b815260040161119c959493929190611a8d565b6000604051808303816000875af11580156111bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111e391908101906119b2565b979650505050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916112529190611b18565b6000604051808303816000865af19150503d806000811461128f576040519150601f19603f3d011682016040523d82523d6000602084013e611294565b606091505b50915091508180156112be5750805115806112be5750808060200190518101906112be9190611b47565b6112f05760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606401610b6f565b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113549190611b18565b6000604051808303816000865af19150503d8060008114611391576040519150601f19603f3d011682016040523d82523d6000602084013e611396565b606091505b50915091508180156113c05750805115806113c05750808060200190518101906113c09190611b47565b6113f15760405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606401610b6f565b5050505050565b60408051600280825260608083018452926000929190602083019080368337019050509050838160008151811061143157611431611a64565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018151811061146557611465611a64565b6001600160a01b0390921660209283029190910190910152905092915050565b604080516000808252602082019092526001600160a01b0384169083906040516114af9190611b18565b60006040518083038185875af1925050503d80600081146114ec576040519150601f19603f3d011682016040523d82523d6000602084013e6114f1565b606091505b50509050806115285760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610b6f565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916115899190611b18565b6000604051808303816000865af19150503d80600081146115c6576040519150601f19603f3d011682016040523d82523d6000602084013e6115cb565b606091505b50915091508180156115f55750805115806115f55750808060200190518101906115f59190611b47565b6113f15760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610b6f565b6001600160a01b038116811461110257600080fd5b60006020828403121561164d57600080fd5b813561165881611626565b9392505050565b600080600080600080600080610100898b03121561167c57600080fd5b883561168781611626565b9750602089013561169781611626565b965060408901356116a781611626565b9550606089013562ffffff811681146116bf57600080fd5b94506080890135935060a0890135925060c0890135915060e08901356116e481611626565b809150509295985092959890939650565b6000806000806080858703121561170b57600080fd5b843561171681611626565b9350602085013561172681611626565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b8181101561177357835183529284019291840191600101611757565b50909695505050505050565b60008060008060008060c0878903121561179857600080fd5b86356117a381611626565b955060208701356117b381611626565b945060408701356117c381611626565b959894975094956060810135955060808101359460a0909101359350915050565b6000806000606084860312156117f957600080fd5b83359250602084013561180b81611626565b9150604084013561181b81611626565b809150509250925092565b600080600080600060a0868803121561183e57600080fd5b853561184981611626565b9450602086013561185981611626565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561188957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561041857610418611890565b6101008101610418828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c0808301519084015260e09182015116910152565b600081518084526020808501945080840160005b8381101561195c5781516001600160a01b031687529582019590820190600101611937565b509495945050505050565b8481526080602082015260006119806080830186611923565b6001600160a01b03949094166040830152506060015292915050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119c557600080fd5b825167ffffffffffffffff808211156119dd57600080fd5b818501915085601f8301126119f157600080fd5b815181811115611a0357611a0361199c565b8060051b604051601f19603f83011681018181108582111715611a2857611a2861199c565b604052918252848201925083810185019188831115611a4657600080fd5b938501935b828510156107c857845184529385019392850192611a4b565b634e487b7160e01b600052603260045260246000fd5b8181038181111561041857610418611890565b85815284602082015260a060408201526000611aac60a0830186611923565b6001600160a01b0394909416606083015250608001529392505050565b828152604060208201526000611ae26040830184611923565b949350505050565b6020808252601490820152733cb7ba93b932903737ba103a34329037bbb732b960611b604082015260600190565b6000825160005b81811015611b395760208186018101518583015201611b1f565b506000920191825250919050565b600060208284031215611b5957600080fd5b8151801515811461165857600080fdfe0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488da26469706673582212205ffeb383ffa2d4e6ba570091c1c1554e3b643ac06c813bdff26ed365724fcddd64736f6c63430008120033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106101175760003560e01c8063894760691161009a578063c97106bc11610061578063c97106bc14610318578063cdf67b7b14610338578063d6df2ad414610358578063e086e5ec14610378578063e7523cae1461038d57005b8063894760691461024c5780638da5cb5b1461026c578063a6f9dae1146102a4578063ad5c4648146102c4578063c2ea66fc146102f857005b806335cd87c7116100de57806335cd87c7146101b95780634c0a21ce146101d957806351a0e681146101f9578063539794f514610219578063727c7d211461022c57005b8063126cbe6014610120578063131b15221461015357806324e972bf146101665780632554ccd6146101865780632e771e451461019957005b3661011e57005b005b34801561012c57600080fd5b5061014061013b36600461163b565b6103ad565b6040519081526020015b60405180910390f35b34801561015f57600080fd5b5047610140565b34801561017257600080fd5b5061014061018136600461165f565b61041e565b61011e6101943660046116f5565b61054e565b6101ac6101a73660046116f5565b6105f6565b60405161014a919061173b565b3480156101c557600080fd5b506101ac6101d436600461177f565b61070a565b3480156101e557600080fd5b506101406101f436600461165f565b6107d4565b34801561020557600080fd5b5061011e61021436600461177f565b610941565b6101ac6102273660046116f5565b6109f1565b34801561023857600080fd5b506101ac6102473660046117e4565b610ab3565b34801561025857600080fd5b5061011e61026736600461163b565b610b45565b34801561027857600080fd5b5060005461028c906001600160a01b031681565b6040516001600160a01b03909116815260200161014a565b3480156102b057600080fd5b5061011e6102bf36600461163b565b610c45565b3480156102d057600080fd5b5061028c7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561030457600080fd5b5061011e610313366004611826565b610d25565b34801561032457600080fd5b506101ac610333366004611826565b610dd4565b34801561034457600080fd5b506101ac61035336600461177f565b610f25565b34801561036457600080fd5b506101ac6103733660046117e4565b611044565b34801561038457600080fd5b5061011e611088565b34801561039957600080fd5b506101ac6103a8366004611826565b611105565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104189190611877565b92915050565b600061042c883330886111ee565b61044b8873e592427a0aece92de3edee1f18e0157c05861564876112f8565b60006040518061010001604052808a6001600160a01b03168152602001896001600160a01b031681526020018862ffffff1681526020018b6001600160a01b03168152602001854261049d91906118a6565b8152602001878152602001868152602001846001600160a01b0316815250905073e592427a0aece92de3edee1f18e0157c058615646001600160a01b031663414bf389826040518263ffffffff1660e01b81526004016104fd91906118b9565b6020604051808303816000875af115801561051c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105409190611877565b9a9950505050505050505050565b600061057a7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2856113f8565b9050600080516020611b6a83398151915263b6f9de953485848961059e88426118a6565b6040518663ffffffff1660e01b81526004016105bd9493929190611967565b6000604051808303818588803b1580156105d657600080fd5b505af11580156105ea573d6000803e3d6000fd5b50505050505050505050565b606060006106247f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2866113f8565b9050600080516020611b6a83398151915263fb3bdb413486848a61064889426118a6565b6040518663ffffffff1660e01b81526004016106679493929190611967565b60006040518083038185885af1158015610685573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526106ae91908101906119b2565b915034826000815181106106c4576106c4611a64565b602002602001015110156107015761070186836000815181106106e9576106e9611a64565b6020026020010151346106fc9190611a7a565b611485565b50949350505050565b6060610718863330876111ee565b61073186600080516020611b6a833981519152866112f8565b600061073d87876113f8565b9050600080516020611b6a8339815191526338ed17398686848c61076189426118a6565b6040518663ffffffff1660e01b8152600401610781959493929190611a8d565b6000604051808303816000875af11580156107a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c891908101906119b2565b98975050505050505050565b60006107e2883330876111ee565b6108018873e592427a0aece92de3edee1f18e0157c05861564866112f8565b60006040518061010001604052808a6001600160a01b03168152602001896001600160a01b031681526020018862ffffff1681526020018b6001600160a01b03168152602001854261085391906118a6565b8152602001878152602001868152602001846001600160a01b0316815250905073e592427a0aece92de3edee1f18e0157c058615646001600160a01b031663db3e2198826040518263ffffffff1660e01b81526004016108b391906118b9565b6020604051808303816000875af11580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f69190611877565b915084821015610934576109208973e592427a0aece92de3edee1f18e0157c0586156460006112f8565b610934898b61092f8589611a7a565b61152d565b5098975050505050505050565b61094d853330866111ee565b61096685600080516020611b6a833981519152856112f8565b600061097286866113f8565b9050600080516020611b6a833981519152635c11d7958585848b61099688426118a6565b6040518663ffffffff1660e01b81526004016109b6959493929190611a8d565b600060405180830381600087803b1580156109d057600080fd5b505af11580156109e4573d6000803e3d6000fd5b5050505050505050505050565b60606000610a1f7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2866113f8565b9050600080516020611b6a833981519152637ff36ab53486848a610a4389426118a6565b6040518663ffffffff1660e01b8152600401610a629493929190611967565b60006040518083038185885af1158015610a80573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610aa991908101906119b2565b9695505050505050565b60606000610ac184846113f8565b60405163d06ca61f60e01b8152909150600080516020611b6a8339815191529063d06ca61f90610af79088908590600401611ac9565b600060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b3c91908101906119b2565b95945050505050565b6000546001600160a01b03163314610b785760405162461bcd60e51b8152600401610b6f90611aea565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190611877565b604080518281524260208201529192506001600160a01b038416917f7575c9e41ba6d91ef21e39bd62b5b9df62fc9b0401379fdf9fe1fa372f41e7c1910160405180910390a2600054610c419083906001600160a01b03168361152d565b5050565b6000546001600160a01b03163314610c6f5760405162461bcd60e51b8152600401610b6f90611aea565b6001600160a01b038116610cd15760405162461bcd60e51b815260206004820152602360248201527f6e65772063616e6469646174652063616e27742062652061646472657373207a60448201526265726f60e81b6064820152608401610b6f565b600080546001600160a01b0319166001600160a01b0383169081179091556040514281527fed04b67fc8dcef86f1128afaecff6471d2e3732f6113cfee4304fabed8d112469060200160405180910390a250565b610d31843330866111ee565b610d4a84600080516020611b6a833981519152856112f8565b6000610d76857f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26113f8565b9050600080516020611b6a83398151915263791ac9478585848a610d9a88426118a6565b6040518663ffffffff1660e01b8152600401610dba959493929190611a8d565b600060405180830381600087803b1580156105d657600080fd5b6060610de2853330866111ee565b610dfb85600080516020611b6a833981519152856112f8565b6000610e27867f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26113f8565b9050600080516020611b6a833981519152634a25d94a8686848b610e4b89426118a6565b6040518663ffffffff1660e01b8152600401610e6b959493929190611a8d565b6000604051808303816000875af1158015610e8a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eb291908101906119b2565b91508382600081518110610ec857610ec8611a64565b60200260200101511015610f1b57610ef086600080516020611b6a83398151915260006112f8565b610f1b868884600081518110610f0857610f08611a64565b60200260200101518761092f9190611a7a565b5095945050505050565b6060610f33863330866111ee565b610f4c86600080516020611b6a833981519152856112f8565b6000610f5887876113f8565b9050600080516020611b6a833981519152638803dbee8686848c610f7c89426118a6565b6040518663ffffffff1660e01b8152600401610f9c959493929190611a8d565b6000604051808303816000875af1158015610fbb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fe391908101906119b2565b91508382600081518110610ff957610ff9611a64565b602002602001015110156110395761102187600080516020611b6a83398151915260006112f8565b611039878984600081518110610f0857610f08611a64565b509695505050505050565b6060600061105284846113f8565b6040516307c0329d60e21b8152909150600080516020611b6a83398151915290631f00ca7490610af79088908590600401611ac9565b6000546001600160a01b031633146110b25760405162461bcd60e51b8152600401610b6f90611aea565b6040805147808252426020830152917ff688aff73316e4513e874095e308eb34c9ab5e4812904528a5f3b909aa609a1d910160405180910390a1600054611102906001600160a01b031682611485565b50565b6060611113853330876111ee565b61112c85600080516020611b6a833981519152866112f8565b6000611158867f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26113f8565b9050600080516020611b6a8339815191526318cbafe58686848b61117c89426118a6565b6040518663ffffffff1660e01b815260040161119c959493929190611a8d565b6000604051808303816000875af11580156111bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111e391908101906119b2565b979650505050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916112529190611b18565b6000604051808303816000865af19150503d806000811461128f576040519150601f19603f3d011682016040523d82523d6000602084013e611294565b606091505b50915091508180156112be5750805115806112be5750808060200190518101906112be9190611b47565b6112f05760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606401610b6f565b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113549190611b18565b6000604051808303816000865af19150503d8060008114611391576040519150601f19603f3d011682016040523d82523d6000602084013e611396565b606091505b50915091508180156113c05750805115806113c05750808060200190518101906113c09190611b47565b6113f15760405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606401610b6f565b5050505050565b60408051600280825260608083018452926000929190602083019080368337019050509050838160008151811061143157611431611a64565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018151811061146557611465611a64565b6001600160a01b0390921660209283029190910190910152905092915050565b604080516000808252602082019092526001600160a01b0384169083906040516114af9190611b18565b60006040518083038185875af1925050503d80600081146114ec576040519150601f19603f3d011682016040523d82523d6000602084013e6114f1565b606091505b50509050806115285760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610b6f565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916115899190611b18565b6000604051808303816000865af19150503d80600081146115c6576040519150601f19603f3d011682016040523d82523d6000602084013e6115cb565b606091505b50915091508180156115f55750805115806115f55750808060200190518101906115f59190611b47565b6113f15760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610b6f565b6001600160a01b038116811461110257600080fd5b60006020828403121561164d57600080fd5b813561165881611626565b9392505050565b600080600080600080600080610100898b03121561167c57600080fd5b883561168781611626565b9750602089013561169781611626565b965060408901356116a781611626565b9550606089013562ffffff811681146116bf57600080fd5b94506080890135935060a0890135925060c0890135915060e08901356116e481611626565b809150509295985092959890939650565b6000806000806080858703121561170b57600080fd5b843561171681611626565b9350602085013561172681611626565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b8181101561177357835183529284019291840191600101611757565b50909695505050505050565b60008060008060008060c0878903121561179857600080fd5b86356117a381611626565b955060208701356117b381611626565b945060408701356117c381611626565b959894975094956060810135955060808101359460a0909101359350915050565b6000806000606084860312156117f957600080fd5b83359250602084013561180b81611626565b9150604084013561181b81611626565b809150509250925092565b600080600080600060a0868803121561183e57600080fd5b853561184981611626565b9450602086013561185981611626565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561188957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561041857610418611890565b6101008101610418828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c0808301519084015260e09182015116910152565b600081518084526020808501945080840160005b8381101561195c5781516001600160a01b031687529582019590820190600101611937565b509495945050505050565b8481526080602082015260006119806080830186611923565b6001600160a01b03949094166040830152506060015292915050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119c557600080fd5b825167ffffffffffffffff808211156119dd57600080fd5b818501915085601f8301126119f157600080fd5b815181811115611a0357611a0361199c565b8060051b604051601f19603f83011681018181108582111715611a2857611a2861199c565b604052918252848201925083810185019188831115611a4657600080fd5b938501935b828510156107c857845184529385019392850192611a4b565b634e487b7160e01b600052603260045260246000fd5b8181038181111561041857610418611890565b85815284602082015260a060408201526000611aac60a0830186611923565b6001600160a01b0394909416606083015250608001529392505050565b828152604060208201526000611ae26040830184611923565b949350505050565b6020808252601490820152733cb7ba93b932903737ba103a34329037bbb732b960611b604082015260600190565b6000825160005b81811015611b395760208186018101518583015201611b1f565b506000920191825250919050565b600060208284031215611b5957600080fd5b8151801515811461165857600080fdfe0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488da26469706673582212205ffeb383ffa2d4e6ba570091c1c1554e3b643ac06c813bdff26ed365724fcddd64736f6c63430008120033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.