MATIC Price: $1.01 (+1.40%)
Gas: 79 Gwei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040324743542022-08-30 7:39:04542 days 23 hrs ago1661845144IN
 Create: HSushiSwap
0 MATIC0.0957180741.05754898

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HSushiSwap

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : HSushiSwap.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "../HandlerBase.sol";
import "./libraries/SushiSwapLibrary.sol";
import "../quickswap/IUniswapV2Router02.sol";

contract HSushiSwap is HandlerBase {
    using SafeERC20 for IERC20;

    // prettier-ignore
    address public constant SUSHISWAP_ROUTER = 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506;

    function getContractName() public pure override returns (string memory) {
        return "HSushiSwap";
    }

    function addLiquidityETH(
        uint256 value,
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        )
    {
        _notMaticToken(token);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // Approve token
        value = _getBalance(address(0), value);
        amountTokenDesired = _getBalance(token, amountTokenDesired);
        _tokenApprove(token, SUSHISWAP_ROUTER, amountTokenDesired);

        // Add liquidity ETH
        try
            router.addLiquidityETH{value: value}(
                token,
                amountTokenDesired,
                amountTokenMin,
                amountETHMin,
                address(this),
                block.timestamp
            )
        returns (uint256 ret1, uint256 ret2, uint256 ret3) {
            amountToken = ret1;
            amountETH = ret2;
            liquidity = ret3;
        } catch Error(string memory reason) {
            _revertMsg("addLiquidityETH", reason);
        } catch {
            _revertMsg("addLiquidityETH");
        }
        _tokenApproveZero(token, SUSHISWAP_ROUTER);

        // Update involved token
        address pair =
            SushiSwapLibrary.pairFor(router.factory(), token, router.WETH());
        _updateToken(pair);
    }

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin
    )
        external
        payable
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        )
    {
        _notMaticToken(tokenA);
        _notMaticToken(tokenB);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // Approve token
        amountADesired = _getBalance(tokenA, amountADesired);
        amountBDesired = _getBalance(tokenB, amountBDesired);
        _tokenApprove(tokenA, SUSHISWAP_ROUTER, amountADesired);
        _tokenApprove(tokenB, SUSHISWAP_ROUTER, amountBDesired);

        // Add liquidity
        try
            router.addLiquidity(
                tokenA,
                tokenB,
                amountADesired,
                amountBDesired,
                amountAMin,
                amountBMin,
                address(this),
                block.timestamp
            )
        returns (uint256 ret1, uint256 ret2, uint256 ret3) {
            amountA = ret1;
            amountB = ret2;
            liquidity = ret3;
        } catch Error(string memory reason) {
            _revertMsg("addLiquidity", reason);
        } catch {
            _revertMsg("addLiquidity");
        }
        _tokenApproveZero(tokenA, SUSHISWAP_ROUTER);
        _tokenApproveZero(tokenB, SUSHISWAP_ROUTER);

        // Update involved token
        address pair =
            SushiSwapLibrary.pairFor(router.factory(), tokenA, tokenB);
        _updateToken(pair);
    }

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin
    ) external payable returns (uint256 amountToken, uint256 amountETH) {
        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);
        address pair =
            SushiSwapLibrary.pairFor(router.factory(), token, router.WETH());

        // Approve token
        liquidity = _getBalance(pair, liquidity);
        _tokenApprove(pair, SUSHISWAP_ROUTER, liquidity);

        // remove liquidityETH
        try
            router.removeLiquidityETH(
                token,
                liquidity,
                amountTokenMin,
                amountETHMin,
                address(this),
                block.timestamp
            )
        returns (uint256 ret1, uint256 ret2) {
            amountToken = ret1;
            amountETH = ret2;
        } catch Error(string memory reason) {
            _revertMsg("removeLiquidityETH", reason);
        } catch {
            _revertMsg("removeLiquidityETH");
        }
        _tokenApproveZero(pair, SUSHISWAP_ROUTER);

        // Update involved token
        _updateToken(token);
    }

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin
    ) external payable returns (uint256 amountA, uint256 amountB) {
        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);
        address pair =
            SushiSwapLibrary.pairFor(router.factory(), tokenA, tokenB);

        // Approve token
        liquidity = _getBalance(pair, liquidity);
        _tokenApprove(pair, SUSHISWAP_ROUTER, liquidity);

        // remove liquidity
        try
            router.removeLiquidity(
                tokenA,
                tokenB,
                liquidity,
                amountAMin,
                amountBMin,
                address(this),
                block.timestamp
            )
        returns (uint256 ret1, uint256 ret2) {
            amountA = ret1;
            amountB = ret2;
        } catch Error(string memory reason) {
            _revertMsg("removeLiquidity", reason);
        } catch {
            _revertMsg("removeLiquidity");
        }
        _tokenApproveZero(pair, SUSHISWAP_ROUTER);

        // Update involved token
        _updateToken(tokenA);
        _updateToken(tokenB);
    }

    function swapExactETHForTokens(
        uint256 value,
        uint256 amountOutMin,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(path.length >= 2, "swapExactETHForTokens", "invalid path");
        address tokenOut = path[path.length - 1];

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);
        value = _getBalance(address(0), value);
        try
            router.swapExactETHForTokens{value: value}(
                amountOutMin,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[amounts.length - 1];
        } catch Error(string memory reason) {
            _revertMsg("swapExactETHForTokens", reason);
        } catch {
            _revertMsg("swapExactETHForTokens");
        }

        _updateToken(tokenOut);
    }

    function swapETHForExactTokens(
        uint256 value,
        uint256 amountOut,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(path.length >= 2, "swapETHForExactTokens", "invalid path");
        address tokenOut = path[path.length - 1];

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // if amount == type(uint256).max return balance of Proxy
        value = _getBalance(address(0), value);

        try
            router.swapETHForExactTokens{value: value}(
                amountOut,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[0];
        } catch Error(string memory reason) {
            _revertMsg("swapETHForExactTokens", reason);
        } catch {
            _revertMsg("swapETHForExactTokens");
        }

        _updateToken(tokenOut);
    }

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(path.length >= 2, "swapExactTokensForETH", "invalid path");
        address tokenIn = path[0];
        _notMaticToken(tokenIn);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // Approve token
        amountIn = _getBalance(tokenIn, amountIn);
        _tokenApprove(tokenIn, SUSHISWAP_ROUTER, amountIn);

        try
            router.swapExactTokensForETH(
                amountIn,
                amountOutMin,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[amounts.length - 1];
        } catch Error(string memory reason) {
            _revertMsg("swapExactTokensForETH", reason);
        } catch {
            _revertMsg("swapExactTokensForETH");
        }
        _tokenApproveZero(tokenIn, SUSHISWAP_ROUTER);
    }

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(path.length >= 2, "swapTokensForExactETH", "invalid path");
        address tokenIn = path[0];
        _notMaticToken(tokenIn);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // if amount == type(uint256).max return balance of Proxy
        amountInMax = _getBalance(tokenIn, amountInMax);

        // Approve token
        _tokenApprove(tokenIn, SUSHISWAP_ROUTER, amountInMax);

        try
            router.swapTokensForExactETH(
                amountOut,
                amountInMax,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[0];
        } catch Error(string memory reason) {
            _revertMsg("swapTokensForExactETH", reason);
        } catch {
            _revertMsg("swapTokensForExactETH");
        }
        _tokenApproveZero(tokenIn, SUSHISWAP_ROUTER);
    }

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(
            path.length >= 2,
            "swapExactTokensForTokens",
            "invalid path"
        );
        address tokenIn = path[0];
        address tokenOut = path[path.length - 1];
        _notMaticToken(tokenIn);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // Approve token
        amountIn = _getBalance(tokenIn, amountIn);
        _tokenApprove(tokenIn, SUSHISWAP_ROUTER, amountIn);

        try
            router.swapExactTokensForTokens(
                amountIn,
                amountOutMin,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[amounts.length - 1];
        } catch Error(string memory reason) {
            _revertMsg("swapExactTokensForTokens", reason);
        } catch {
            _revertMsg("swapExactTokensForTokens");
        }
        _tokenApproveZero(tokenIn, SUSHISWAP_ROUTER);

        _updateToken(tokenOut);
    }

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path
    ) external payable returns (uint256 amount) {
        _requireMsg(
            path.length >= 2,
            "swapTokensForExactTokens",
            "invalid path"
        );
        address tokenIn = path[0];
        address tokenOut = path[path.length - 1];
        _notMaticToken(tokenIn);

        // Get uniswapV2 router
        IUniswapV2Router02 router = IUniswapV2Router02(SUSHISWAP_ROUTER);

        // if amount == type(uint256).max return balance of Proxy
        amountInMax = _getBalance(tokenIn, amountInMax);

        // Approve token
        _tokenApprove(tokenIn, SUSHISWAP_ROUTER, amountInMax);

        try
            router.swapTokensForExactTokens(
                amountOut,
                amountInMax,
                path,
                address(this),
                block.timestamp
            )
        returns (uint256[] memory amounts) {
            amount = amounts[0];
        } catch Error(string memory reason) {
            _revertMsg("swapTokensForExactTokens", reason);
        } catch {
            _revertMsg("swapTokensForExactTokens");
        }
        _tokenApproveZero(tokenIn, SUSHISWAP_ROUTER);

        _updateToken(tokenOut);
    }
}

File 2 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 13 : HandlerBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../interface/IERC20Usdt.sol";

import "../Config.sol";
import "../Storage.sol";

abstract contract HandlerBase is Storage, Config {
    using SafeERC20 for IERC20;
    using LibStack for bytes32[];

    address public constant NATIVE_TOKEN_ADDRESS =
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    address private constant MATIC_TOKEN =
        0x0000000000000000000000000000000000001010;

    function postProcess() external payable virtual {
        revert("Invalid post process");
        /* Implementation template
        bytes4 sig = stack.getSig();
        if (sig == bytes4(keccak256(bytes("handlerFunction_1()")))) {
            // Do something
        } else if (sig == bytes4(keccak256(bytes("handlerFunction_2()")))) {
            bytes32 temp = stack.get();
            // Do something
        } else revert("Invalid post process");
        */
    }

    function _updateToken(address token) internal {
        _notMaticToken(token);
        stack.setAddress(token);
        // Ignore token type to fit old handlers
        // stack.setHandlerType(uint256(HandlerType.Token));
    }

    function _updatePostProcess(bytes32[] memory params) internal {
        for (uint256 i = params.length; i > 0; i--) {
            stack.set(params[i - 1]);
        }
        stack.set(msg.sig);
        stack.setHandlerType(HandlerType.Custom);
    }

    function getContractName() public pure virtual returns (string memory);

    function _revertMsg(string memory functionName, string memory reason)
        internal
        pure
    {
        revert(
            string(
                abi.encodePacked(
                    getContractName(),
                    "_",
                    functionName,
                    ": ",
                    reason
                )
            )
        );
    }

    function _revertMsg(string memory functionName) internal pure {
        _revertMsg(functionName, "Unspecified");
    }

    function _requireMsg(
        bool condition,
        string memory functionName,
        string memory reason
    ) internal pure {
        if (!condition) _revertMsg(functionName, reason);
    }

    function _uint2String(uint256 n) internal pure returns (string memory) {
        if (n == 0) {
            return "0";
        } else {
            uint256 len = 0;
            for (uint256 temp = n; temp > 0; temp /= 10) {
                len++;
            }
            bytes memory str = new bytes(len);
            for (uint256 i = len; i > 0; i--) {
                str[i - 1] = bytes1(uint8(48 + (n % 10)));
                n /= 10;
            }
            return string(str);
        }
    }

    function _getBalance(address token, uint256 amount)
        internal
        view
        returns (uint256)
    {
        if (amount != type(uint256).max) {
            return amount;
        }

        // ETH case
        if (token == address(0) || token == NATIVE_TOKEN_ADDRESS) {
            return address(this).balance;
        }
        // ERC20 token case
        return IERC20(token).balanceOf(address(this));
    }

    function _tokenApprove(
        address token,
        address spender,
        uint256 amount
    ) internal {
        try IERC20Usdt(token).approve(spender, amount) {} catch {
            IERC20(token).safeApprove(spender, 0);
            IERC20(token).safeApprove(spender, amount);
        }
    }

    function _tokenApproveZero(address token, address spender) internal {
        if (IERC20Usdt(token).allowance(address(this), spender) > 0) {
            try IERC20Usdt(token).approve(spender, 0) {} catch {
                IERC20Usdt(token).approve(spender, 1);
            }
        }
    }

    // Do not support matic token (0x0000...1010)
    function _notMaticToken(address token) internal pure {
        require(token != MATIC_TOKEN, "Not support matic token");
    }

    function _notMaticToken(address[] memory tokens) internal pure {
        for (uint256 i = 0; i < tokens.length; i++) {
            require(tokens[i] != MATIC_TOKEN, "Not support matic token");
        }
    }

    function _isNotNativeToken(address token) internal pure returns (bool) {
        return (token != address(0) && token != NATIVE_TOKEN_ADDRESS);
    }
}

File 4 of 13 : SushiSwapLibrary.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../quickswap/IUniswapV2Pair.sol";

library SushiSwapLibrary {
    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS");
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(
        address factory,
        address tokenA,
        address tokenB
    ) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);

        pair = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(abi.encodePacked(token0, token1)),
                            hex"e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303" // init code hash
                        )
                    )
                )
            )
        );
    }

    // fetches and sorts the reserves for a pair
    function getReserves(
        address factory,
        address tokenA,
        address tokenB
    ) internal view returns (uint256 reserveA, uint256 reserveB) {
        (address token0, ) = sortTokens(tokenA, tokenB);
        (uint256 reserve0, uint256 reserve1, ) =
            IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0
            ? (reserve0, reserve1)
            : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) internal pure returns (uint256 amountB) {
        require(amountA > 0, "UniswapV2Library: INSUFFICIENT_AMOUNT");
        require(
            reserveA > 0 && reserveB > 0,
            "UniswapV2Library: INSUFFICIENT_LIQUIDITY"
        );
        amountB = (amountA * reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountOut) {
        require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT");
        require(
            reserveIn > 0 && reserveOut > 0,
            "UniswapV2Library: INSUFFICIENT_LIQUIDITY"
        );
        uint256 amountInWithFee = amountIn * 997;
        uint256 numerator = amountInWithFee * reserveOut;
        uint256 denominator = (reserveIn * 1000) + amountInWithFee;
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountIn) {
        require(amountOut > 0, "UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT");
        require(
            reserveIn > 0 && reserveOut > 0,
            "UniswapV2Library: INSUFFICIENT_LIQUIDITY"
        );
        uint256 numerator = reserveIn * amountOut * 1000;
        uint256 denominator = (reserveOut - amountOut) * 997;
        amountIn = (numerator / denominator) + 1;
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(
        address factory,
        uint256 amountIn,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "UniswapV2Library: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[0] = amountIn;
        for (uint256 i; i < path.length - 1; i++) {
            (uint256 reserveIn, uint256 reserveOut) =
                getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(
        address factory,
        uint256 amountOut,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "UniswapV2Library: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint256 i = path.length - 1; i > 0; i--) {
            (uint256 reserveIn, uint256 reserveOut) =
                getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 5 of 13 : IUniswapV2Router02.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;


interface IUniswapV2Router02 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 6 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 13 : IERC20Usdt.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    function transfer(address recipient, uint256 amount) external;

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

    function approve(address spender, uint256 amount) external;

    function transferFrom(address sender, address recipient, uint256 amount) external;

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

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 9 of 13 : Config.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Config {
    // function signature of "postProcess()"
    bytes4 public constant POSTPROCESS_SIG = 0xc2722916;

    // The base amount of percentage function
    uint256 public constant PERCENTAGE_BASE = 1 ether;

    // Handler post-process type. Others should not happen now.
    enum HandlerType {Token, Custom, Others}
}

File 10 of 13 : Storage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./lib/LibCache.sol";
import "./lib/LibStack.sol";

/// @notice A cache structure composed by a bytes32 array
contract Storage {
    using LibCache for mapping(bytes32 => bytes32);
    using LibStack for bytes32[];

    bytes32[] public stack;
    mapping(bytes32 => bytes32) public cache;

    // keccak256 hash of "msg.sender"
    // prettier-ignore
    bytes32 public constant MSG_SENDER_KEY = 0xb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a;

    modifier isStackEmpty() {
        require(stack.length == 0, "Stack not empty");
        _;
    }

    modifier isInitialized() {
        require(_getSender() != address(0), "Sender is not initialized");
        _;
    }

    modifier isNotInitialized() {
        require(_getSender() == address(0), "Sender is initialized");
        _;
    }

    function _setSender() internal isNotInitialized {
        cache.setAddress(MSG_SENDER_KEY, msg.sender);
    }

    function _resetSender() internal {
        cache.setAddress(MSG_SENDER_KEY, address(0));
    }

    function _getSender() internal view returns (address) {
        return cache.getAddress(MSG_SENDER_KEY);
    }
}

File 11 of 13 : LibCache.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library LibCache {
    function set(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        bytes32 _value
    ) internal {
        _cache[_key] = _value;
    }

    function setAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        address _value
    ) internal {
        _cache[_key] = bytes32(uint256(uint160(_value)));
    }

    function setUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        uint256 _value
    ) internal {
        _cache[_key] = bytes32(_value);
    }

    function getAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (address ret) {
        ret = address(uint160(uint256(_cache[_key])));
    }

    function getUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (uint256 ret) {
        ret = uint256(_cache[_key]);
    }

    function get(mapping(bytes32 => bytes32) storage _cache, bytes32 _key)
        internal
        view
        returns (bytes32 ret)
    {
        ret = _cache[_key];
    }
}

File 12 of 13 : LibStack.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../Config.sol";

library LibStack {
    function setAddress(bytes32[] storage _stack, address _input) internal {
        _stack.push(bytes32(uint256(uint160(_input))));
    }

    function set(bytes32[] storage _stack, bytes32 _input) internal {
        _stack.push(_input);
    }

    function setHandlerType(bytes32[] storage _stack, Config.HandlerType _input)
        internal
    {
        _stack.push(bytes12(uint96(_input)));
    }

    function getAddress(bytes32[] storage _stack)
        internal
        returns (address ret)
    {
        ret = address(uint160(uint256(peek(_stack))));
        _stack.pop();
    }

    function getSig(bytes32[] storage _stack) internal returns (bytes4 ret) {
        ret = bytes4(peek(_stack));
        _stack.pop();
    }

    function get(bytes32[] storage _stack) internal returns (bytes32 ret) {
        ret = peek(_stack);
        _stack.pop();
    }

    function peek(bytes32[] storage _stack)
        internal
        view
        returns (bytes32 ret)
    {
        uint256 length = _stack.length;
        require(length > 0, "stack empty");
        ret = _stack[length - 1];
    }

    function peek(bytes32[] storage _stack, uint256 _index)
        internal
        view
        returns (bytes32 ret)
    {
        uint256 length = _stack.length;
        require(length > 0, "stack empty");
        require(length > _index, "not enough elements in stack");
        ret = _stack[length - _index - 1];
    }
}

File 13 of 13 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"MSG_SENDER_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENTAGE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSTPROCESS_SIG","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHISWAP_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"cache","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"postProcess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stack","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b50612935806100206000396000f3fe6080604052600436106101145760003560e01c806399eb59b9116100a0578063df2ebdbb11610064578063df2ebdbb146102d5578063e2dc85dc146102fd578063ef66f72514610310578063f5f5ba7214610323578063fa2901a51461035c57600080fd5b806399eb59b914610243578063a1cfacde14610270578063c272291614610298578063d0241dac146102a2578063dc9031c4146102b557600080fd5b8063397d4b4a116100e7578063397d4b4a146101db57806358871c81146101ee57806386818f261461020157806387151a791461021457806387c139431461022757600080fd5b80630f532d181461011957806318a22c4014610160578063277754ed146101735780633351733f146101ad575b600080fd5b34801561012557600080fd5b5061014d7fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a81565b6040519081526020015b60405180910390f35b61014d61016e3660046122b5565b610390565b34801561017f57600080fd5b506101956000805160206128e083398151915281565b6040516001600160a01b039091168152602001610157565b6101c06101bb36600461234d565b6105bb565b60408051938452602084019290925290820152606001610157565b61014d6101e93660046122b5565b610812565b6101c06101fc3660046123a6565b610a85565b61014d61020f3660046122b5565b610ce8565b61014d6102223660046122b5565b610f24565b34801561023357600080fd5b5061014d670de0b6b3a764000081565b34801561024f57600080fd5b5061014d61025e3660046123ee565b60016020526000908152604090205481565b61028361027e366004612407565b61111d565b60408051928352602083019190915201610157565b6102a0611341565b005b61014d6102b03660046122b5565b611385565b3480156102c157600080fd5b5061014d6102d03660046123ee565b61156a565b3480156102e157600080fd5b5061019573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b61028361030b366004612442565b61158b565b61014d61031e3660046122b5565b611798565b34801561032f57600080fd5b50604080518082018252600a8152690485375736869537761760b41b6020820152905161015791906124a5565b34801561036857600080fd5b50610377636139148b60e11b81565b6040516001600160e01b03199091168152602001610157565b60006103f56002848490501015604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383600081811061040a5761040a6124d8565b905060200201602081019061041f91906124ee565b905061042a816119aa565b6000805160206128e08339815191526104438287611a08565b955061045e826000805160206128e083398151915288611ac9565b604051632512eca560e11b81526001600160a01b03821690634a25d94a90610494908a908a908a908a9030904290600401612554565b6000604051808303816000875af19250505080156104d457506040513d6000823e601f3d908101601f191682016040526104d191908101906125d5565b60015b61057a576104e061267c565b806308c379a0141561053d57506104f5612698565b80610500575061053f565b610537604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b81525082611b51565b50610599565b505b610575604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b815250611bac565b610599565b8060008151811061058d5761058d6124d8565b60200260200101519350505b6105b1826000805160206128e0833981519152611bd9565b5050949350505050565b60008060006105c9896119aa565b6105d2886119aa565b6000805160206128e08339815191526105eb8a89611a08565b97506105f78988611a08565b96506106128a6000805160206128e08339815191528a611ac9565b61062b896000805160206128e083398151915289611ac9565b60405162e8e33760e81b81526001600160a01b038b811660048301528a81166024830152604482018a9052606482018990526084820188905260a482018790523060c48301524260e483015282169063e8e3370090610104016060604051808303816000875af19250505080156106bf575060408051601f3d908101601f191682019092526106bc91810190612722565b60015b610753576106cb61267c565b806308c379a0141561071f57506106e0612698565b806106eb5750610721565b6107196040518060400160405280600c81526020016b6164644c697175696469747960a01b81525082611b51565b5061075b565b505b61074e6040518060400160405280600c81526020016b6164644c697175696469747960a01b815250611bac565b61075b565b919550935091505b6107738a6000805160206128e0833981519152611bd9565b61078b896000805160206128e0833981519152611bd9565b60006107f9826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190612750565b8c8c611d19565b905061080481611df2565b505096509650969350505050565b600061087a60028484905010156040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383600081811061088f5761088f6124d8565b90506020020160208101906108a491906124ee565b9050600084846108b560018261276d565b8181106108c4576108c46124d8565b90506020020160208101906108d991906124ee565b90506108e4826119aa565b6000805160206128e08339815191526108fd8388611a08565b9650610918836000805160206128e083398151915289611ac9565b604051634401edf760e11b81526001600160a01b03821690638803dbee9061094e908b908b908b908b9030904290600401612554565b6000604051808303816000875af192505050801561098e57506040513d6000823e601f3d908101601f1916820160405261098b91908101906125d5565b60015b610a3a5761099a61267c565b806308c379a014156109fa57506109af612698565b806109ba57506109fc565b6109f46040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b81525082611b51565b50610a59565b505b610a356040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b815250611bac565b610a59565b80600081518110610a4d57610a4d6124d8565b60200260200101519450505b610a71836000805160206128e0833981519152611bd9565b610a7a82611df2565b505050949350505050565b6000806000610a93876119aa565b6000805160206128e0833981519152610aad60008a611a08565b9850610ab98888611a08565b9650610ad4886000805160206128e083398151915289611ac9565b60405163f305d71960e01b81526001600160a01b0382169063f305d719908b90610b0c908c908c908c908c9030904290600401612792565b60606040518083038185885af193505050508015610b47575060408051601f3d908101601f19168201909252610b4491810190612722565b60015b610be157610b5361267c565b806308c379a01415610baa5750610b68612698565b80610b735750610bac565b610ba46040518060400160405280600f81526020016e0c2c8c898d2e2ead2c8d2e8f28aa89608b1b81525082611b51565b50610be9565b505b610bdc6040518060400160405280600f81526020016e0c2c8c898d2e2ead2c8d2e8f28aa89608b1b815250611bac565b610be9565b919550935091505b610c01886000805160206128e0833981519152611bd9565b6000610cd0826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c689190612750565b8a846001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccb9190612750565b611d19565b9050610cdb81611df2565b5050955095509592505050565b6000610d50600284849050101560405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836000818110610d6557610d656124d8565b9050602002016020810190610d7a91906124ee565b905060008484610d8b60018261276d565b818110610d9a57610d9a6124d8565b9050602002016020810190610daf91906124ee565b9050610dba826119aa565b6000805160206128e0833981519152610dd38389611a08565b9750610dee836000805160206128e08339815191528a611ac9565b6040516338ed173960e01b81526001600160a01b038216906338ed173990610e24908b908b908b908b9030904290600401612554565b6000604051808303816000875af1925050508015610e6457506040513d6000823e601f3d908101601f19168201604052610e6191908101906125d5565b60015b610f0557610e7061267c565b806308c379a01415610eca5750610e85612698565b80610e905750610ecc565b6109f460405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b81525082611b51565b505b610a3560405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b815250611bac565b8060018251610f14919061276d565b81518110610a4d57610a4d6124d8565b6000610f8960028484905010156040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383610f9860018261276d565b818110610fa757610fa76124d8565b9050602002016020810190610fbc91906124ee565b90506000805160206128e0833981519152610fd8600088611a08565b9650806001600160a01b031663fb3bdb418888888830426040518763ffffffff1660e01b815260040161100f9594939291906127cd565b60006040518083038185885af19350505050801561104f57506040513d6000823e601f3d908101601f1916820160405261104c91908101906125d5565b60015b6110f55761105b61267c565b806308c379a014156110b85750611070612698565b8061107b57506110ba565b6110b26040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b81525082611b51565b50611114565b505b6110f06040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b815250611bac565b611114565b80600081518110611108576111086124d8565b60200260200101519350505b6105b182611df2565b60008060006000805160206128e0833981519152905060006111d9826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a9190612750565b89846001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca7573d6000803e3d6000fd5b90506111e58188611a08565b9650611200816000805160206128e083398151915289611ac9565b604051629d473b60e21b81526001600160a01b038316906302751cec90611235908b908b908b908b9030904290600401612792565b60408051808303816000875af192505050801561126f575060408051601f3d908101601f1916820190925261126c91810190612804565b60015b61130f5761127b61267c565b806308c379a014156112d55750611290612698565b8061129b57506112d7565b6112cf604051806040016040528060128152602001710e4cadadeecca98d2e2ead2c8d2e8f28aa8960731b81525082611b51565b50611315565b505b61130a604051806040016040528060128152602001710e4cadadeecca98d2e2ead2c8d2e8f28aa8960731b815250611bac565b611315565b90945092505b61132d816000805160206128e0833981519152611bd9565b61133688611df2565b505094509492505050565b60405162461bcd60e51b8152602060048201526014602482015273496e76616c696420706f73742070726f6365737360601b60448201526064015b60405180910390fd5b60006113ea600284849050101560405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836113f960018261276d565b818110611408576114086124d8565b905060200201602081019061141d91906124ee565b90506000805160206128e0833981519152611439600088611a08565b9650806001600160a01b0316637ff36ab58888888830426040518763ffffffff1660e01b81526004016114709594939291906127cd565b60006040518083038185885af1935050505080156114b057506040513d6000823e601f3d908101601f191682016040526114ad91908101906125d5565b60015b61154b576114bc61267c565b806308c379a0141561151357506114d1612698565b806114dc5750611515565b6110b260405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b81525082611b51565b505b6110f060405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b815250611bac565b806001825161155a919061276d565b81518110611108576111086124d8565b6000818154811061157a57600080fd5b600091825260209091200154905081565b60008060006000805160206128e08339815191529050600061160f826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116089190612750565b8a8a611d19565b905061161b8188611a08565b9650611636816000805160206128e083398151915289611ac9565b604051635d5155ef60e11b81526001600160a01b038a8116600483015289811660248301526044820189905260648201889052608482018790523060a48301524260c483015283169063baa2abde9060e40160408051808303816000875af19250505080156116c2575060408051601f3d908101601f191682019092526116bf91810190612804565b60015b61175c576116ce61267c565b806308c379a0141561172557506116e3612698565b806116ee5750611727565b61171f6040518060400160405280600f81526020016e72656d6f76654c697175696469747960881b81525082611b51565b50611762565b505b6117576040518060400160405280600f81526020016e72656d6f76654c697175696469747960881b815250611bac565b611762565b90945092505b61177a816000805160206128e0833981519152611bd9565b61178389611df2565b61178c88611df2565b50509550959350505050565b60006117fd6002848490501015604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836000818110611812576118126124d8565b905060200201602081019061182791906124ee565b9050611832816119aa565b6000805160206128e083398151915261184b8288611a08565b9650611866826000805160206128e083398151915289611ac9565b6040516318cbafe560e01b81526001600160a01b038216906318cbafe59061189c908a908a908a908a9030904290600401612554565b6000604051808303816000875af19250505080156118dc57506040513d6000823e601f3d908101601f191682016040526118d991908101906125d5565b60015b611977576118e861267c565b806308c379a0141561193f57506118fd612698565b806119085750611941565b610537604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b81525082611b51565b505b610575604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b815250611bac565b8060018251611986919061276d565b8151811061058d5761058d6124d8565b826119a5576119a58282611b51565b505050565b6001600160a01b0381166110101415611a055760405162461bcd60e51b815260206004820152601760248201527f4e6f7420737570706f7274206d6174696320746f6b656e000000000000000000604482015260640161137c565b50565b60006000198214611a1a575080611ac3565b6001600160a01b0383161580611a4c57506001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b15611a58575047611ac3565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190612828565b90505b92915050565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b390604401600060405180830381600087803b158015611b1357600080fd5b505af1925050508015611b24575060015b6119a557611b3d6001600160a01b038416836000611e3a565b6119a56001600160a01b0384168383611e3a565b60408051808201909152600a8152690485375736869537761760b41b60208201528282604051602001611b8693929190612841565b60408051601f198184030181529082905262461bcd60e51b825261137c916004016124a5565b611a05816040518060400160405280600b81526020016a155b9cdc1958da599a595960aa1b815250611b51565b604051636eb1769f60e11b81523060048201526001600160a01b0382811660248301526000919084169063dd62ed3e90604401602060405180830381865afa158015611c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4d9190612828565b1115611d155760405163095ea7b360e01b81526001600160a01b0382811660048301526000602483015283169063095ea7b390604401600060405180830381600087803b158015611c9d57600080fd5b505af1925050508015611cae575060015b611d155760405163095ea7b360e01b81526001600160a01b0382811660048301526001602483015283169063095ea7b390604401600060405180830381600087803b158015611cfc57600080fd5b505af1158015611d10573d6000803e3d6000fd5b505050505b5050565b6000806000611d288585611f71565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b1660348201529193509150869060480160405160208183030381529060405280519060200120604051602001611dd09291906001600160f81b0319815260609290921b6bffffffffffffffffffffffff1916600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b60408051601f1981840301815291905280516020909101209695505050505050565b611dfb816119aa565b600080546001810182559080526001600160a01b0382167f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5639091015550565b801580611eb45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611e8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb29190612828565b155b611f1f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161137c565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119a5908490612069565b600080826001600160a01b0316846001600160a01b03161415611fe45760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f41444452604482015264455353455360d81b606482015260840161137c565b826001600160a01b0316846001600160a01b031610612004578284612007565b83835b90925090506001600160a01b0382166120625760405162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015260640161137c565b9250929050565b60006120be826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661213b9092919063ffffffff16565b8051909150156119a557808060200190518101906120dc91906128a1565b6119a55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161137c565b606061214a8484600085612154565b90505b9392505050565b6060824710156121b55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161137c565b843b6122035760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161137c565b600080866001600160a01b0316858760405161221f91906128c3565b60006040518083038185875af1925050503d806000811461225c576040519150601f19603f3d011682016040523d82523d6000602084013e612261565b606091505b509150915061227182828661227c565b979650505050505050565b6060831561228b57508161214d565b82511561229b5782518084602001fd5b8160405162461bcd60e51b815260040161137c91906124a5565b600080600080606085870312156122cb57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156122f157600080fd5b818701915087601f83011261230557600080fd5b81358181111561231457600080fd5b8860208260051b850101111561232957600080fd5b95989497505060200194505050565b6001600160a01b0381168114611a0557600080fd5b60008060008060008060c0878903121561236657600080fd5b863561237181612338565b9550602087013561238181612338565b95989597505050506040840135936060810135936080820135935060a0909101359150565b600080600080600060a086880312156123be57600080fd5b8535945060208601356123d081612338565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561240057600080fd5b5035919050565b6000806000806080858703121561241d57600080fd5b843561242881612338565b966020860135965060408601359560600135945092505050565b600080600080600060a0868803121561245a57600080fd5b853561246581612338565b945060208601356123d081612338565b60005b83811015612490578181015183820152602001612478565b8381111561249f576000848401525b50505050565b60208152600082518060208401526124c4816040850160208701612475565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561250057600080fd5b813561214d81612338565b8183526000602080850194508260005b8581101561254957813561252e81612338565b6001600160a01b03168752958201959082019060010161251b565b509495945050505050565b86815285602082015260a06040820152600061257460a08301868861250b565b6001600160a01b039490941660608301525060800152949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156125ce576125ce612592565b6040525050565b600060208083850312156125e857600080fd5b825167ffffffffffffffff8082111561260057600080fd5b818501915085601f83011261261457600080fd5b81518181111561262657612626612592565b8060051b915060405161263b858401826125a8565b8181529183018401918481018884111561265457600080fd5b938501935b838510156126705784518152938501938501612659565b50979650505050505050565b600060033d11156126955760046000803e5060005160e01c5b90565b600060443d10156126a65790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156126d657505050505090565b82850191508151818111156126ee5750505050505090565b843d87010160208285010111156127085750505050505090565b612717602082860101876125a8565b509095945050505050565b60008060006060848603121561273757600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561276257600080fd5b815161214d81612338565b60008282101561278d57634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b8581526080602082015260006127e760808301868861250b565b6001600160a01b0394909416604083015250606001529392505050565b6000806040838503121561281757600080fd5b505080516020909101519092909150565b60006020828403121561283a57600080fd5b5051919050565b60008451612853818460208901612475565b605f60f81b9083019081528451612871816001840160208901612475565b6101d160f51b600192909101918201528351612894816003840160208801612475565b0160030195945050505050565b6000602082840312156128b357600080fd5b8151801515811461214d57600080fd5b600082516128d5818460208701612475565b919091019291505056fe0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506a264697066735822122054bdcf9c3a5a26e89296988752d201acbbcfbcc51b932d9014e2f3c696e2cd5864736f6c634300080a0033

Deployed Bytecode

0x6080604052600436106101145760003560e01c806399eb59b9116100a0578063df2ebdbb11610064578063df2ebdbb146102d5578063e2dc85dc146102fd578063ef66f72514610310578063f5f5ba7214610323578063fa2901a51461035c57600080fd5b806399eb59b914610243578063a1cfacde14610270578063c272291614610298578063d0241dac146102a2578063dc9031c4146102b557600080fd5b8063397d4b4a116100e7578063397d4b4a146101db57806358871c81146101ee57806386818f261461020157806387151a791461021457806387c139431461022757600080fd5b80630f532d181461011957806318a22c4014610160578063277754ed146101735780633351733f146101ad575b600080fd5b34801561012557600080fd5b5061014d7fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a81565b6040519081526020015b60405180910390f35b61014d61016e3660046122b5565b610390565b34801561017f57600080fd5b506101956000805160206128e083398151915281565b6040516001600160a01b039091168152602001610157565b6101c06101bb36600461234d565b6105bb565b60408051938452602084019290925290820152606001610157565b61014d6101e93660046122b5565b610812565b6101c06101fc3660046123a6565b610a85565b61014d61020f3660046122b5565b610ce8565b61014d6102223660046122b5565b610f24565b34801561023357600080fd5b5061014d670de0b6b3a764000081565b34801561024f57600080fd5b5061014d61025e3660046123ee565b60016020526000908152604090205481565b61028361027e366004612407565b61111d565b60408051928352602083019190915201610157565b6102a0611341565b005b61014d6102b03660046122b5565b611385565b3480156102c157600080fd5b5061014d6102d03660046123ee565b61156a565b3480156102e157600080fd5b5061019573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b61028361030b366004612442565b61158b565b61014d61031e3660046122b5565b611798565b34801561032f57600080fd5b50604080518082018252600a8152690485375736869537761760b41b6020820152905161015791906124a5565b34801561036857600080fd5b50610377636139148b60e11b81565b6040516001600160e01b03199091168152602001610157565b60006103f56002848490501015604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383600081811061040a5761040a6124d8565b905060200201602081019061041f91906124ee565b905061042a816119aa565b6000805160206128e08339815191526104438287611a08565b955061045e826000805160206128e083398151915288611ac9565b604051632512eca560e11b81526001600160a01b03821690634a25d94a90610494908a908a908a908a9030904290600401612554565b6000604051808303816000875af19250505080156104d457506040513d6000823e601f3d908101601f191682016040526104d191908101906125d5565b60015b61057a576104e061267c565b806308c379a0141561053d57506104f5612698565b80610500575061053f565b610537604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b81525082611b51565b50610599565b505b610575604051806040016040528060158152602001740e6eec2e0a8ded6cadce68cdee48af0c2c6e88aa89605b1b815250611bac565b610599565b8060008151811061058d5761058d6124d8565b60200260200101519350505b6105b1826000805160206128e0833981519152611bd9565b5050949350505050565b60008060006105c9896119aa565b6105d2886119aa565b6000805160206128e08339815191526105eb8a89611a08565b97506105f78988611a08565b96506106128a6000805160206128e08339815191528a611ac9565b61062b896000805160206128e083398151915289611ac9565b60405162e8e33760e81b81526001600160a01b038b811660048301528a81166024830152604482018a9052606482018990526084820188905260a482018790523060c48301524260e483015282169063e8e3370090610104016060604051808303816000875af19250505080156106bf575060408051601f3d908101601f191682019092526106bc91810190612722565b60015b610753576106cb61267c565b806308c379a0141561071f57506106e0612698565b806106eb5750610721565b6107196040518060400160405280600c81526020016b6164644c697175696469747960a01b81525082611b51565b5061075b565b505b61074e6040518060400160405280600c81526020016b6164644c697175696469747960a01b815250611bac565b61075b565b919550935091505b6107738a6000805160206128e0833981519152611bd9565b61078b896000805160206128e0833981519152611bd9565b60006107f9826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190612750565b8c8c611d19565b905061080481611df2565b505096509650969350505050565b600061087a60028484905010156040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383600081811061088f5761088f6124d8565b90506020020160208101906108a491906124ee565b9050600084846108b560018261276d565b8181106108c4576108c46124d8565b90506020020160208101906108d991906124ee565b90506108e4826119aa565b6000805160206128e08339815191526108fd8388611a08565b9650610918836000805160206128e083398151915289611ac9565b604051634401edf760e11b81526001600160a01b03821690638803dbee9061094e908b908b908b908b9030904290600401612554565b6000604051808303816000875af192505050801561098e57506040513d6000823e601f3d908101601f1916820160405261098b91908101906125d5565b60015b610a3a5761099a61267c565b806308c379a014156109fa57506109af612698565b806109ba57506109fc565b6109f46040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b81525082611b51565b50610a59565b505b610a356040518060400160405280601881526020017773776170546f6b656e73466f724578616374546f6b656e7360401b815250611bac565b610a59565b80600081518110610a4d57610a4d6124d8565b60200260200101519450505b610a71836000805160206128e0833981519152611bd9565b610a7a82611df2565b505050949350505050565b6000806000610a93876119aa565b6000805160206128e0833981519152610aad60008a611a08565b9850610ab98888611a08565b9650610ad4886000805160206128e083398151915289611ac9565b60405163f305d71960e01b81526001600160a01b0382169063f305d719908b90610b0c908c908c908c908c9030904290600401612792565b60606040518083038185885af193505050508015610b47575060408051601f3d908101601f19168201909252610b4491810190612722565b60015b610be157610b5361267c565b806308c379a01415610baa5750610b68612698565b80610b735750610bac565b610ba46040518060400160405280600f81526020016e0c2c8c898d2e2ead2c8d2e8f28aa89608b1b81525082611b51565b50610be9565b505b610bdc6040518060400160405280600f81526020016e0c2c8c898d2e2ead2c8d2e8f28aa89608b1b815250611bac565b610be9565b919550935091505b610c01886000805160206128e0833981519152611bd9565b6000610cd0826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c689190612750565b8a846001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccb9190612750565b611d19565b9050610cdb81611df2565b5050955095509592505050565b6000610d50600284849050101560405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836000818110610d6557610d656124d8565b9050602002016020810190610d7a91906124ee565b905060008484610d8b60018261276d565b818110610d9a57610d9a6124d8565b9050602002016020810190610daf91906124ee565b9050610dba826119aa565b6000805160206128e0833981519152610dd38389611a08565b9750610dee836000805160206128e08339815191528a611ac9565b6040516338ed173960e01b81526001600160a01b038216906338ed173990610e24908b908b908b908b9030904290600401612554565b6000604051808303816000875af1925050508015610e6457506040513d6000823e601f3d908101601f19168201604052610e6191908101906125d5565b60015b610f0557610e7061267c565b806308c379a01415610eca5750610e85612698565b80610e905750610ecc565b6109f460405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b81525082611b51565b505b610a3560405180604001604052806018815260200177737761704578616374546f6b656e73466f72546f6b656e7360401b815250611bac565b8060018251610f14919061276d565b81518110610a4d57610a4d6124d8565b6000610f8960028484905010156040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b60008383610f9860018261276d565b818110610fa757610fa76124d8565b9050602002016020810190610fbc91906124ee565b90506000805160206128e0833981519152610fd8600088611a08565b9650806001600160a01b031663fb3bdb418888888830426040518763ffffffff1660e01b815260040161100f9594939291906127cd565b60006040518083038185885af19350505050801561104f57506040513d6000823e601f3d908101601f1916820160405261104c91908101906125d5565b60015b6110f55761105b61267c565b806308c379a014156110b85750611070612698565b8061107b57506110ba565b6110b26040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b81525082611b51565b50611114565b505b6110f06040518060400160405280601581526020017473776170455448466f724578616374546f6b656e7360581b815250611bac565b611114565b80600081518110611108576111086124d8565b60200260200101519350505b6105b182611df2565b60008060006000805160206128e0833981519152905060006111d9826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a9190612750565b89846001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca7573d6000803e3d6000fd5b90506111e58188611a08565b9650611200816000805160206128e083398151915289611ac9565b604051629d473b60e21b81526001600160a01b038316906302751cec90611235908b908b908b908b9030904290600401612792565b60408051808303816000875af192505050801561126f575060408051601f3d908101601f1916820190925261126c91810190612804565b60015b61130f5761127b61267c565b806308c379a014156112d55750611290612698565b8061129b57506112d7565b6112cf604051806040016040528060128152602001710e4cadadeecca98d2e2ead2c8d2e8f28aa8960731b81525082611b51565b50611315565b505b61130a604051806040016040528060128152602001710e4cadadeecca98d2e2ead2c8d2e8f28aa8960731b815250611bac565b611315565b90945092505b61132d816000805160206128e0833981519152611bd9565b61133688611df2565b505094509492505050565b60405162461bcd60e51b8152602060048201526014602482015273496e76616c696420706f73742070726f6365737360601b60448201526064015b60405180910390fd5b60006113ea600284849050101560405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836113f960018261276d565b818110611408576114086124d8565b905060200201602081019061141d91906124ee565b90506000805160206128e0833981519152611439600088611a08565b9650806001600160a01b0316637ff36ab58888888830426040518763ffffffff1660e01b81526004016114709594939291906127cd565b60006040518083038185885af1935050505080156114b057506040513d6000823e601f3d908101601f191682016040526114ad91908101906125d5565b60015b61154b576114bc61267c565b806308c379a0141561151357506114d1612698565b806114dc5750611515565b6110b260405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b81525082611b51565b505b6110f060405180604001604052806015815260200174737761704578616374455448466f72546f6b656e7360581b815250611bac565b806001825161155a919061276d565b81518110611108576111086124d8565b6000818154811061157a57600080fd5b600091825260209091200154905081565b60008060006000805160206128e08339815191529050600061160f826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116089190612750565b8a8a611d19565b905061161b8188611a08565b9650611636816000805160206128e083398151915289611ac9565b604051635d5155ef60e11b81526001600160a01b038a8116600483015289811660248301526044820189905260648201889052608482018790523060a48301524260c483015283169063baa2abde9060e40160408051808303816000875af19250505080156116c2575060408051601f3d908101601f191682019092526116bf91810190612804565b60015b61175c576116ce61267c565b806308c379a0141561172557506116e3612698565b806116ee5750611727565b61171f6040518060400160405280600f81526020016e72656d6f76654c697175696469747960881b81525082611b51565b50611762565b505b6117576040518060400160405280600f81526020016e72656d6f76654c697175696469747960881b815250611bac565b611762565b90945092505b61177a816000805160206128e0833981519152611bd9565b61178389611df2565b61178c88611df2565b50509550959350505050565b60006117fd6002848490501015604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b8152506040518060400160405280600c81526020016b0d2dcecc2d8d2c840e0c2e8d60a31b815250611996565b600083836000818110611812576118126124d8565b905060200201602081019061182791906124ee565b9050611832816119aa565b6000805160206128e083398151915261184b8288611a08565b9650611866826000805160206128e083398151915289611ac9565b6040516318cbafe560e01b81526001600160a01b038216906318cbafe59061189c908a908a908a908a9030904290600401612554565b6000604051808303816000875af19250505080156118dc57506040513d6000823e601f3d908101601f191682016040526118d991908101906125d5565b60015b611977576118e861267c565b806308c379a0141561193f57506118fd612698565b806119085750611941565b610537604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b81525082611b51565b505b610575604051806040016040528060158152602001740e6eec2e08af0c2c6e8a8ded6cadce68cdee48aa89605b1b815250611bac565b8060018251611986919061276d565b8151811061058d5761058d6124d8565b826119a5576119a58282611b51565b505050565b6001600160a01b0381166110101415611a055760405162461bcd60e51b815260206004820152601760248201527f4e6f7420737570706f7274206d6174696320746f6b656e000000000000000000604482015260640161137c565b50565b60006000198214611a1a575080611ac3565b6001600160a01b0383161580611a4c57506001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b15611a58575047611ac3565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190612828565b90505b92915050565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b390604401600060405180830381600087803b158015611b1357600080fd5b505af1925050508015611b24575060015b6119a557611b3d6001600160a01b038416836000611e3a565b6119a56001600160a01b0384168383611e3a565b60408051808201909152600a8152690485375736869537761760b41b60208201528282604051602001611b8693929190612841565b60408051601f198184030181529082905262461bcd60e51b825261137c916004016124a5565b611a05816040518060400160405280600b81526020016a155b9cdc1958da599a595960aa1b815250611b51565b604051636eb1769f60e11b81523060048201526001600160a01b0382811660248301526000919084169063dd62ed3e90604401602060405180830381865afa158015611c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4d9190612828565b1115611d155760405163095ea7b360e01b81526001600160a01b0382811660048301526000602483015283169063095ea7b390604401600060405180830381600087803b158015611c9d57600080fd5b505af1925050508015611cae575060015b611d155760405163095ea7b360e01b81526001600160a01b0382811660048301526001602483015283169063095ea7b390604401600060405180830381600087803b158015611cfc57600080fd5b505af1158015611d10573d6000803e3d6000fd5b505050505b5050565b6000806000611d288585611f71565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b1660348201529193509150869060480160405160208183030381529060405280519060200120604051602001611dd09291906001600160f81b0319815260609290921b6bffffffffffffffffffffffff1916600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b60408051601f1981840301815291905280516020909101209695505050505050565b611dfb816119aa565b600080546001810182559080526001600160a01b0382167f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5639091015550565b801580611eb45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611e8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb29190612828565b155b611f1f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161137c565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119a5908490612069565b600080826001600160a01b0316846001600160a01b03161415611fe45760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f41444452604482015264455353455360d81b606482015260840161137c565b826001600160a01b0316846001600160a01b031610612004578284612007565b83835b90925090506001600160a01b0382166120625760405162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015260640161137c565b9250929050565b60006120be826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661213b9092919063ffffffff16565b8051909150156119a557808060200190518101906120dc91906128a1565b6119a55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161137c565b606061214a8484600085612154565b90505b9392505050565b6060824710156121b55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161137c565b843b6122035760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161137c565b600080866001600160a01b0316858760405161221f91906128c3565b60006040518083038185875af1925050503d806000811461225c576040519150601f19603f3d011682016040523d82523d6000602084013e612261565b606091505b509150915061227182828661227c565b979650505050505050565b6060831561228b57508161214d565b82511561229b5782518084602001fd5b8160405162461bcd60e51b815260040161137c91906124a5565b600080600080606085870312156122cb57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156122f157600080fd5b818701915087601f83011261230557600080fd5b81358181111561231457600080fd5b8860208260051b850101111561232957600080fd5b95989497505060200194505050565b6001600160a01b0381168114611a0557600080fd5b60008060008060008060c0878903121561236657600080fd5b863561237181612338565b9550602087013561238181612338565b95989597505050506040840135936060810135936080820135935060a0909101359150565b600080600080600060a086880312156123be57600080fd5b8535945060208601356123d081612338565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561240057600080fd5b5035919050565b6000806000806080858703121561241d57600080fd5b843561242881612338565b966020860135965060408601359560600135945092505050565b600080600080600060a0868803121561245a57600080fd5b853561246581612338565b945060208601356123d081612338565b60005b83811015612490578181015183820152602001612478565b8381111561249f576000848401525b50505050565b60208152600082518060208401526124c4816040850160208701612475565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561250057600080fd5b813561214d81612338565b8183526000602080850194508260005b8581101561254957813561252e81612338565b6001600160a01b03168752958201959082019060010161251b565b509495945050505050565b86815285602082015260a06040820152600061257460a08301868861250b565b6001600160a01b039490941660608301525060800152949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156125ce576125ce612592565b6040525050565b600060208083850312156125e857600080fd5b825167ffffffffffffffff8082111561260057600080fd5b818501915085601f83011261261457600080fd5b81518181111561262657612626612592565b8060051b915060405161263b858401826125a8565b8181529183018401918481018884111561265457600080fd5b938501935b838510156126705784518152938501938501612659565b50979650505050505050565b600060033d11156126955760046000803e5060005160e01c5b90565b600060443d10156126a65790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156126d657505050505090565b82850191508151818111156126ee5750505050505090565b843d87010160208285010111156127085750505050505090565b612717602082860101876125a8565b509095945050505050565b60008060006060848603121561273757600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561276257600080fd5b815161214d81612338565b60008282101561278d57634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b8581526080602082015260006127e760808301868861250b565b6001600160a01b0394909416604083015250606001529392505050565b6000806040838503121561281757600080fd5b505080516020909101519092909150565b60006020828403121561283a57600080fd5b5051919050565b60008451612853818460208901612475565b605f60f81b9083019081528451612871816001840160208901612475565b6101d160f51b600192909101918201528351612894816003840160208801612475565b0160030195945050505050565b6000602082840312156128b357600080fd5b8151801515811461214d57600080fd5b600082516128d5818460208701612475565b919091019291505056fe0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506a264697066735822122054bdcf9c3a5a26e89296988752d201acbbcfbcc51b932d9014e2f3c696e2cd5864736f6c634300080a0033

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

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