ETH Price: $3,249.51 (+1.17%)

Contract

0xeAfC0892e06f74d6Ea9C511B5F93136fc483564c

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Perform Custom S...4096462482025-12-11 22:00:244 hrs ago1765490424IN
0xeAfC0892...fc483564c
0.000982 ETH0.000002130.010266
Perform Custom S...4096374142025-12-11 21:23:425 hrs ago1765488222IN
0xeAfC0892...fc483564c
0 ETH0.000003430.016855
Perform Custom S...4095849652025-12-11 17:45:408 hrs ago1765475140IN
0xeAfC0892...fc483564c
0 ETH0.000003220.01
Perform Custom S...4095770332025-12-11 17:12:419 hrs ago1765473161IN
0xeAfC0892...fc483564c
0 ETH0.000003380.01
Perform Custom S...4095755152025-12-11 17:06:239 hrs ago1765472783IN
0xeAfC0892...fc483564c
0.00888 ETH0.00000190.01
Perform Custom S...4095753652025-12-11 17:05:459 hrs ago1765472745IN
0xeAfC0892...fc483564c
0 ETH0.000002140.01
Perform Custom S...4095751502025-12-11 17:04:519 hrs ago1765472691IN
0xeAfC0892...fc483564c
0.00888 ETH0.000001670.01
Perform Custom S...4095747942025-12-11 17:03:229 hrs ago1765472602IN
0xeAfC0892...fc483564c
0 ETH0.000002050.01
Perform Custom S...4095695622025-12-11 16:41:4010 hrs ago1765471300IN
0xeAfC0892...fc483564c
0 ETH0.000004810.01413
Perform Custom S...4095593762025-12-11 15:59:2610 hrs ago1765468766IN
0xeAfC0892...fc483564c
0 ETH0.000003910.02289
Perform Custom S...4095582282025-12-11 15:54:4010 hrs ago1765468480IN
0xeAfC0892...fc483564c
0 ETH0.000004290.016571
Perform Custom S...4095578392025-12-11 15:53:0310 hrs ago1765468383IN
0xeAfC0892...fc483564c
0 ETH0.000007360.017177
Perform Custom S...4095575152025-12-11 15:51:4210 hrs ago1765468302IN
0xeAfC0892...fc483564c
0 ETH0.000003970.019332
Perform Custom S...4095562652025-12-11 15:46:3010 hrs ago1765467990IN
0xeAfC0892...fc483564c
0.0004 ETH0.000005360.028193
Perform Custom S...4095534762025-12-11 15:34:5511 hrs ago1765467295IN
0xeAfC0892...fc483564c
0 ETH0.000004660.027293
Perform Custom S...4095515212025-12-11 15:26:4711 hrs ago1765466807IN
0xeAfC0892...fc483564c
0 ETH0.000010160.049481
Perform Custom S...4095480542025-12-11 15:12:2811 hrs ago1765465948IN
0xeAfC0892...fc483564c
0 ETH0.000006310.036844
Perform Custom S...4095315492025-12-11 14:04:0112 hrs ago1765461841IN
0xeAfC0892...fc483564c
0 ETH0.000003130.01
Perform Custom S...4094544342025-12-11 8:43:3818 hrs ago1765442618IN
0xeAfC0892...fc483564c
0 ETH0.000004130.01
Perform Custom S...4094543982025-12-11 8:43:2918 hrs ago1765442609IN
0xeAfC0892...fc483564c
0 ETH0.000001890.01
Perform Custom S...4094541512025-12-11 8:42:2718 hrs ago1765442547IN
0xeAfC0892...fc483564c
0 ETH0.00000150.01
Perform Custom S...4093444562025-12-11 1:06:2125 hrs ago1765415181IN
0xeAfC0892...fc483564c
0.00091801 ETH0.000003770.018288
Perform Custom S...4093434432025-12-11 1:02:0725 hrs ago1765414927IN
0xeAfC0892...fc483564c
0 ETH0.000001910.011681
Perform Custom S...4093337332025-12-11 0:21:4626 hrs ago1765412506IN
0xeAfC0892...fc483564c
0.000828 ETH0.000002050.010019
Perform Custom S...4093138412025-12-10 22:59:0227 hrs ago1765407542IN
0xeAfC0892...fc483564c
0 ETH0.000003320.01
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
4096462482025-12-11 22:00:244 hrs ago1765490424
0xeAfC0892...fc483564c
0.000982 ETH
4095755152025-12-11 17:06:239 hrs ago1765472783
0xeAfC0892...fc483564c
0.00888 ETH
4095753652025-12-11 17:05:459 hrs ago1765472745
0xeAfC0892...fc483564c
0.00883812 ETH
4095753652025-12-11 17:05:459 hrs ago1765472745
0xeAfC0892...fc483564c
0.00883812 ETH
4095751502025-12-11 17:04:519 hrs ago1765472691
0xeAfC0892...fc483564c
0.00888 ETH
4095747942025-12-11 17:03:229 hrs ago1765472602
0xeAfC0892...fc483564c
0.00669195 ETH
4095747942025-12-11 17:03:229 hrs ago1765472602
0xeAfC0892...fc483564c
0.00669195 ETH
4095575152025-12-11 15:51:4210 hrs ago1765468302
0xeAfC0892...fc483564c
0.00039996 ETH
4095575152025-12-11 15:51:4210 hrs ago1765468302
0xeAfC0892...fc483564c
0.00039996 ETH
4095562652025-12-11 15:46:3010 hrs ago1765467990
0xeAfC0892...fc483564c
0.0004 ETH
4095515212025-12-11 15:26:4711 hrs ago1765466807
0xeAfC0892...fc483564c
0.00072531 ETH
4095515212025-12-11 15:26:4711 hrs ago1765466807
0xeAfC0892...fc483564c
0.00072531 ETH
4094544342025-12-11 8:43:3818 hrs ago1765442618
0xeAfC0892...fc483564c
0.00004366 ETH
4094544342025-12-11 8:43:3818 hrs ago1765442618
0xeAfC0892...fc483564c
0.00004366 ETH
4094543982025-12-11 8:43:2918 hrs ago1765442609
0xeAfC0892...fc483564c
0.00003742 ETH
4094543982025-12-11 8:43:2918 hrs ago1765442609
0xeAfC0892...fc483564c
0.00003742 ETH
4094541512025-12-11 8:42:2718 hrs ago1765442547
0xeAfC0892...fc483564c
0.00012373 ETH
4094541512025-12-11 8:42:2718 hrs ago1765442547
0xeAfC0892...fc483564c
0.00012373 ETH
4093444562025-12-11 1:06:2125 hrs ago1765415181
0xeAfC0892...fc483564c
0.00091801 ETH
4093434432025-12-11 1:02:0725 hrs ago1765414927
0xeAfC0892...fc483564c
0.00081667 ETH
4093434432025-12-11 1:02:0725 hrs ago1765414927
0xeAfC0892...fc483564c
0.00081667 ETH
4093337332025-12-11 0:21:4626 hrs ago1765412506
0xeAfC0892...fc483564c
0.000828 ETH
4093138412025-12-10 22:59:0227 hrs ago1765407542
0xeAfC0892...fc483564c
0.00047535 ETH
4093138412025-12-10 22:59:0227 hrs ago1765407542
0xeAfC0892...fc483564c
0.00047535 ETH
4093120752025-12-10 22:51:4127 hrs ago1765407101
0xeAfC0892...fc483564c
0.00029609 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapProxy

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion, None license
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function balanceOf(address who) external view returns (uint256);
}

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint wad) external;
}

interface IUniswapV2Pair {
    function token0() external view returns (address);

    function token1() external view returns (address);

    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;

    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);

    function getAmountOut(address tokenIn, uint256 amountIn) external view returns (uint256);
}

interface IUniswapV3Pool {
    function token0() external view returns (address);

    function token1() external view returns (address);

    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0Delta, int256 amount1Delta);
}

library TickMath {
    // Minimum and maximum tick values for Uniswap V3 calculations
    int24 internal constant MIN_TICK = - 887272;
    int24 internal constant MAX_TICK = - MIN_TICK;

    // Minimum and maximum sqrt ratio values
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
}

contract SwapProxy {
    struct PoolData {
        address pool;   // Address of the pool
        bool isV3;      // true if the pool is Uniswap V3, false if Uniswap V2
        uint256 fee;    // Fee for Uniswap V2 pools
    }

    // Known code hashes for Uniswap pools. These should be updated according to the target network.
//    bytes32 public constant UNISWAP_V2_PAIR_CODE_HASH = 0x96e8ac427619fd51f5f6f7cd0bead1b541476d25c2a44cfe8b45fbee129cd9d6;
//    bytes32 public constant UNISWAP_V3_POOL_CODE_HASH = 0xe34f4b630f1385d1be987053a00f9ef241c95162ba9b0c9f2de3f3f5d37e2883;

    address public WETH;          // Address of the WETH token
    address public owner;         // Owner of the contract
    uint256 public referralFee;   // Referral fee in bps (basis points), 0 to 100 (0% to 1%)

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    constructor(address _WETH) {
        WETH = _WETH;
        owner = msg.sender; // Set deployer as owner
        referralFee = 20;   // Default referral fee: 0.20%
    }

    /**
     * @dev Called by Uniswap V3 pools during a swap to collect the required tokens.
     */
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) public {
        if (data.length == 64) {
            // USUAL UNISWAP V3 SWAP
            (address tokenToPay, bool zeroForOne) = abi.decode(data, (address, bool));

            uint256 amountToPay;

            if (zeroForOne) {
                amountToPay = uint256(amount0Delta);
            } else {
                amountToPay = uint256(amount1Delta);
            }
            IERC20(tokenToPay).transfer(msg.sender, amountToPay);
        }
        else if (data.length == 0) {
            // SIMULATE 1 V3 swap
            revert(
                string(
                abi.encodePacked(
                    "Simulate: ",
                    "{",
                    "\"amount0\":\"", _uint2str(uint256(-amount0Delta)), "\",",
                    "\"amount1\":\"", _uint2str(uint256(-amount1Delta)), "\"",
                    "}"
                )
            )
            );
        }
        else {
            // SIMULATE
            (
                uint256 amountIn,
                PoolData[] memory pools,
                address initialToken,
                uint256 minAmountOut
            ) = abi.decode(data, (uint256, PoolData[], address, uint256));

            (uint256 currentAmount, address currentToken) = performCustomSwapInternal(amountIn, pools, initialToken, minAmountOut, true);
            revert(
                string(
                abi.encodePacked(
                    "Simulate: ",
                    "{",
                    "\"amount\":\"", _uint2str(currentAmount), "\",",
                    "\"token_out\":\"", _addressToString(currentToken), "\"",
                    "}"
                )
            )
            );
        }
    }

    function _addressToString(address _addr) internal pure returns (string memory) {
        bytes32 value = bytes32(uint256(uint160(_addr)));
        bytes memory alphabet = "0123456789abcdef";
        bytes memory str = new bytes(42);

        str[0] = '0';
        str[1] = 'x';

        for (uint256 i = 0; i < 20; i++) {
            str[2 + i * 2] = alphabet[uint8(value[i + 12] >> 4)];
            str[3 + i * 2] = alphabet[uint8(value[i + 12] & 0x0F)];
        }

        return string(str);
    }

    /**
     * @dev Called by Uniswap V3 pools during a swap to collect the required tokens.
     */
    function pancakeV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external {
        uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
    }

    /**
     * @dev Called by Uniswap V3 pools during a swap to collect the required tokens.
     */
    function algebraSwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external {
        uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
    }

    // horizondex
    function swapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata _data
    ) external {
        uniswapV3SwapCallback(amount0Delta, amount1Delta, _data);
    }

    // maverick
    function swapCallback(
        uint256 amount0Delta,
        uint256 amount1Delta,
        bytes calldata _data
    ) external {
        uniswapV3SwapCallback(int256(amount0Delta), int256(amount1Delta), _data);
    }

    function solidlyV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata _data
    ) external {
        // console.log('solidlyV3SwapCallback');
        uniswapV3SwapCallback(amount0Delta, amount1Delta, _data);
    }

    function swapY2XCallback(
        uint256 x,
        uint256 y,
        bytes calldata data
    ) external {
        uniswapV3SwapCallback(int256(y), int256(x), data);
    }

    function swapX2YCallback(
        uint256 x,
        uint256 y,
        bytes calldata data
    ) external {
        uniswapV3SwapCallback(int256(x), int256(y), data);
    }

    /**
     * @notice Executes a sequence of swaps starting from an initial token amount.
     * @param amountIn The initial amount of the input token provided by the user.
     * @param pools The list of pools (V2 or V3) to swap through in order.
     * @param initialToken The token we start swapping from.
     * @param minAmountOut The minimum acceptable amount of the final token after all swaps.
     * @param feeFromInitial If true, the referral fee is deducted from the initial amount.
     */
    function performCustomSwap(
        uint256 amountIn,
        PoolData[] calldata pools,
        address initialToken,
        uint256 minAmountOut,
        bool feeFromInitial
    ) public returns (uint256 currentAmount) {
        IERC20(initialToken).transferFrom(msg.sender, address(this), amountIn);
        address currentToken;
        (currentAmount, currentToken) = performCustomSwapInternal(amountIn, pools, initialToken, minAmountOut, feeFromInitial);
        if (currentToken == WETH) {
            // Unwrap WETH to ETH
            IWETH(WETH).withdraw(currentAmount);
            payable(msg.sender).transfer(currentAmount);
        } else {
            IERC20(currentToken).transfer(msg.sender, currentAmount);
        }
    }

    /**
     * @notice Executes a sequence of swaps starting from an initial token amount.
     * @dev This is a simplified example:
     * - For Uniswap V2, no actual output amount calculation is done.
     * - For Uniswap V3, no comprehensive slippage checks are performed.
     * @param amountIn The initial amount of the input token provided by the user.
     * @param pools The list of pools (V2 or V3) to swap through in order.
     * @param initialToken The token we start swapping from.
     * @param minAmountOut The minimum acceptable amount of the final token after all swaps.
     */
    function performCustomSwapInternal(
        uint256 amountIn,
        PoolData[] memory pools,
        address initialToken,
        uint256 minAmountOut,
        bool feeFromInitial
    ) private returns (uint256 currentAmount, address currentToken) {
        require(amountIn > 0, "amountIn must be > 0");
        // in case of ETH, the amount is already sent to the contract

        if (feeFromInitial) {
            uint256 feeAmount = (amountIn * referralFee) / 10000;
            IERC20(initialToken).transfer(owner, feeAmount);
            amountIn -= feeAmount;
        }

        currentToken = initialToken;
        currentAmount = amountIn;

        for (uint256 i = 0; i < pools.length; i++) {
            // Verify pool code hash to ensure authenticity

            if (pools[i].isV3) {

                // Uniswap V3 logic
                IUniswapV3Pool pool = IUniswapV3Pool(pools[i].pool);
                address token0 = pool.token0();

                bool zeroForOne = (currentToken == token0);

                // Set the price limit
                uint160 sqrtPriceLimitX96 = zeroForOne ? TickMath.MIN_SQRT_RATIO + 1 : TickMath.MAX_SQRT_RATIO - 1;

                (int256 delta0, int256 delta1) = pool.swap(
                    address(this),
                    zeroForOne,
                    int256(currentAmount),
                    sqrtPriceLimitX96,
                    abi.encode(currentToken, zeroForOne)
                );

                // Update current token and amount
                if (zeroForOne) {
                    // token0 -> token1
                    currentToken = pool.token1();
                    currentAmount = uint256(- delta1);
                } else {
                    // token1 -> token0
                    currentToken = token0;
                    currentAmount = uint256(- delta0);
                }

            } else {
                // Load pair and tokens
                IUniswapV2Pair pair = IUniswapV2Pair(pools[i].pool);
                address token0 = pair.token0();
                address token1 = pair.token1();

                // Determine tokenTo
                address tokenTo;
                if (currentToken == token0) {
                    tokenTo = token1;
                } else {
                    tokenTo = token0;
                }

                // Calculate reserves
                uint256 reserveIn;
                uint256 reserveOut;
                {
                    (uint256 reserve0, uint256 reserve1,) = pair.getReserves();
                    if (currentToken == token0) {
                        reserveIn = reserve0;
                        reserveOut = reserve1;
                    } else {
                        reserveIn = reserve1;
                        reserveOut = reserve0;
                    }
                }

                // Calculate amounts
                uint256 amountOut;
                if (pools[i].fee > 1)
                {
                    uint256 amountInWithFee = (currentAmount * (10000 - pools[i].fee)) / 10000;
                    amountOut = (amountInWithFee * reserveOut) / (reserveIn + amountInWithFee);
                }
                else if (pools[i].fee == 1) {
                    amountOut = pair.getAmountOut(currentToken, currentAmount);
                }
                else {
                    // pools[i].fee == 0
                    amountOut = pair.getAmountOut(currentAmount, currentToken);
                }

                uint256 amount0Out = (currentToken == token0) ? 0 : amountOut;
                uint256 amount1Out = (currentToken == token0) ? amountOut : 0;

                // Perform the token transfer and swap
                IERC20(currentToken).transfer(address(pair), currentAmount);
                pair.swap(amount0Out, amount1Out, address(this), "");

                // Update current token and amount
                currentToken = tokenTo;
                currentAmount = IERC20(tokenTo).balanceOf(address(this));
            }
        }
        require(currentAmount >= minAmountOut, "Slippage too high");

        if (!feeFromInitial) {
            uint256 feeAmount = (currentAmount * referralFee) / 10000;
            IERC20(currentToken).transfer(owner, feeAmount);
            currentAmount -= feeAmount;
        }
        return (currentAmount, currentToken);
    }

    /**
     * @notice Overloaded function to accept ETH, wrap it to WETH, and then perform the swaps.
     * @param pools The list of pools for the swap sequence.
     * @param minAmountOut The minimum acceptable amount of the final token.
     */
    function performCustomSwap(
        PoolData[] calldata pools,
        uint256 minAmountOut
    ) external payable returns (uint256 amount) {
        require(msg.value > 0, "No ETH sent");

        // Wrap ETH into WETH
        IWETH(WETH).deposit{value: msg.value}();

        // Call the main function with WETH as the initial token
        address currentToken;
        (amount, currentToken) = performCustomSwapInternal(msg.value, pools, WETH, minAmountOut, true);

        if (currentToken == WETH) {
            // Unwrap WETH to ETH
            IWETH(WETH).withdraw(amount);
            payable(msg.sender).transfer(amount);
        } else {
            IERC20(currentToken).transfer(msg.sender, amount);
        }
    }

    /**
     * @notice Executes a sequence of swaps starting from an initial token amount.
     * @param amountIn The initial amount of the input token provided by the user.
     * @param pools The list of pools (V2 or V3) to swap through in order.
     * @param initialToken The token we start swapping from.
     * @param minAmountOut The minimum acceptable amount of the final token after all swaps.
     * @param simulateUniswapV3Pool address of the Uniswap V3 pool to borrow tokens for simulation
     */
    function simulatePerformCustomSwap(
        uint256 amountIn,
        PoolData[] calldata pools,
        address initialToken,
        uint256 minAmountOut,
        address simulateUniswapV3Pool
    ) public {
        bytes memory simData = abi.encode(
            amountIn,
            pools,
            initialToken,
            minAmountOut
        ); // len = 128
        IUniswapV3Pool v3pool = IUniswapV3Pool(simulateUniswapV3Pool);
        bool zeroForOne = (v3pool.token1() == initialToken);
        uint160 sqrtPriceLimitX96 = zeroForOne
            ? TickMath.MIN_SQRT_RATIO + 1
            : TickMath.MAX_SQRT_RATIO - 1;
        v3pool.swap(
            address(this),
            zeroForOne,
            - int256(amountIn),
            sqrtPriceLimitX96,
            simData
        );
    }

    function simulateSingleV3pool(
        uint256 amountIn,
        address pool,
        address initialToken
    ) public {
        IUniswapV3Pool v3pool = IUniswapV3Pool(pool);
        bool zeroForOne = (v3pool.token0() == initialToken);
        uint160 sqrtPriceLimitX96 = zeroForOne
            ? TickMath.MIN_SQRT_RATIO + 1
            : TickMath.MAX_SQRT_RATIO - 1;
        v3pool.swap(
            address(this),
            zeroForOne,
            int256(amountIn),
            sqrtPriceLimitX96,
            ""
        );
    }

    /**
     * @notice Allows the owner to set the global referral fee in basis points.
     * @param _referralFee The new referral fee in bps (0 to 100).
     *                     For example:
     *                     0   = 0%
     *                     50  = 0.50%
     *                     100 = 1%
     */
    function setReferralFee(uint256 _referralFee) external onlyOwner {
        require(_referralFee <= 100, "Fee cannot exceed 1%");
        referralFee = _referralFee;
    }

    /**
     * @notice Allows the owner to withdraw accumulated fees from this contract.
     * @param token The address of the token to withdraw.
     * @param amount The amount of the token to withdraw.
     */
    function withdrawFees(address token, uint256 amount) external onlyOwner {
        IERC20(token).transfer(owner, amount);
    }

    /**
     * @notice Allows the owner to withdraw accumulated fees from this contract.
     * @param amount The amount of the token to withdraw.
     */
    function withdrawFees(uint256 amount) external onlyOwner {
        payable(owner).transfer(amount);
    }

    // Fallback functions to receive ETH if needed (e.g. after WETH withdraw)
    receive() external payable {}

    fallback() external payable {}

    function _uint2str(uint256 _i) internal pure returns (string memory) {
        if (_i == 0) return "0";
        uint256 j = _i;
        uint256 length;
        while (j != 0) {
            length++;
            j /= 10;
        }
        bytes memory bstr = new bytes(length);
        uint256 k = length;
        j = _i;
        while (j != 0) {
            k--;
            bstr[k] = bytes1(uint8(48 + (j % 10)));
            j /= 10;
        }
        return string(bstr);
    }

}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"algebraSwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pancakeV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"isV3","type":"bool"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct SwapProxy.PoolData[]","name":"pools","type":"tuple[]"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"}],"name":"performCustomSwap","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"isV3","type":"bool"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct SwapProxy.PoolData[]","name":"pools","type":"tuple[]"},{"internalType":"address","name":"initialToken","type":"address"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"bool","name":"feeFromInitial","type":"bool"}],"name":"performCustomSwap","outputs":[{"internalType":"uint256","name":"currentAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referralFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_referralFee","type":"uint256"}],"name":"setReferralFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"isV3","type":"bool"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct SwapProxy.PoolData[]","name":"pools","type":"tuple[]"},{"internalType":"address","name":"initialToken","type":"address"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"simulateUniswapV3Pool","type":"address"}],"name":"simulatePerformCustomSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"initialToken","type":"address"}],"name":"simulateSingleV3pool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"solidlyV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Delta","type":"uint256"},{"internalType":"uint256","name":"amount1Delta","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"swapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"swapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swapX2YCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swapY2XCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052348015600f57600080fd5b5060405161233a38038061233a833981016040819052602c91605e565b600080546001600160a01b039092166001600160a01b031992831617905560018054909116331790556014600255608c565b600060208284031215606f57600080fd5b81516001600160a01b0381168114608557600080fd5b9392505050565b61229f8061009b6000396000f3fe6080604052600436106101005760003560e01c80638da5cb5b1161008f578063ad5c464811610061578063ad5c464814610236578063bc9d487e14610256578063d3e1c28414610276578063fa461e3314610296578063fa483e721461010257005b80638da5cb5b146101be578063923b8a2a14610102578063a13940b0146101f6578063ad3b1b471461021657005b80635e318e07116100d35780635e318e0714610122578063713494d7146101425780637a0f3a2e1461016257806384ae2bc61461018257806389155ef8146101ab57005b8063187806841461010257806323a69e75146101025780632c8958f6146101025780633a1c453c14610102575b005b34801561010e57600080fd5b5061010061011d36600461194c565b6102b6565b34801561012e57600080fd5b5061010061013d36600461199f565b6102c8565b34801561014e57600080fd5b5061010061015d36600461199f565b610339565b34801561016e57600080fd5b5061010061017d3660046119d0565b6103b0565b34801561018e57600080fd5b5061019860025481565b6040519081526020015b60405180910390f35b6101986101b9366004611a57565b610506565b3480156101ca57600080fd5b506001546101de906001600160a01b031681565b6040516001600160a01b0390911681526020016101a2565b34801561020257600080fd5b50610198610211366004611ab1565b610743565b34801561022257600080fd5b50610100610231366004611b2d565b610949565b34801561024257600080fd5b506000546101de906001600160a01b031681565b34801561026257600080fd5b50610100610271366004611b59565b6109ef565b34801561028257600080fd5b5061010061029136600461194c565b610b63565b3480156102a257600080fd5b506101006102b136600461194c565b610b6b565b6102c284848484610b6b565b50505050565b6001546001600160a01b031633146102fb5760405162461bcd60e51b81526004016102f290611bc7565b60405180910390fd5b6001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610335573d6000803e3d6000fd5b5050565b6001546001600160a01b031633146103635760405162461bcd60e51b81526004016102f290611bc7565b60648111156103ab5760405162461bcd60e51b81526020600482015260146024820152734665652063616e6e6f742065786365656420312560601b60448201526064016102f2565b600255565b60008290506000826001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104239190611bea565b6001600160a01b031614905060008161045a57610455600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b61046a565b61046a6401000276a36001611c49565b604051630251596160e31b81523060048201528315156024820152604481018890526001600160a01b03808316606483015260a06084830152600060a48301529192509084169063128acb089060c40160408051808303816000875af11580156104d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fc9190611c68565b5050505050505050565b60008034116105455760405162461bcd60e51b815260206004820152600b60248201526a139bc8115512081cd95b9d60aa1b60448201526064016102f2565b60008054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561059357600080fd5b505af11580156105a7573d6000803e3d6000fd5b5050505050600061061c348686808060200260200160405190810160405280939291908181526020016000905b82821015610600576105f160608302860136819003810190611d3f565b815260200190600101906105d4565b50506000546001600160a01b0316925088915060019050610cc1565b60005491935091506001600160a01b03908116908216036106c857600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156106c2573d6000803e3d6000fd5b5061073b565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0382169063a9059cbb906044016020604051808303816000875af1158015610715573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107399190611d5b565b505b509392505050565b6040516323b872dd60e01b8152336004820152306024820152604481018790526000906001600160a01b038516906323b872dd906064016020604051808303816000875af1158015610799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bd9190611d5b565b50600061081f888888808060200260200160405190810160405280939291908181526020016000905b828210156108125761080360608302860136819003810190611d3f565b815260200190600101906107e6565b5050505050878787610cc1565b60005491935091506001600160a01b03908116908216036108cb57600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561088057600080fd5b505af1158015610894573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156108c5573d6000803e3d6000fd5b5061093e565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0382169063a9059cbb906044016020604051808303816000875af1158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190611d5b565b505b509695505050505050565b6001546001600160a01b031633146109735760405162461bcd60e51b81526004016102f290611bc7565b60015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af11580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190611d5b565b505050565b60008686868686604051602001610a0a959493929190611d78565b604051602081830303815290604052905060008290506000856001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e9190611bea565b6001600160a01b0316149050600081610ac557610ac0600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b610ad5565b610ad56401000276a36001611c49565b90506001600160a01b03831663128acb083084610af18e611e0a565b85896040518663ffffffff1660e01b8152600401610b13959493929190611e76565b60408051808303816000875af1158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b559190611c68565b505050505050505050505050565b6102c2838584845b6040819003610c1357600080610b8383850185611ecc565b9150915060008115610b96575085610b99565b50845b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015610be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0a9190611d5b565b505050506102c2565b6000819003610c7057610c2d610c2885611e0a565b61161c565b610c39610c2885611e0a565b604051602001610c4a929190611f05565b60408051601f198184030181529082905262461bcd60e51b82526102f291600401611fa3565b6000808080610c8185870187611fb6565b9350935093509350600080610c9a868686866001610cc1565b91509150610ca78261161c565b610cb08261172b565b604051602001610c4a929190612094565b60008060008711610d0b5760405162461bcd60e51b81526020600482015260146024820152730616d6f756e74496e206d757374206265203e20360641b60448201526064016102f2565b8215610db657600061271060025489610d249190612133565b610d2e9190612160565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925087169063a9059cbb906044016020604051808303816000875af1158015610d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da79190611d5b565b50610db28189612174565b9750505b508590508360005b865181101561152357868181518110610dd957610dd9612187565b60200260200101516020015115611007576000878281518110610dfe57610dfe612187565b60200260200101516000015190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e709190611bea565b90506001600160a01b0384811690821614600081610eac57610ea7600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b610ebc565b610ebc6401000276a36001611c49565b9050600080856001600160a01b031663128acb0830868c878d8a604051602001610efd9291906001600160a01b039290921682521515602082015260400190565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610f2c959493929190611e76565b60408051808303816000875af1158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611c68565b915091508315610fec57856001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190611bea565b9750610fe581611e0a565b9850610ffc565b84975081610ff990611e0a565b98505b50505050505061151b565b600087828151811061101b5761101b612187565b60200260200101516000015190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108d9190611bea565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f39190611bea565b90506000826001600160a01b0316866001600160a01b03160361111757508061111a565b50815b600080600080876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561115e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118291906121b4565b506001600160701b031691506001600160701b03169150866001600160a01b03168a6001600160a01b0316036111bd578193508092506111c4565b8093508192505b5050600060018e89815181106111dc576111dc612187565b602002602001015160400151111561125a5760006127108f8a8151811061120557611205612187565b60200260200101516040015161271061121e9190612174565b611228908d612133565b6112329190612160565b905061123e81856121f9565b6112488483612133565b6112529190612160565b91505061136b565b8d888151811061126c5761126c612187565b6020026020010151604001516001036112f75760405163ca706bcf60e01b81526001600160a01b038a81166004830152602482018c905288169063ca706bcf90604401602060405180830381865afa1580156112cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f0919061220c565b905061136b565b6040516378a051ad60e11b8152600481018b90526001600160a01b038a8116602483015288169063f140a35a90604401602060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061220c565b90505b6000866001600160a01b03168a6001600160a01b03161461138c578161138f565b60005b90506000876001600160a01b03168b6001600160a01b0316146113b35760006113b5565b825b60405163a9059cbb60e01b81526001600160a01b038b81166004830152602482018f9052919250908c169063a9059cbb906044016020604051808303816000875af1158015611408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190611d5b565b5060405163022c0d9f60e01b8152600481018390526024810182905230604482015260806064820152600060848201526001600160a01b038a169063022c0d9f9060a401600060405180830381600087803b15801561148a57600080fd5b505af115801561149e573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152979c508c976001600160a01b03891692506370a082319150602401602060405180830381865afa1580156114eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150f919061220c565b9b505050505050505050505b600101610dbe565b50838210156115685760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b60448201526064016102f2565b82611612576000612710600254846115809190612133565b61158a9190612160565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af11580156115df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116039190611d5b565b5061160e8184612174565b9250505b9550959350505050565b6060816000036116435750506040805180820190915260018152600360fc1b602082015290565b8160005b811561166d578061165781612225565b91506116669050600a83612160565b9150611647565b60008167ffffffffffffffff81111561168857611688611c8c565b6040519080825280601f01601f1916602001820160405280156116b2576020820181803683370190505b508593509050815b831561172257806116ca8161223e565b91506116d99050600a85612255565b6116e49060306121f9565b60f81b8282815181106116f9576116f9612187565b60200101906001600160f81b031916908160001a90535061171b600a85612160565b93506116ba565b50949350505050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151602a80825260608281019094526001600160a01b0385169291600091602082018180368337019050509050600360fc1b8160008151811061179657611796612187565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106117c5576117c5612187565b60200101906001600160f81b031916908160001a90535060005b601481101561172257826004856117f784600c6121f9565b6020811061180757611807612187565b1a60f81b6001600160f81b031916901c60f81c60ff168151811061182d5761182d612187565b01602001516001600160f81b03191682611848836002612133565b6118539060026121f9565b8151811061186357611863612187565b60200101906001600160f81b031916908160001a905350828461188783600c6121f9565b6020811061189757611897612187565b825191901a600f169081106118ae576118ae612187565b01602001516001600160f81b031916826118c9836002612133565b6118d49060036121f9565b815181106118e4576118e4612187565b60200101906001600160f81b031916908160001a9053506001016117df565b60008083601f84011261191557600080fd5b50813567ffffffffffffffff81111561192d57600080fd5b60208301915083602082850101111561194557600080fd5b9250929050565b6000806000806060858703121561196257600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561198757600080fd5b61199387828801611903565b95989497509550505050565b6000602082840312156119b157600080fd5b5035919050565b6001600160a01b03811681146119cd57600080fd5b50565b6000806000606084860312156119e557600080fd5b8335925060208401356119f7816119b8565b91506040840135611a07816119b8565b809150509250925092565b60008083601f840112611a2457600080fd5b50813567ffffffffffffffff811115611a3c57600080fd5b60208301915083602060608302850101111561194557600080fd5b600080600060408486031215611a6c57600080fd5b833567ffffffffffffffff811115611a8357600080fd5b611a8f86828701611a12565b909790965060209590950135949350505050565b80151581146119cd57600080fd5b60008060008060008060a08789031215611aca57600080fd5b86359550602087013567ffffffffffffffff811115611ae857600080fd5b611af489828a01611a12565b9096509450506040870135611b08816119b8565b9250606087013591506080870135611b1f81611aa3565b809150509295509295509295565b60008060408385031215611b4057600080fd5b8235611b4b816119b8565b946020939093013593505050565b60008060008060008060a08789031215611b7257600080fd5b86359550602087013567ffffffffffffffff811115611b9057600080fd5b611b9c89828a01611a12565b9096509450506040870135611bb0816119b8565b9250606087013591506080870135611b1f816119b8565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b600060208284031215611bfc57600080fd5b8151611c07816119b8565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038281168282160390811115611c4357611c43611c0e565b92915050565b6001600160a01b038181168382160190811115611c4357611c43611c0e565b60008060408385031215611c7b57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611ccb57611ccb611c8c565b604052919050565b600060608284031215611ce557600080fd5b6040516060810167ffffffffffffffff81118282101715611d0857611d08611c8c565b6040529050808235611d19816119b8565b81526020830135611d2981611aa3565b6020820152604092830135920191909152919050565b600060608284031215611d5157600080fd5b611c078383611cd3565b600060208284031215611d6d57600080fd5b8151611c0781611aa3565b858152608060208201819052810184905260008560a08301825b87811015611de1578235611da5816119b8565b6001600160a01b031682526020830135611dbe81611aa3565b151560208301526040838101359083015260609283019290910190600101611d92565b506001600160a01b03861660408501529150611dfa9050565b8260608301529695505050505050565b6000600160ff1b8201611e1f57611e1f611c0e565b5060000390565b60005b83811015611e41578181015183820152602001611e29565b50506000910152565b60008151808452611e62816020860160208601611e26565b601f01601f19169290920160200192915050565b6001600160a01b0386811682528515156020830152604082018590528316606082015260a060808201819052600090611eb190830184611e4a565b979650505050505050565b8035611ec7816119b8565b919050565b60008060408385031215611edf57600080fd5b8235611eea816119b8565b91506020830135611efa81611aa3565b809150509250929050565b69029b4b6bab630ba329d160b51b8152607b60f81b600a8201526a1130b6b7bab73a18111d1160a91b600b8201528251600090611f49816016850160208801611e26565b61088b60f21b6016918401918201526a1130b6b7bab73a18911d1160a91b60188201528351611f7f816023840160208801611e26565b601160f91b60239290910191820152607d60f81b6024820152602501949350505050565b602081526000611c076020830184611e4a565b60008060008060808587031215611fcc57600080fd5b84359350602085013567ffffffffffffffff811115611fea57600080fd5b8501601f81018713611ffb57600080fd5b803567ffffffffffffffff81111561201557612015611c8c565b61202460208260051b01611ca2565b8082825260208201915060206060840285010192508983111561204657600080fd5b6020840193505b828410156120725761205f8a85611cd3565b825260208201915060608401935061204d565b95506120849250505060408601611ebc565b9396929550929360600135925050565b69029b4b6bab630ba329d160b51b8152607b60f81b600a820152691130b6b7bab73a111d1160b11b600b82015282516000906120d7816015850160208801611e26565b61088b60f21b6015918401918201526c113a37b5b2b72fb7baba111d1160991b6017820152835161210f816024840160208801611e26565b601160f91b60249290910191820152607d60f81b6025820152602601949350505050565b8082028115828204841417611c4357611c43611c0e565b634e487b7160e01b600052601260045260246000fd5b60008261216f5761216f61214a565b500490565b81810381811115611c4357611c43611c0e565b634e487b7160e01b600052603260045260246000fd5b80516001600160701b0381168114611ec757600080fd5b6000806000606084860312156121c957600080fd5b6121d28461219d565b92506121e06020850161219d565b9150604084015163ffffffff81168114611a0757600080fd5b80820180821115611c4357611c43611c0e565b60006020828403121561221e57600080fd5b5051919050565b60006001820161223757612237611c0e565b5060010190565b60008161224d5761224d611c0e565b506000190190565b6000826122645761226461214a565b50069056fea2646970667358221220d76b1595c26bb8a817848db55f803bddaad65a17730952ee36459290a42f90b564736f6c634300081b003300000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1

Deployed Bytecode

0x6080604052600436106101005760003560e01c80638da5cb5b1161008f578063ad5c464811610061578063ad5c464814610236578063bc9d487e14610256578063d3e1c28414610276578063fa461e3314610296578063fa483e721461010257005b80638da5cb5b146101be578063923b8a2a14610102578063a13940b0146101f6578063ad3b1b471461021657005b80635e318e07116100d35780635e318e0714610122578063713494d7146101425780637a0f3a2e1461016257806384ae2bc61461018257806389155ef8146101ab57005b8063187806841461010257806323a69e75146101025780632c8958f6146101025780633a1c453c14610102575b005b34801561010e57600080fd5b5061010061011d36600461194c565b6102b6565b34801561012e57600080fd5b5061010061013d36600461199f565b6102c8565b34801561014e57600080fd5b5061010061015d36600461199f565b610339565b34801561016e57600080fd5b5061010061017d3660046119d0565b6103b0565b34801561018e57600080fd5b5061019860025481565b6040519081526020015b60405180910390f35b6101986101b9366004611a57565b610506565b3480156101ca57600080fd5b506001546101de906001600160a01b031681565b6040516001600160a01b0390911681526020016101a2565b34801561020257600080fd5b50610198610211366004611ab1565b610743565b34801561022257600080fd5b50610100610231366004611b2d565b610949565b34801561024257600080fd5b506000546101de906001600160a01b031681565b34801561026257600080fd5b50610100610271366004611b59565b6109ef565b34801561028257600080fd5b5061010061029136600461194c565b610b63565b3480156102a257600080fd5b506101006102b136600461194c565b610b6b565b6102c284848484610b6b565b50505050565b6001546001600160a01b031633146102fb5760405162461bcd60e51b81526004016102f290611bc7565b60405180910390fd5b6001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610335573d6000803e3d6000fd5b5050565b6001546001600160a01b031633146103635760405162461bcd60e51b81526004016102f290611bc7565b60648111156103ab5760405162461bcd60e51b81526020600482015260146024820152734665652063616e6e6f742065786365656420312560601b60448201526064016102f2565b600255565b60008290506000826001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104239190611bea565b6001600160a01b031614905060008161045a57610455600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b61046a565b61046a6401000276a36001611c49565b604051630251596160e31b81523060048201528315156024820152604481018890526001600160a01b03808316606483015260a06084830152600060a48301529192509084169063128acb089060c40160408051808303816000875af11580156104d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fc9190611c68565b5050505050505050565b60008034116105455760405162461bcd60e51b815260206004820152600b60248201526a139bc8115512081cd95b9d60aa1b60448201526064016102f2565b60008054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561059357600080fd5b505af11580156105a7573d6000803e3d6000fd5b5050505050600061061c348686808060200260200160405190810160405280939291908181526020016000905b82821015610600576105f160608302860136819003810190611d3f565b815260200190600101906105d4565b50506000546001600160a01b0316925088915060019050610cc1565b60005491935091506001600160a01b03908116908216036106c857600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156106c2573d6000803e3d6000fd5b5061073b565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0382169063a9059cbb906044016020604051808303816000875af1158015610715573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107399190611d5b565b505b509392505050565b6040516323b872dd60e01b8152336004820152306024820152604481018790526000906001600160a01b038516906323b872dd906064016020604051808303816000875af1158015610799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bd9190611d5b565b50600061081f888888808060200260200160405190810160405280939291908181526020016000905b828210156108125761080360608302860136819003810190611d3f565b815260200190600101906107e6565b5050505050878787610cc1565b60005491935091506001600160a01b03908116908216036108cb57600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561088057600080fd5b505af1158015610894573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156108c5573d6000803e3d6000fd5b5061093e565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0382169063a9059cbb906044016020604051808303816000875af1158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190611d5b565b505b509695505050505050565b6001546001600160a01b031633146109735760405162461bcd60e51b81526004016102f290611bc7565b60015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af11580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190611d5b565b505050565b60008686868686604051602001610a0a959493929190611d78565b604051602081830303815290604052905060008290506000856001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e9190611bea565b6001600160a01b0316149050600081610ac557610ac0600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b610ad5565b610ad56401000276a36001611c49565b90506001600160a01b03831663128acb083084610af18e611e0a565b85896040518663ffffffff1660e01b8152600401610b13959493929190611e76565b60408051808303816000875af1158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b559190611c68565b505050505050505050505050565b6102c2838584845b6040819003610c1357600080610b8383850185611ecc565b9150915060008115610b96575085610b99565b50845b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015610be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0a9190611d5b565b505050506102c2565b6000819003610c7057610c2d610c2885611e0a565b61161c565b610c39610c2885611e0a565b604051602001610c4a929190611f05565b60408051601f198184030181529082905262461bcd60e51b82526102f291600401611fa3565b6000808080610c8185870187611fb6565b9350935093509350600080610c9a868686866001610cc1565b91509150610ca78261161c565b610cb08261172b565b604051602001610c4a929190612094565b60008060008711610d0b5760405162461bcd60e51b81526020600482015260146024820152730616d6f756e74496e206d757374206265203e20360641b60448201526064016102f2565b8215610db657600061271060025489610d249190612133565b610d2e9190612160565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925087169063a9059cbb906044016020604051808303816000875af1158015610d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da79190611d5b565b50610db28189612174565b9750505b508590508360005b865181101561152357868181518110610dd957610dd9612187565b60200260200101516020015115611007576000878281518110610dfe57610dfe612187565b60200260200101516000015190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e709190611bea565b90506001600160a01b0384811690821614600081610eac57610ea7600173fffd8963efd1fc6a506488495d951d5263988d26611c24565b610ebc565b610ebc6401000276a36001611c49565b9050600080856001600160a01b031663128acb0830868c878d8a604051602001610efd9291906001600160a01b039290921682521515602082015260400190565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610f2c959493929190611e76565b60408051808303816000875af1158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611c68565b915091508315610fec57856001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190611bea565b9750610fe581611e0a565b9850610ffc565b84975081610ff990611e0a565b98505b50505050505061151b565b600087828151811061101b5761101b612187565b60200260200101516000015190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108d9190611bea565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f39190611bea565b90506000826001600160a01b0316866001600160a01b03160361111757508061111a565b50815b600080600080876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561115e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118291906121b4565b506001600160701b031691506001600160701b03169150866001600160a01b03168a6001600160a01b0316036111bd578193508092506111c4565b8093508192505b5050600060018e89815181106111dc576111dc612187565b602002602001015160400151111561125a5760006127108f8a8151811061120557611205612187565b60200260200101516040015161271061121e9190612174565b611228908d612133565b6112329190612160565b905061123e81856121f9565b6112488483612133565b6112529190612160565b91505061136b565b8d888151811061126c5761126c612187565b6020026020010151604001516001036112f75760405163ca706bcf60e01b81526001600160a01b038a81166004830152602482018c905288169063ca706bcf90604401602060405180830381865afa1580156112cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f0919061220c565b905061136b565b6040516378a051ad60e11b8152600481018b90526001600160a01b038a8116602483015288169063f140a35a90604401602060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061220c565b90505b6000866001600160a01b03168a6001600160a01b03161461138c578161138f565b60005b90506000876001600160a01b03168b6001600160a01b0316146113b35760006113b5565b825b60405163a9059cbb60e01b81526001600160a01b038b81166004830152602482018f9052919250908c169063a9059cbb906044016020604051808303816000875af1158015611408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190611d5b565b5060405163022c0d9f60e01b8152600481018390526024810182905230604482015260806064820152600060848201526001600160a01b038a169063022c0d9f9060a401600060405180830381600087803b15801561148a57600080fd5b505af115801561149e573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152979c508c976001600160a01b03891692506370a082319150602401602060405180830381865afa1580156114eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150f919061220c565b9b505050505050505050505b600101610dbe565b50838210156115685760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b60448201526064016102f2565b82611612576000612710600254846115809190612133565b61158a9190612160565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af11580156115df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116039190611d5b565b5061160e8184612174565b9250505b9550959350505050565b6060816000036116435750506040805180820190915260018152600360fc1b602082015290565b8160005b811561166d578061165781612225565b91506116669050600a83612160565b9150611647565b60008167ffffffffffffffff81111561168857611688611c8c565b6040519080825280601f01601f1916602001820160405280156116b2576020820181803683370190505b508593509050815b831561172257806116ca8161223e565b91506116d99050600a85612255565b6116e49060306121f9565b60f81b8282815181106116f9576116f9612187565b60200101906001600160f81b031916908160001a90535061171b600a85612160565b93506116ba565b50949350505050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151602a80825260608281019094526001600160a01b0385169291600091602082018180368337019050509050600360fc1b8160008151811061179657611796612187565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106117c5576117c5612187565b60200101906001600160f81b031916908160001a90535060005b601481101561172257826004856117f784600c6121f9565b6020811061180757611807612187565b1a60f81b6001600160f81b031916901c60f81c60ff168151811061182d5761182d612187565b01602001516001600160f81b03191682611848836002612133565b6118539060026121f9565b8151811061186357611863612187565b60200101906001600160f81b031916908160001a905350828461188783600c6121f9565b6020811061189757611897612187565b825191901a600f169081106118ae576118ae612187565b01602001516001600160f81b031916826118c9836002612133565b6118d49060036121f9565b815181106118e4576118e4612187565b60200101906001600160f81b031916908160001a9053506001016117df565b60008083601f84011261191557600080fd5b50813567ffffffffffffffff81111561192d57600080fd5b60208301915083602082850101111561194557600080fd5b9250929050565b6000806000806060858703121561196257600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561198757600080fd5b61199387828801611903565b95989497509550505050565b6000602082840312156119b157600080fd5b5035919050565b6001600160a01b03811681146119cd57600080fd5b50565b6000806000606084860312156119e557600080fd5b8335925060208401356119f7816119b8565b91506040840135611a07816119b8565b809150509250925092565b60008083601f840112611a2457600080fd5b50813567ffffffffffffffff811115611a3c57600080fd5b60208301915083602060608302850101111561194557600080fd5b600080600060408486031215611a6c57600080fd5b833567ffffffffffffffff811115611a8357600080fd5b611a8f86828701611a12565b909790965060209590950135949350505050565b80151581146119cd57600080fd5b60008060008060008060a08789031215611aca57600080fd5b86359550602087013567ffffffffffffffff811115611ae857600080fd5b611af489828a01611a12565b9096509450506040870135611b08816119b8565b9250606087013591506080870135611b1f81611aa3565b809150509295509295509295565b60008060408385031215611b4057600080fd5b8235611b4b816119b8565b946020939093013593505050565b60008060008060008060a08789031215611b7257600080fd5b86359550602087013567ffffffffffffffff811115611b9057600080fd5b611b9c89828a01611a12565b9096509450506040870135611bb0816119b8565b9250606087013591506080870135611b1f816119b8565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b600060208284031215611bfc57600080fd5b8151611c07816119b8565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038281168282160390811115611c4357611c43611c0e565b92915050565b6001600160a01b038181168382160190811115611c4357611c43611c0e565b60008060408385031215611c7b57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611ccb57611ccb611c8c565b604052919050565b600060608284031215611ce557600080fd5b6040516060810167ffffffffffffffff81118282101715611d0857611d08611c8c565b6040529050808235611d19816119b8565b81526020830135611d2981611aa3565b6020820152604092830135920191909152919050565b600060608284031215611d5157600080fd5b611c078383611cd3565b600060208284031215611d6d57600080fd5b8151611c0781611aa3565b858152608060208201819052810184905260008560a08301825b87811015611de1578235611da5816119b8565b6001600160a01b031682526020830135611dbe81611aa3565b151560208301526040838101359083015260609283019290910190600101611d92565b506001600160a01b03861660408501529150611dfa9050565b8260608301529695505050505050565b6000600160ff1b8201611e1f57611e1f611c0e565b5060000390565b60005b83811015611e41578181015183820152602001611e29565b50506000910152565b60008151808452611e62816020860160208601611e26565b601f01601f19169290920160200192915050565b6001600160a01b0386811682528515156020830152604082018590528316606082015260a060808201819052600090611eb190830184611e4a565b979650505050505050565b8035611ec7816119b8565b919050565b60008060408385031215611edf57600080fd5b8235611eea816119b8565b91506020830135611efa81611aa3565b809150509250929050565b69029b4b6bab630ba329d160b51b8152607b60f81b600a8201526a1130b6b7bab73a18111d1160a91b600b8201528251600090611f49816016850160208801611e26565b61088b60f21b6016918401918201526a1130b6b7bab73a18911d1160a91b60188201528351611f7f816023840160208801611e26565b601160f91b60239290910191820152607d60f81b6024820152602501949350505050565b602081526000611c076020830184611e4a565b60008060008060808587031215611fcc57600080fd5b84359350602085013567ffffffffffffffff811115611fea57600080fd5b8501601f81018713611ffb57600080fd5b803567ffffffffffffffff81111561201557612015611c8c565b61202460208260051b01611ca2565b8082825260208201915060206060840285010192508983111561204657600080fd5b6020840193505b828410156120725761205f8a85611cd3565b825260208201915060608401935061204d565b95506120849250505060408601611ebc565b9396929550929360600135925050565b69029b4b6bab630ba329d160b51b8152607b60f81b600a820152691130b6b7bab73a111d1160b11b600b82015282516000906120d7816015850160208801611e26565b61088b60f21b6015918401918201526c113a37b5b2b72fb7baba111d1160991b6017820152835161210f816024840160208801611e26565b601160f91b60249290910191820152607d60f81b6025820152602601949350505050565b8082028115828204841417611c4357611c43611c0e565b634e487b7160e01b600052601260045260246000fd5b60008261216f5761216f61214a565b500490565b81810381811115611c4357611c43611c0e565b634e487b7160e01b600052603260045260246000fd5b80516001600160701b0381168114611ec757600080fd5b6000806000606084860312156121c957600080fd5b6121d28461219d565b92506121e06020850161219d565b9150604084015163ffffffff81168114611a0757600080fd5b80820180821115611c4357611c43611c0e565b60006020828403121561221e57600080fd5b5051919050565b60006001820161223757612237611c0e565b5060010190565b60008161224d5761224d611c0e565b506000190190565b6000826122645761226461214a565b50069056fea2646970667358221220d76b1595c26bb8a817848db55f803bddaad65a17730952ee36459290a42f90b564736f6c634300081b0033

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

00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.