APE Price: $1.15 (+4.29%)

Contract

0x979862CF48C43Ad8969DD1005f2990DeE1474247

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap No Split Fr...45251902024-11-17 20:48:4719 hrs ago1731876527IN
0x979862CF...eE1474247
0.001 APE0.0052956825.42069
Swap No Split Fr...45250912024-11-17 20:47:0419 hrs ago1731876424IN
0x979862CF...eE1474247
0.001 APE0.0052956825.42069
Swap No Split Fr...45250142024-11-17 20:45:4919 hrs ago1731876349IN
0x979862CF...eE1474247
0.001 APE0.0056434425.42069
Swap No Split To...45237182024-11-17 20:26:0920 hrs ago1731875169IN
0x979862CF...eE1474247
0 APE0.0051205925.42069
Swap No Split Fr...45234372024-11-17 20:21:4420 hrs ago1731874904IN
0x979862CF...eE1474247
0.001 APE0.0056434425.42069
Swap No Split To...45186282024-11-17 19:13:3421 hrs ago1731870814IN
0x979862CF...eE1474247
0 APE0.0051203325.42069
Swap No Split To...45186072024-11-17 19:13:1121 hrs ago1731870791IN
0x979862CF...eE1474247
0 APE0.0051203125.42069
Swap No Split To...45185042024-11-17 19:11:0721 hrs ago1731870667IN
0x979862CF...eE1474247
0 APE0.0051195925.42069
Swap No Split Fr...45151922024-11-17 18:03:2922 hrs ago1731866609IN
0x979862CF...eE1474247
0.001 APE0.0056434425.42069
0x60a0604043225632024-11-15 11:00:133 days ago1731668413IN
 Create: ApeSwapRouter
0 APE0.0833033725.42069

Latest 22 internal transactions

Parent Transaction Hash Block From To
45251902024-11-17 20:48:4719 hrs ago1731876527
0x979862CF...eE1474247
0.001 APE
45251902024-11-17 20:48:4719 hrs ago1731876527
0x979862CF...eE1474247
0 APE
45250912024-11-17 20:47:0419 hrs ago1731876424
0x979862CF...eE1474247
0.001 APE
45250912024-11-17 20:47:0419 hrs ago1731876424
0x979862CF...eE1474247
0 APE
45250142024-11-17 20:45:4919 hrs ago1731876349
0x979862CF...eE1474247
0.001 APE
45250142024-11-17 20:45:4919 hrs ago1731876349
0x979862CF...eE1474247
0 APE
45237182024-11-17 20:26:0920 hrs ago1731875169
0x979862CF...eE1474247
0.0009801 APE
45237182024-11-17 20:26:0920 hrs ago1731875169
0x979862CF...eE1474247
0.0009801 APE
45237182024-11-17 20:26:0920 hrs ago1731875169
0x979862CF...eE1474247
0 APE
45234372024-11-17 20:21:4420 hrs ago1731874904
0x979862CF...eE1474247
0.001 APE
45234372024-11-17 20:21:4420 hrs ago1731874904
0x979862CF...eE1474247
0 APE
45186282024-11-17 19:13:3421 hrs ago1731870814
0x979862CF...eE1474247
0.00004588 APE
45186282024-11-17 19:13:3421 hrs ago1731870814
0x979862CF...eE1474247
0.00004588 APE
45186282024-11-17 19:13:3421 hrs ago1731870814
0x979862CF...eE1474247
0 APE
45186072024-11-17 19:13:1121 hrs ago1731870791
0x979862CF...eE1474247
0.00093479 APE
45186072024-11-17 19:13:1121 hrs ago1731870791
0x979862CF...eE1474247
0.00093479 APE
45186072024-11-17 19:13:1121 hrs ago1731870791
0x979862CF...eE1474247
0 APE
45185042024-11-17 19:11:0721 hrs ago1731870667
0x979862CF...eE1474247
0.00000004 APE
45185042024-11-17 19:11:0721 hrs ago1731870667
0x979862CF...eE1474247
0.00000004 APE
45185042024-11-17 19:11:0721 hrs ago1731870667
0x979862CF...eE1474247
0 APE
45151922024-11-17 18:03:2922 hrs ago1731866609
0x979862CF...eE1474247
0.001 APE
45151922024-11-17 18:03:2922 hrs ago1731866609
0x979862CF...eE1474247
0 APE

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ApeSwapRouter

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : ApeRouter.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "./interface/IApeRouter.sol";
import "./interface/IAdapter.sol";
import "./interface/IERC20.sol";
import "./interface/IWETH.sol";
import "./lib/SafeERC20.sol";
import "./lib/Maintainable.sol";
import "./lib/ApeViewUtils.sol";
import "./lib/Recoverable.sol";
import "./lib/SafeERC20.sol";

contract ApeSwapRouter is Maintainable, Recoverable, IApeRouter {
    using SafeERC20 for IERC20;
    using OfferUtils for Offer;

    address public immutable WNATIVE;
    address public constant NATIVE = address(0);
    string public constant NAME = "ApeSwapRouter";
    uint256 public constant FEE_DENOMINATOR = 1e4;
    uint256 public MIN_FEE = 0;
    address public FEE_CLAIMER;
    uint256 public fee;
    address[] public TRUSTED_TOKENS;
    address[] public ADAPTERS;

    constructor(
        address[] memory _adapters,
        address[] memory _trustedTokens,
        address _feeClaimer,
        address _wrapped_native,
        uint256 _fee
    ) {
        setAllowanceForWrapping(_wrapped_native);
        setTrustedTokens(_trustedTokens);
        setFeeClaimer(_feeClaimer);
        setAdapters(_adapters);
        WNATIVE = _wrapped_native;
        fee = _fee;
    }

    // -- SETTERS --

    function setAllowanceForWrapping(address _wnative) public onlyMaintainer {
        IERC20(_wnative).safeApprove(_wnative, type(uint256).max);
    }

    function setTrustedTokens(address[] memory _trustedTokens)
        public
        override
        onlyMaintainer
    {
        emit UpdatedTrustedTokens(_trustedTokens);
        TRUSTED_TOKENS = _trustedTokens;
    }

    function setAdapters(address[] memory _adapters)
        public
        override
        onlyMaintainer
    {
        emit UpdatedAdapters(_adapters);
        ADAPTERS = _adapters;
    }

    function setMinFee(uint256 _fee) external override onlyMaintainer {
        emit UpdatedMinFee(MIN_FEE, _fee);
        MIN_FEE = _fee;
    }

    function setFeeClaimer(address _claimer) public override onlyMaintainer {
        emit UpdatedFeeClaimer(FEE_CLAIMER, _claimer);
        FEE_CLAIMER = _claimer;
    }

    function setFee(uint256 _fee) external onlyMaintainer {
        emit UpdatedFee(fee, _fee);
        fee = _fee;
    }

    //  -- GENERAL --

    function trustedTokensCount() external view override returns (uint256) {
        return TRUSTED_TOKENS.length;
    }

    function adaptersCount() external view override returns (uint256) {
        return ADAPTERS.length;
    }

    // Fallback
    receive() external payable {}

    // -- HELPERS --

    function _applyFee(uint256 _amountIn, uint256 _fee)
        internal
        view
        returns (uint256)
    {
        require(_fee >= MIN_FEE, "ApeRouter: Insufficient fee");
        return (_amountIn * (FEE_DENOMINATOR - _fee)) / FEE_DENOMINATOR;
    }

    function _wrap(uint256 _amount) internal {
        IWETH(WNATIVE).deposit{value: _amount}();
    }

    function _unwrap(uint256 _amount) internal {
        IWETH(WNATIVE).withdraw(_amount);
    }

    /**
     * @notice Return tokens to user
     * @dev Pass address(0) for APE
     * @param _token address
     * @param _amount tokens to return
     * @param _to address where funds should be sent to
     */
    function _returnTokensTo(
        address _token,
        uint256 _amount,
        address _to
    ) internal {
        if (address(this) != _to) {
            if (_token == NATIVE) {
                payable(_to).transfer(_amount);
            } else {
                IERC20(_token).safeTransfer(_to, _amount);
            }
        }
    }

    function _transferFrom(
        address token,
        address _from,
        address _to,
        uint256 _amount
    ) internal {
        if (_from != address(this))
            IERC20(token).safeTransferFrom(_from, _to, _amount);
        else IERC20(token).safeTransfer(_to, _amount);
    }

    // -- QUERIES --

    /**
     * Query single adapter
     */
    function queryAdapter(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8 _index
    ) external view override returns (uint256) {
        IAdapter _adapter = IAdapter(ADAPTERS[_index]);
        uint256 amountOut = _adapter.query(_amountIn, _tokenIn, _tokenOut);
        return amountOut;
    }

    /**
     * Query specified adapters
     */
    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8[] calldata _options
    ) public view override returns (Query memory) {
        Query memory bestQuery;
        for (uint8 i; i < _options.length; i++) {
            address _adapter = ADAPTERS[_options[i]];
            uint256 amountOut = IAdapter(_adapter).query(
                _amountIn,
                _tokenIn,
                _tokenOut
            );
            if (i == 0 || amountOut > bestQuery.amountOut) {
                bestQuery = Query(_adapter, _tokenIn, _tokenOut, amountOut);
            }
        }
        return bestQuery;
    }

    /**
     * Query all adapters
     */
    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) public view override returns (Query memory) {
        Query memory bestQuery;
        for (uint8 i; i < ADAPTERS.length; i++) {
            address _adapter = ADAPTERS[i];
            uint256 amountOut = IAdapter(_adapter).query(
                _amountIn,
                _tokenIn,
                _tokenOut
            );
            if (i == 0 || amountOut > bestQuery.amountOut) {
                bestQuery = Query(_adapter, _tokenIn, _tokenOut, amountOut);
            }
        }
        return bestQuery;
    }

    /**
     * Return path with best returns between two tokens
     * Takes gas-cost into account
     */
    function findBestPathWithGas(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _gasPrice
    ) external view override returns (FormattedOffer memory) {
        require(_maxSteps > 0 && _maxSteps < 5, "ApeRouter: Invalid max-steps");
        Offer memory queries = OfferUtils.newOffer(_amountIn, _tokenIn);
        uint256 gasPriceInExitTkn = _gasPrice > 0
            ? getGasPriceInExitTkn(_gasPrice, _tokenOut)
            : 0;
        queries = _findBestPath(
            _amountIn,
            _tokenIn,
            _tokenOut,
            _maxSteps,
            queries,
            gasPriceInExitTkn
        );
        if (queries.adapters.length == 0) {
            queries.amounts = "";
            queries.path = "";
        }
        return queries.format();
    }

    // Find the market price between gas-asset(native) and token-out and express gas price in token-out
    function getGasPriceInExitTkn(uint256 _gasPrice, address _tokenOut)
        internal
        view
        returns (uint256 price)
    {
        // Avoid low-liquidity price appreciation (https://github.com/yieldApe/Ape-aggregator/issues/20)
        FormattedOffer memory gasQuery = findBestPath(
            1e18,
            WNATIVE,
            _tokenOut,
            2
        );
        if (gasQuery.path.length != 0) {
            // Leave result in nWei to preserve precision for assets with low decimal places
            price =
                (gasQuery.amounts[gasQuery.amounts.length - 1] * _gasPrice) /
                1e9;
        }
    }

    /**
     * Return path with best returns between two tokens
     */
    function findBestPath(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps
    ) public view override returns (FormattedOffer memory) {
        require(_maxSteps > 0 && _maxSteps < 5, "ApeRouter: Invalid max-steps");
        Offer memory queries = OfferUtils.newOffer(_amountIn, _tokenIn);
        queries = _findBestPath(
            _amountIn,
            _tokenIn,
            _tokenOut,
            _maxSteps,
            queries,
            0
        );
        // If no paths are found return empty struct
        if (queries.adapters.length == 0) {
            queries.amounts = "";
            queries.path = "";
        }
        return queries.format();
    }

    function _findBestPath(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        Offer memory _queries,
        uint256 _tknOutPriceNwei
    ) internal view returns (Offer memory) {
        Offer memory bestOption = _queries.clone();
        uint256 bestAmountOut;
        uint256 gasEstimate;
        bool withGas = _tknOutPriceNwei != 0;

        // First check if there is a path directly from tokenIn to tokenOut
        Query memory queryDirect = queryNoSplit(_amountIn, _tokenIn, _tokenOut);

        if (queryDirect.amountOut != 0) {
            if (withGas) {
                gasEstimate = IAdapter(queryDirect.adapter).swapGasEstimate();
            }
            bestOption.addToTail(
                queryDirect.amountOut,
                queryDirect.adapter,
                queryDirect.tokenOut,
                gasEstimate
            );
            bestAmountOut = queryDirect.amountOut;
        }
        // Only check the rest if they would go beyond step limit (Need at least 2 more steps)
        if (_maxSteps > 1 && _queries.adapters.length / 32 <= _maxSteps - 2) {
            // Check for paths that pass through trusted tokens
            for (uint256 i = 0; i < TRUSTED_TOKENS.length; i++) {
                if (_tokenIn == TRUSTED_TOKENS[i]) {
                    continue;
                }
                // Loop through all adapters to find the best one for swapping tokenIn for one of the trusted tokens
                Query memory bestSwap = queryNoSplit(
                    _amountIn,
                    _tokenIn,
                    TRUSTED_TOKENS[i]
                );
                if (bestSwap.amountOut == 0) {
                    continue;
                }
                // Explore options that connect the current path to the tokenOut
                Offer memory newOffer = _queries.clone();
                if (withGas) {
                    gasEstimate = IAdapter(bestSwap.adapter).swapGasEstimate();
                }
                newOffer.addToTail(
                    bestSwap.amountOut,
                    bestSwap.adapter,
                    bestSwap.tokenOut,
                    gasEstimate
                );
                newOffer = _findBestPath(
                    bestSwap.amountOut,
                    TRUSTED_TOKENS[i],
                    _tokenOut,
                    _maxSteps,
                    newOffer,
                    _tknOutPriceNwei
                ); // Recursive step
                address tokenOut = newOffer.getTokenOut();
                uint256 amountOut = newOffer.getAmountOut();
                // Check that the last token in the path is the tokenOut and update the new best option if neccesary
                if (_tokenOut == tokenOut && amountOut > bestAmountOut) {
                    if (newOffer.gasEstimate > bestOption.gasEstimate) {
                        uint256 gasCostDiff = (_tknOutPriceNwei *
                            (newOffer.gasEstimate - bestOption.gasEstimate)) /
                            1e9;
                        uint256 priceDiff = amountOut - bestAmountOut;
                        if (gasCostDiff > priceDiff) {
                            continue;
                        }
                    }
                    bestAmountOut = amountOut;
                    bestOption = newOffer;
                }
            }
        }
        return bestOption;
    }

    // -- SWAPPERS --

    function _swapNoSplit(
        Trade calldata _trade,
        address _from,
        address _to,
        uint256 _fee
    ) internal returns (uint256) {
        uint256[] memory amounts = new uint256[](_trade.path.length);
        if (_fee > 0 || MIN_FEE > 0) {
            // Transfer fees to the claimer account and decrease initial amount
            amounts[0] = _applyFee(_trade.amountIn, _fee);
            _transferFrom(
                _trade.path[0],
                _from,
                FEE_CLAIMER,
                _trade.amountIn - amounts[0]
            );
        } else {
            amounts[0] = _trade.amountIn;
        }
        _transferFrom(_trade.path[0], _from, _trade.adapters[0], amounts[0]);
        // Get amounts that will be swapped
        for (uint256 i = 0; i < _trade.adapters.length; i++) {
            amounts[i + 1] = IAdapter(_trade.adapters[i]).query(
                amounts[i],
                _trade.path[i],
                _trade.path[i + 1]
            );
        }
        require(
            amounts[amounts.length - 1] >= _trade.amountOut,
            "ApeRouter: Insufficient output amount"
        );
        for (uint256 i = 0; i < _trade.adapters.length; i++) {
            // All adapters should transfer output token to the following target
            // All targets are the adapters, expect for the last swap where tokens are sent out
            address targetAddress = i < _trade.adapters.length - 1
                ? _trade.adapters[i + 1]
                : _to;
            IAdapter(_trade.adapters[i]).swap(
                amounts[i],
                amounts[i + 1],
                _trade.path[i],
                _trade.path[i + 1],
                targetAddress
            );
        }
        emit ApeSwap(
            _trade.path[0],
            _trade.path[_trade.path.length - 1],
            _trade.amountIn,
            amounts[amounts.length - 1]
        );
        return amounts[amounts.length - 1];
    }

    function swapNoSplit(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) public payable override {
        require(msg.value >= _fee, "ApeRouter: Insufficient fee payment");
        require(
            payable(FEE_CLAIMER).send(_fee),
            "ApeRouter: Fee transfer failed"
        );
        _swapNoSplit(_trade, msg.sender, _to, 0);
    }

    function swapNoSplitFromAPE(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external payable override {
        require(msg.value >= _fee, "ApeRouter: Insufficient fee payment");
        require(
            _trade.path[0] == WNATIVE,
            "ApeRouter: Path needs to begin with WAPE"
        );
        require(
            payable(FEE_CLAIMER).send(_fee),
            "ApeRouter: Fee transfer failed"
        );
        _wrap(_trade.amountIn);
        _swapNoSplit(_trade, address(this), _to, 0);
    }

    function swapNoSplitToAPE(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) public payable override {
        require(msg.value >= _fee, "ApeRouter: Insufficient fee payment");
        require(
            payable(FEE_CLAIMER).send(_fee),
            "ApeRouter: Fee transfer failed"
        );
        require(
            _trade.path[_trade.path.length - 1] == WNATIVE,
            "ApeRouter: Path needs to end with WAPE"
        );
        uint256 returnAmount = _swapNoSplit(
            _trade,
            msg.sender,
            address(this),
            0
        );

        _unwrap(returnAmount);
        _returnTokensTo(NATIVE, returnAmount, _to);
    }

    /**
     * Swap token to token without the need to approve the first token
     */
    function swapNoSplitWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external payable override {
        IERC20(_trade.path[0]).permit(
            msg.sender,
            address(this),
            _trade.amountIn,
            _deadline,
            _v,
            _r,
            _s
        );
        require(msg.value >= _fee, "ApeRouter: Insufficient fee payment");
        require(
            payable(FEE_CLAIMER).send(_fee),
            "ApeRouter: Fee transfer failed"
        );
        swapNoSplit(_trade, _to, 0);
    }

    /**
     * Swap token to APE without the need to approve the first token
     */
    function swapNoSplitToAPEWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external payable override {
        IERC20(_trade.path[0]).permit(
            msg.sender,
            address(this),
            _trade.amountIn,
            _deadline,
            _v,
            _r,
            _s
        );
        require(msg.value >= _fee, "ApeRouter: Insufficient fee payment");
        require(
            payable(FEE_CLAIMER).send(_fee),
            "ApeRouter: Fee transfer failed"
        );
        swapNoSplitToAPE(_trade, _to, 0);
    }
}

File 2 of 15 : IApeRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


struct Query {
    address adapter;
    address tokenIn;
    address tokenOut;
    uint256 amountOut;
}
struct Offer {
    bytes amounts;
    bytes adapters;
    bytes path;
    uint256 gasEstimate;
}
struct FormattedOffer {
    uint256[] amounts;
    address[] adapters;
    address[] path;
    uint256 gasEstimate;
}
struct Trade {
    uint256 amountIn;
    uint256 amountOut;
    address[] path;
    address[] adapters;
}

interface IApeRouter {

    event UpdatedTrustedTokens(address[] _newTrustedTokens);
    event UpdatedAdapters(address[] _newAdapters);
    event UpdatedMinFee(uint256 _oldMinFee, uint256 _newMinFee);
    event UpdatedFeeClaimer(address _oldFeeClaimer, address _newFeeClaimer);
    event ApeSwap(address indexed _tokenIn, address indexed _tokenOut, uint256 _amountIn, uint256 _amountOut);
    event UpdatedFee(uint256 oldFee, uint256 newFee);

    // admin
    function setTrustedTokens(address[] memory _trustedTokens) external;
    function setAdapters(address[] memory _adapters) external;
    function setFeeClaimer(address _claimer) external;
    function setMinFee(uint256 _fee) external;

    // misc
    function trustedTokensCount() external view returns (uint256);
    function adaptersCount() external view returns (uint256);

    // query

    function queryAdapter(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8 _index
    ) external returns (uint256);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8[] calldata _options
    ) external view returns (Query memory);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (Query memory);

    function findBestPathWithGas(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _gasPrice
    ) external view returns (FormattedOffer memory);

    function findBestPath(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps
    ) external view returns (FormattedOffer memory);

    // swap

    function swapNoSplit(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external payable ;

    function swapNoSplitFromAPE(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external payable;

    function swapNoSplitToAPE(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external payable; 

    function swapNoSplitWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external payable;

    function swapNoSplitToAPEWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external payable;

}

File 3 of 15 : IAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IAdapter {
    function name() external view returns (string memory);

    function swapGasEstimate() external view returns (uint256);

    function swap(
        uint256,
        uint256,
        address,
        address,
        address
    ) external;

    function query(
        uint256,
        address,
        address
    ) external view returns (uint256);
}

File 4 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    event Approval(address, address, uint256);
    event Transfer(address, address, uint256);

    function name() external view returns (string memory);

    function decimals() external view returns (uint8);

    function transferFrom(
        address,
        address,
        uint256
    ) external returns (bool);

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

    function approve(address, uint256) external returns (bool);

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

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

    function nonces(address) external view returns (uint256); // Only tokens that support permit

    function permit(
        address,
        address,
        uint256,
        uint256,
        uint8,
        bytes32,
        bytes32
    ) external; // Only tokens that support permit

    function swap(address, uint256) external; // Only Avalanche bridge tokens

    function swapSupply(address) external view returns (uint256); // Only Avalanche bridge tokens

    function totalSupply() external view returns (uint256);
}

File 5 of 15 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IWETH is IERC20 {
    function withdraw(uint256 amount) external;

    function deposit() external payable;
}

File 6 of 15 : SafeERC20.sol
// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.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 ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    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));
    }

    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'
        // solhint-disable-next-line max-line-length
        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));
    }

    /**
     * @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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 15 : Maintainable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";

/**
 * @dev Contract module which extends the basic access control mechanism of Ownable
 * to include many maintainers, whom only the owner (DEFAULT_ADMIN_ROLE) may add and
 * remove.
 *
 * By default, the owner account will be the one that deploys the contract. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available this modifier:
 * `onlyMaintainer`, which can be applied to your functions to restrict their use to
 * the accounts with the role of maintainer.
 */

abstract contract Maintainable is Context, AccessControl {
    bytes32 public constant MAINTAINER_ROLE = keccak256("MAINTAINER_ROLE");

    constructor() {
        address msgSender = _msgSender();
        // Grant the admin role and maintainer role to the deployer
        _grantRole(DEFAULT_ADMIN_ROLE, msgSender);
        _grantRole(MAINTAINER_ROLE, msgSender);
    }

    function addMaintainer(address addedMaintainer) public virtual {
        grantRole(MAINTAINER_ROLE, addedMaintainer);
    }

    function removeMaintainer(address removedMaintainer) public virtual {
        revokeRole(MAINTAINER_ROLE, removedMaintainer);
    }

    function transferOwnership(address newOwner) public virtual {
        grantRole(DEFAULT_ADMIN_ROLE, newOwner);
        renounceRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    modifier onlyMaintainer() {
        require(hasRole(MAINTAINER_ROLE, _msgSender()), "Maintainable: Caller is not a maintainer");
        _;
    }
}

File 8 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 9 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 10 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 11 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 15 : ApeViewUtils.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.8.4;

import { Offer, FormattedOffer } from "../interface/IApeRouter.sol";
import "./TypeConversion.sol";


library OfferUtils {
    using TypeConversion for address;
    using TypeConversion for uint256;
    using TypeConversion for bytes;

    function newOffer(
        uint _amountIn,
        address _tokenIn
    ) internal pure returns (Offer memory offer) {
        offer.amounts = _amountIn.toBytes();
        offer.path = _tokenIn.toBytes();
    }

    /**
     * Makes a deep copy of Offer struct
     */
    function clone(Offer memory _queries) internal pure returns (Offer memory) {
        return Offer(_queries.amounts, _queries.adapters, _queries.path, _queries.gasEstimate);
    }

    /**
     * Appends new elements to the end of Offer struct
     */
    function addToTail(
        Offer memory _queries,
        uint256 _amount,
        address _adapter,
        address _tokenOut,
        uint256 _gasEstimate
    ) internal pure {
        _queries.path = bytes.concat(_queries.path, _tokenOut.toBytes());
        _queries.adapters = bytes.concat(_queries.adapters, _adapter.toBytes());
        _queries.amounts = bytes.concat(_queries.amounts, _amount.toBytes());
        _queries.gasEstimate += _gasEstimate;
    }

    /**
     * Formats elements in the Offer object from byte-arrays to integers and addresses
     */
    function format(Offer memory _queries) internal pure returns (FormattedOffer memory) {
        return
            FormattedOffer(
                _queries.amounts.toUints(),
                _queries.adapters.toAddresses(),
                _queries.path.toAddresses(),
                _queries.gasEstimate
            );
    }

    function getTokenOut(
        Offer memory _offer
    ) internal pure returns (address tokenOut) {
        tokenOut = _offer.path.toAddress(_offer.path.length);  // Last 32 bytes
    }

    function getAmountOut(
        Offer memory _offer
    ) internal pure returns (uint amountOut) {
        amountOut = _offer.amounts.toUint(_offer.path.length);  // Last 32 bytes
    }

}

library FormattedOfferUtils {
    using TypeConversion for address;
    using TypeConversion for uint256;
    using TypeConversion for bytes;

    /**
     * Appends new elements to the end of FormattedOffer
     */
    function addToTail(
        FormattedOffer memory offer, 
        uint256 amountOut, 
        address wrapper,
        address tokenOut,
        uint256 gasEstimate
    ) internal pure {
        offer.amounts = bytes.concat(abi.encodePacked(offer.amounts), amountOut.toBytes()).toUints();
        offer.adapters = bytes.concat(abi.encodePacked(offer.adapters), wrapper.toBytes()).toAddresses();
        offer.path = bytes.concat(abi.encodePacked(offer.path), tokenOut.toBytes()).toAddresses();
        offer.gasEstimate += gasEstimate;
    }

    /**
     * Appends new elements to the beginning of FormattedOffer
     */
    function addToHead(
        FormattedOffer memory offer, 
        uint256 amountOut, 
        address wrapper,
        address tokenOut,
        uint256 gasEstimate
    ) internal pure {
        offer.amounts = bytes.concat(amountOut.toBytes(), abi.encodePacked(offer.amounts)).toUints();
        offer.adapters = bytes.concat(wrapper.toBytes(), abi.encodePacked(offer.adapters)).toAddresses();
        offer.path = bytes.concat(tokenOut.toBytes(), abi.encodePacked(offer.path)).toAddresses();
        offer.gasEstimate += gasEstimate;
    }

    function getAmountOut(FormattedOffer memory offer) internal pure returns (uint256) {
        return offer.amounts[offer.amounts.length - 1];
    }

}

File 14 of 15 : TypeConversion.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;


library TypeConversion {

    function toBytes12(address x) internal pure returns (bytes12 y) {
        assembly { y := x }
    }

    function toBytes32(address x) internal pure returns (bytes32 y) {
        assembly { y := x }
    }

    function toAddress(bytes32 x) internal pure returns (address y) {
        assembly { y := x }
    }

    function toBytes(address x) internal pure returns (bytes memory y) {
        y = new bytes(32);
        assembly { mstore(add(y, 32), x) }
    }

    function toBytes(bytes32 x) internal pure returns (bytes memory y) {
        y = new bytes(32);
        assembly { mstore(add(y, 32), x) }
    }

    function toBytes(uint x) internal pure returns (bytes memory y) {
        y = new bytes(32);
        assembly { mstore(add(y, 32), x) }
    }

    function toAddress(
        bytes memory x,
        uint offset
    ) internal pure returns (address y) {
        assembly { y := mload(add(x, offset)) }
    }

    function toUint(
        bytes memory x,
        uint offset
    ) internal pure returns (uint y) {
        assembly { y := mload(add(x, offset)) }
    }

    function toBytes12(
        bytes memory x,
        uint offset
    ) internal pure returns (bytes12 y) {
        assembly { y := mload(add(x, offset)) }
    }

    function toBytes32(
        bytes memory x,
        uint offset
    ) internal pure returns (bytes32 y) {
        assembly { y := mload(add(x, offset)) }
    }

    function toAddresses(
        bytes memory xs
    ) internal pure returns (address[] memory ys) {
        ys = new address[](xs.length/32);
        for (uint i=0; i < xs.length/32; i++) {
            ys[i] = toAddress(xs, i*32 + 32);
        }
    }

    function toUints(
        bytes memory xs
    ) internal pure returns (uint[] memory ys) {
        ys = new uint[](xs.length/32);
        for (uint i=0; i < xs.length/32; i++) {
            ys[i] = toUint(xs, i*32 + 32);
        }
    }

    function toBytes32s(
        bytes memory xs
    ) internal pure returns (bytes32[] memory ys) {
        ys = new bytes32[](xs.length/32);
        for (uint i=0; i < xs.length/32; i++) {
            ys[i] = toBytes32(xs, i*32 + 32);
        }
    }

}

File 15 of 15 : Recoverable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./SafeERC20.sol";
import "./Maintainable.sol";


abstract contract Recoverable is Maintainable {
    using SafeERC20 for IERC20;

    event Recovered(
        address indexed _asset, 
        uint amount
    );

    /**
     * @notice Recover ERC20 from contract
     * @param _tokenAddress token address
     * @param _tokenAmount amount to recover
     */
    function recoverERC20(address _tokenAddress, uint _tokenAmount) external onlyMaintainer {
        require(_tokenAmount > 0, "Nothing to recover");
        IERC20(_tokenAddress).safeTransfer(msg.sender, _tokenAmount);
        emit Recovered(_tokenAddress, _tokenAmount);
    }

    /**
     * @notice Recover native asset from contract
     * @param _amount amount
     */
    function recoverNative(uint _amount) external onlyMaintainer {
        require(_amount > 0, "Nothing to recover");
        payable(msg.sender).transfer(_amount);
        emit Recovered(address(0), _amount);
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_adapters","type":"address[]"},{"internalType":"address[]","name":"_trustedTokens","type":"address[]"},{"internalType":"address","name":"_feeClaimer","type":"address"},{"internalType":"address","name":"_wrapped_native","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"_tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOut","type":"uint256"}],"name":"ApeSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_newAdapters","type":"address[]"}],"name":"UpdatedAdapters","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"UpdatedFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldFeeClaimer","type":"address"},{"indexed":false,"internalType":"address","name":"_newFeeClaimer","type":"address"}],"name":"UpdatedFeeClaimer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_oldMinFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newMinFee","type":"uint256"}],"name":"UpdatedMinFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_newTrustedTokens","type":"address[]"}],"name":"UpdatedTrustedTokens","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ADAPTERS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_CLAIMER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAINTAINER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TRUSTED_TOKENS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WNATIVE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adaptersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addedMaintainer","type":"address"}],"name":"addMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint256","name":"_maxSteps","type":"uint256"}],"name":"findBestPath","outputs":[{"components":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"internalType":"struct FormattedOffer","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint256","name":"_maxSteps","type":"uint256"},{"internalType":"uint256","name":"_gasPrice","type":"uint256"}],"name":"findBestPathWithGas","outputs":[{"components":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"internalType":"struct FormattedOffer","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint8","name":"_index","type":"uint8"}],"name":"queryAdapter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint8[]","name":"_options","type":"uint8[]"}],"name":"queryNoSplit","outputs":[{"components":[{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"internalType":"struct Query","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"}],"name":"queryNoSplit","outputs":[{"components":[{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"internalType":"struct Query","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedMaintainer","type":"address"}],"name":"removeMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_adapters","type":"address[]"}],"name":"setAdapters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wnative","type":"address"}],"name":"setAllowanceForWrapping","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_claimer","type":"address"}],"name":"setFeeClaimer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setMinFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_trustedTokens","type":"address[]"}],"name":"setTrustedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplitFromAPE","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"swapNoSplitToAPE","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"swapNoSplitToAPEWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address[]","name":"adapters","type":"address[]"}],"internalType":"struct Trade","name":"_trade","type":"tuple"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"swapNoSplitWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040525f60015534801562000014575f80fd5b5060405162003f4a38038062003f4a833981016040819052620000379162000815565b33620000445f82620000a9565b506200005f5f8051602062003f0a83398151915282620000a9565b506200006d90508262000155565b6200007884620001fd565b6200008383620002b6565b6200008e8562000386565b6001600160a01b039091166080526003555062000964915050565b5f828152602081815260408083206001600160a01b038516845290915281205460ff166200014c575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001033390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200014f565b505f5b92915050565b620001925f8051602062003f0a833981519152335b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b620001e35760405162461bcd60e51b815260206004820152602860248201525f8051602062003f2a83398151915260448201526734b73a30b4b732b960c11b60648201526084015b60405180910390fd5b620001fa6001600160a01b038216825f196200043b565b50565b620002175f8051602062003f0a833981519152336200016a565b620002645760405162461bcd60e51b815260206004820152602860248201525f8051602062003f2a83398151915260448201526734b73a30b4b732b960c11b6064820152608401620001da565b7f658ff1688002926d8f426cb10c052ec29003f50042df9652d8613484c1a5864781604051620002959190620008a8565b60405180910390a18051620002b2906004906020840190620006bd565b5050565b620002d05f8051602062003f0a833981519152336200016a565b6200031d5760405162461bcd60e51b815260206004820152602860248201525f8051602062003f2a83398151915260448201526734b73a30b4b732b960c11b6064820152608401620001da565b600254604080516001600160a01b03928316815291831660208301527fb2c853ac4d80d18d058c43d8018d077a036e542a79acae1647f5ad2a8c76f4e2910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b620003a05f8051602062003f0a833981519152336200016a565b620003ed5760405162461bcd60e51b815260206004820152602860248201525f8051602062003f2a83398151915260448201526734b73a30b4b732b960c11b6064820152608401620001da565b7febf7325f48e05e5e38809c69f8b02a7c907ed31d8768e6c2d841b1296a9225fe816040516200041e9190620008a8565b60405180910390a18051620002b2906005906020840190620006bd565b801580620004b75750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156200048f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620004b59190620008f6565b155b6200052b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401620001da565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620005839185916200058816565b505050565b5f80836001600160a01b031683604051620005a491906200090e565b5f604051808303815f865af19150503d805f8114620005df576040519150601f19603f3d011682016040523d82523d5f602084013e620005e4565b606091505b509150915081620006385760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401620001da565b805115620006b757808060200190518101906200065691906200093c565b620006b75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620001da565b50505050565b828054828255905f5260205f2090810192821562000713579160200282015b828111156200071357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620006dc565b506200072192915062000725565b5090565b5b8082111562000721575f815560010162000726565b634e487b7160e01b5f52604160045260245ffd5b80516001600160a01b038116811462000766575f80fd5b919050565b5f82601f8301126200077b575f80fd5b815160206001600160401b03808311156200079a576200079a6200073b565b8260051b604051601f19603f83011681018181108482111715620007c257620007c26200073b565b604052938452858101830193838101925087851115620007e0575f80fd5b83870191505b848210156200080a57620007fa826200074f565b83529183019190830190620007e6565b979650505050505050565b5f805f805f60a086880312156200082a575f80fd5b85516001600160401b038082111562000841575f80fd5b6200084f89838a016200076b565b9650602088015191508082111562000865575f80fd5b5062000874888289016200076b565b94505062000885604087016200074f565b925062000895606087016200074f565b9150608086015190509295509295909350565b602080825282518282018190525f9190848201906040850190845b81811015620008ea5783516001600160a01b031683529284019291840191600101620008c3565b50909695505050505050565b5f6020828403121562000907575f80fd5b5051919050565b5f82515f5b818110156200092f576020818601810151858301520162000913565b505f920191825250919050565b5f602082840312156200094d575f80fd5b815180151581146200095d575f80fd5b9392505050565b60805161356a620009a05f395f818161060c01528181610b6c015281816111db0152818161184b0152818161247a01526125a2015261356a5ff3fe608060405260043610610235575f3560e01c806391d1485411610129578063c3accd48116100a8578063dd8544b31161006d578063dd8544b3146106d2578063ddca3f43146106f1578063dede7f1514610706578063f2fde38b14610725578063f874225414610744575f80fd5b8063c3accd4814610641578063c8a3a5c614610660578063d547741f1461067f578063d73792a91461069e578063d8baf7cf146106b3575f80fd5b8063a3f4df7e116100ee578063a3f4df7e14610584578063a737274f146105c9578063aede3693146105dc578063b381cf40146105fb578063bed897161461062e575f80fd5b806391d14854146104c157806392f5d88a146104e0578063952e90121461053f578063a0cf0aea1461055e578063a217fddf14610571575f80fd5b8063559f58d3116101b557806376c7a3c71161017a57806376c7a3c71461044657806376ebe69c1461045b5780637c7a561b1461046f578063809356aa146104835780638980f11f146104a2575f80fd5b8063559f58d3146103cf57806369fe0e2d146103e25780636b453c1f146104015780636bf2df861461042057806375d1994714610433575f80fd5b806331ac9920116101fb57806331ac99201461033457806336568abe146103535780633a9a4081146103725780634c09cf4e1461039157806352a52ab0146103b0575f80fd5b8062b99e361461024057806301ffc9a71461027c578063061b15e7146102ab578063248a9ca3146102d75780632f2ff15d14610313575f80fd5b3661023c57005b5f80fd5b34801561024b575f80fd5b5060025461025f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610287575f80fd5b5061029b610296366004612cd5565b610764565b6040519015158152602001610273565b3480156102b6575f80fd5b506102ca6102c5366004612d17565b61079a565b6040516102739190612da3565b3480156102e2575f80fd5b506103056102f1366004612e3c565b5f9081526020819052604090206001015490565b604051908152602001610273565b34801561031e575f80fd5b5061033261032d366004612e53565b61089d565b005b34801561033f575f80fd5b5061033261034e366004612e3c565b6108c7565b34801561035e575f80fd5b5061033261036d366004612e53565b61093b565b34801561037d575f80fd5b5061033261038c366004612e91565b610973565b34801561039c575f80fd5b506102ca6103ab366004612f45565b6109f4565b3480156103bb575f80fd5b5061025f6103ca366004612e3c565b610ad6565b6103326103dd366004612f96565b610afe565b3480156103ed575f80fd5b506103326103fc366004612e3c565b610c5f565b34801561040c575f80fd5b5061033261041b366004612fe9565b610cd3565b61033261042e366004612f96565b610ced565b610332610441366004613012565b610d5d565b348015610451575f80fd5b5061030560015481565b348015610466575f80fd5b50600454610305565b34801561047a575f80fd5b50600554610305565b34801561048e575f80fd5b5061030561049d366004613091565b610e6f565b3480156104ad575f80fd5b506103326104bc3660046130db565b610f17565b3480156104cc575f80fd5b5061029b6104db366004612e53565b610fe9565b3480156104eb575f80fd5b506104ff6104fa366004613103565b611011565b6040805182516001600160a01b03908116825260208085015182169083015283830151169181019190915260609182015191810191909152608001610273565b34801561054a575f80fd5b5061025f610559366004612e3c565b6111a2565b348015610569575f80fd5b5061025f5f81565b34801561057c575f80fd5b506103055f81565b34801561058f575f80fd5b506105bc6040518060400160405280600d81526020016c20b832a9bbb0b82937baba32b960991b81525081565b60405161027391906131bb565b6103326105d7366004612f96565b6111b1565b3480156105e7575f80fd5b506103326105f6366004612e3c565b6112ee565b348015610606575f80fd5b5061025f7f000000000000000000000000000000000000000000000000000000000000000081565b61033261063c366004613012565b6113c8565b34801561064c575f80fd5b5061033261065b366004612fe9565b6114d1565b34801561066b575f80fd5b5061033261067a366004612e91565b61156d565b34801561068a575f80fd5b50610332610699366004612e53565b6115ea565b3480156106a9575f80fd5b5061030561271081565b3480156106be575f80fd5b506103326106cd366004612fe9565b61160e565b3480156106dd575f80fd5b506103326106ec366004612fe9565b611625565b3480156106fc575f80fd5b5061030560035481565b348015610711575f80fd5b506104ff6107203660046131ed565b61166d565b348015610730575f80fd5b5061033261073f366004612fe9565b6117d5565b34801561074f575f80fd5b506103055f8051602061351583398151915281565b5f6001600160e01b03198216637965db0b60e01b148061079457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6107c460405180608001604052806060815260200160608152602001606081526020015f81525090565b5f831180156107d35750600583105b6108245760405162461bcd60e51b815260206004820152601c60248201527f417065526f757465723a20496e76616c6964206d61782d73746570730000000060448201526064015b60405180910390fd5b5f61082f87876117e9565b90505f80841161083f575f610849565b610849848761183b565b90506108598888888886866118ce565b91508160200151515f036108885760408051602080820183525f80835291855282519081018352908152908301525b61089182611bfd565b98975050505050505050565b5f828152602081905260409020600101546108b781611c76565b6108c18383611c80565b50505050565b6108de5f8051602061351583398151915233610fe9565b6108fa5760405162461bcd60e51b815260040161081b90613226565b60015460408051918252602082018390527f4bb8a6184424e4bb853a4836042f5a726e4e710873989bfc6abdab19966f5b70910160405180910390a1600155565b6001600160a01b03811633146109645760405163334bd91960e11b815260040160405180910390fd5b61096e8282611d0f565b505050565b61098a5f8051602061351583398151915233610fe9565b6109a65760405162461bcd60e51b815260040161081b90613226565b7febf7325f48e05e5e38809c69f8b02a7c907ed31d8768e6c2d841b1296a9225fe816040516109d5919061326e565b60405180910390a180516109f0906005906020840190612c5e565b5050565b610a1e60405180608001604052806060815260200160608152602001606081526020015f81525090565b5f82118015610a2d5750600582105b610a795760405162461bcd60e51b815260206004820152601c60248201527f417065526f757465723a20496e76616c6964206d61782d737465707300000000604482015260640161081b565b5f610a8486866117e9565b9050610a9486868686855f6118ce565b90508060200151515f03610ac35760408051602080820183525f80835291845282519081018352908152908201525b610acc81611bfd565b9695505050505050565b60048181548110610ae5575f80fd5b5f918252602090912001546001600160a01b0316905081565b80341015610b1e5760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050610b625760405162461bcd60e51b815260040161081b906132fd565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610b996040850185613334565b6001610ba86040880188613334565b610bb3929150613395565b818110610bc257610bc26133a8565b9050602002016020810190610bd79190612fe9565b6001600160a01b031614610c3c5760405162461bcd60e51b815260206004820152602660248201527f417065526f757465723a2050617468206e6565647320746f20656e642077697460448201526568205741504560d01b606482015260840161081b565b5f610c498433305f611d78565b9050610c5481612464565b6108c15f82856124dc565b610c765f8051602061351583398151915233610fe9565b610c925760405162461bcd60e51b815260040161081b90613226565b60035460408051918252602082018390527faf149a6afa5dcdc16c1a2246211d41ab267c1fc9896c00f79fcfaa012c89769f910160405180910390a1600355565b610cea5f805160206135158339815191528261089d565b50565b80341015610d0d5760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050610d515760405162461bcd60e51b815260040161081b906132fd565b6108c18333845f611d78565b610d6a6040880188613334565b5f818110610d7a57610d7a6133a8565b9050602002016020810190610d8f9190612fe9565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf90610dca90339030908c35908a908a908a908a906004016133bc565b5f604051808303815f87803b158015610de1575f80fd5b505af1158015610df3573d5f803e3d5ffd5b5050505084341015610e175760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169086156108fc029087905f818181858888f19350505050610e5b5760405162461bcd60e51b815260040161081b906132fd565b610e6687875f610ced565b50505050505050565b5f8060058360ff1681548110610e8757610e876133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018990526001600160a01b03888116602483015287811660448301529091169250829063ef99893a90606401602060405180830381865afa158015610ee8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f0c91906133fd565b979650505050505050565b610f2e5f8051602061351583398151915233610fe9565b610f4a5760405162461bcd60e51b815260040161081b90613226565b5f8111610f8e5760405162461bcd60e51b81526020600482015260126024820152712737ba3434b733903a37903932b1b7bb32b960711b604482015260640161081b565b610fa26001600160a01b038316338361253d565b816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882604051610fdd91815260200190565b60405180910390a25050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091525f5b60ff8116841115611197575f600586868460ff1681811061107c5761107c6133a8565b90506020020160208101906110919190613414565b60ff16815481106110a4576110a46133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018c90526001600160a01b038b811660248301528a811660448301529091169250829063ef99893a90606401602060405180830381865afa158015611105573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061112991906133fd565b905060ff8316158061113e5750836060015181115b15611182576040518060800160405280836001600160a01b031681526020018a6001600160a01b03168152602001896001600160a01b031681526020018281525093505b5050808061118f9061342d565b915050611059565b509695505050505050565b60058181548110610ae5575f80fd5b803410156111d15760405162461bcd60e51b815260040161081b906132ba565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166112086040850185613334565b5f818110611218576112186133a8565b905060200201602081019061122d9190612fe9565b6001600160a01b0316146112945760405162461bcd60e51b815260206004820152602860248201527f417065526f757465723a2050617468206e6565647320746f20626567696e2077604482015267697468205741504560c01b606482015260840161081b565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f193505050506112d85760405162461bcd60e51b815260040161081b906132fd565b6112e283356125a0565b6108c18330845f611d78565b6113055f8051602061351583398151915233610fe9565b6113215760405162461bcd60e51b815260040161081b90613226565b5f81116113655760405162461bcd60e51b81526020600482015260126024820152712737ba3434b733903a37903932b1b7bb32b960711b604482015260640161081b565b604051339082156108fc029083905f818181858888f1935050505015801561138f573d5f803e3d5ffd5b506040518181525f907f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289060200160405180910390a250565b6113d56040880188613334565b5f8181106113e5576113e56133a8565b90506020020160208101906113fa9190612fe9565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf9061143590339030908c35908a908a908a908a906004016133bc565b5f604051808303815f87803b15801561144c575f80fd5b505af115801561145e573d5f803e3d5ffd5b50505050843410156114825760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169086156108fc029087905f818181858888f193505050506114c65760405162461bcd60e51b815260040161081b906132fd565b610e6687875f610afe565b6114e85f8051602061351583398151915233610fe9565b6115045760405162461bcd60e51b815260040161081b90613226565b600254604080516001600160a01b03928316815291831660208301527fb2c853ac4d80d18d058c43d8018d077a036e542a79acae1647f5ad2a8c76f4e2910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6115845f8051602061351583398151915233610fe9565b6115a05760405162461bcd60e51b815260040161081b90613226565b7f658ff1688002926d8f426cb10c052ec29003f50042df9652d8613484c1a58647816040516115cf919061326e565b60405180910390a180516109f0906004906020840190612c5e565b5f8281526020819052604090206001015461160481611c76565b6108c18383611d0f565b610cea5f80516020613515833981519152826115ea565b61163c5f8051602061351583398151915233610fe9565b6116585760405162461bcd60e51b815260040161081b90613226565b610cea6001600160a01b038216825f19612613565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091525f5b60055460ff821610156117cc575f60058260ff16815481106116d9576116d96133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018a90526001600160a01b03898116602483015288811660448301529091169250829063ef99893a90606401602060405180830381865afa15801561173a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061175e91906133fd565b905060ff831615806117735750836060015181115b156117b7576040518060800160405280836001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b031681526020018281525093505b505080806117c49061342d565b9150506116b5565b50949350505050565b6117df5f8261089d565b610cea5f3361093b565b61181360405180608001604052806060815260200160608152602001606081526020015f81525090565b61181c83612726565b81526118306001600160a01b038316612726565b604082015292915050565b5f80611872670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000008560026109f4565b90508060400151515f146118c75780518051633b9aca0091869161189890600190613395565b815181106118a8576118a86133a8565b60200260200101516118ba919061344b565b6118c49190613462565b91505b5092915050565b6118f860405180608001604052806060815260200160608152602001606081526020015f81525090565b5f61190284612750565b90505f80841515816119158c8c8c61166d565b905080606001515f146119b057811561198e57805f01516001600160a01b03166369cff80d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611967573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061198b91906133fd565b92505b6060810151815160408301516119a89288929091876127b1565b806060015193505b6001891180156119db57506119c660028a613395565b60208960200151516119d89190613462565b11155b15611bed575f5b600454811015611beb57600481815481106119ff576119ff6133a8565b5f918252602090912001546001600160a01b038d8116911614611bd9575f611a4e8e8e60048581548110611a3557611a356133a8565b5f918252602090912001546001600160a01b031661166d565b905080606001515f03611a615750611bd9565b5f611a6b8b612750565b90508415611ad957815f01516001600160a01b03166369cff80d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ab2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ad691906133fd565b95505b606082015182516040840151611af392849290918a6127b1565b611b2b826060015160048581548110611b0e57611b0e6133a8565b5f918252602090912001546001600160a01b03168f8f858f6118ce565b90505f611b3782612875565b90505f611b4383612887565b9050816001600160a01b03168f6001600160a01b0316148015611b6557508881115b15611bd457896060015183606001511115611bcd575f633b9aca008b606001518560600151611b949190613395565b611b9e908f61344b565b611ba89190613462565b90505f611bb58b84613395565b905080821115611bca57505050505050611bd9565b50505b8098508299505b505050505b80611be381613481565b9150506119e2565b505b50929a9950505050505050505050565b611c2760405180608001604052806060815260200160608152602001606081526020015f81525090565b6040518060800160405280611c3e845f015161289b565b8152602001611c50846020015161295a565b8152602001611c62846040015161295a565b815260200183606001518152509050919050565b610cea8133612a10565b5f611c8b8383610fe9565b611d08575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055611cc03390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610794565b505f610794565b5f611d1a8383610fe9565b15611d08575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610794565b5f80611d876040870187613334565b905067ffffffffffffffff811115611da157611da1612e7d565b604051908082528060200260200182016040528015611dca578160200160208202803683370190505b5090505f831180611ddc57505f600154115b15611e7f57611dec863584612a49565b815f81518110611dfe57611dfe6133a8565b6020908102919091010152611e7a611e196040880188613334565b5f818110611e2957611e296133a8565b9050602002016020810190611e3e9190612fe9565b600254835188916001600160a01b03169085905f90611e5f57611e5f6133a8565b60200260200101518a5f0135611e759190613395565b612ac4565b611ea2565b855f0135815f81518110611e9557611e956133a8565b6020026020010181815250505b611f29611eb26040880188613334565b5f818110611ec257611ec26133a8565b9050602002016020810190611ed79190612fe9565b86611ee560608a018a613334565b5f818110611ef557611ef56133a8565b9050602002016020810190611f0a9190612fe9565b845f81518110611f1c57611f1c6133a8565b6020026020010151612ac4565b5f5b611f386060880188613334565b90508110156120b957611f4e6060880188613334565b82818110611f5e57611f5e6133a8565b9050602002016020810190611f739190612fe9565b6001600160a01b031663ef99893a838381518110611f9357611f936133a8565b6020026020010151898060400190611fab9190613334565b85818110611fbb57611fbb6133a8565b9050602002016020810190611fd09190612fe9565b611fdd60408c018c613334565b611fe8876001613499565b818110611ff757611ff76133a8565b905060200201602081019061200c9190612fe9565b6040516001600160e01b031960e086901b16815260048101939093526001600160a01b039182166024840152166044820152606401602060405180830381865afa15801561205c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061208091906133fd565b8261208c836001613499565b8151811061209c5761209c6133a8565b6020908102919091010152806120b181613481565b915050611f2b565b50856020013581600183516120ce9190613395565b815181106120de576120de6133a8565b602002602001015110156121425760405162461bcd60e51b815260206004820152602560248201527f417065526f757465723a20496e73756666696369656e74206f757470757420616044820152641b5bdd5b9d60da1b606482015260840161081b565b5f5b6121516060880188613334565b9050811015612337575f600161216a60608a018a613334565b612175929150613395565b821061218157856121bd565b61218e6060890189613334565b612199846001613499565b8181106121a8576121a86133a8565b90506020020160208101906121bd9190612fe9565b90506121cc6060890189613334565b838181106121dc576121dc6133a8565b90506020020160208101906121f19190612fe9565b6001600160a01b031663eab90da6848481518110612211576122116133a8565b6020026020010151858560016122279190613499565b81518110612237576122376133a8565b60200260200101518b806040019061224f9190613334565b8781811061225f5761225f6133a8565b90506020020160208101906122749190612fe9565b61228160408e018e613334565b61228c896001613499565b81811061229b5761229b6133a8565b90506020020160208101906122b09190612fe9565b6040516001600160e01b031960e087901b168152600481019490945260248401929092526001600160a01b03908116604484015290811660648301528416608482015260a4015f604051808303815f87803b15801561230d575f80fd5b505af115801561231f573d5f803e3d5ffd5b5050505050808061232f90613481565b915050612144565b506123456040870187613334565b600161235460408a018a613334565b61235f929150613395565b81811061236e5761236e6133a8565b90506020020160208101906123839190612fe9565b6001600160a01b03166123996040880188613334565b5f8181106123a9576123a96133a8565b90506020020160208101906123be9190612fe9565b6001600160a01b03167f268530cabee07356e945e52c8eaa3cec1e7b1992fada3d01f9cf44c07e7e4f32885f013584600186516123fb9190613395565b8151811061240b5761240b6133a8565b602002602001015160405161242a929190918252602082015260400190565b60405180910390a380600182516124419190613395565b81518110612451576124516133a8565b6020026020010151915050949350505050565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156124c3575f80fd5b505af11580156124d5573d5f803e3d5ffd5b5050505050565b306001600160a01b0382161461096e576001600160a01b03831661252d576040516001600160a01b0382169083156108fc029084905f818181858888f193505050501580156108c1573d5f803e3d5ffd5b61096e6001600160a01b03841682845b6040516001600160a01b03831660248201526044810182905261096e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b02565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b1580156125f9575f80fd5b505af115801561260b573d5f803e3d5ffd5b505050505050565b80158061268b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612665573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061268991906133fd565b155b6126f65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161081b565b6040516001600160a01b03831660248201526044810182905261096e90849063095ea7b360e01b90606401612569565b60408051602080825281830190925260609160208201818036833750505060208101929092525090565b61277a60405180608001604052806060815260200160608152602001606081526020015f81525090565b6040518060800160405280835f01518152602001836020015181526020018360400151815260200183606001518152509050919050565b84604001516127c8836001600160a01b0316612726565b6040516020016127d99291906134ac565b60408051601f1981840301815291815286015260208501516128036001600160a01b038516612726565b6040516020016128149291906134ac565b60408051601f198184030181529190526020860152845161283485612726565b6040516020016128459291906134ac565b60408051601f19818403018152919052855260608501805182919061286b908390613499565b9052505050505050565b604081015180515f9161079491612920565b60408101515181515f916107949190612920565b6060602082516128ab9190613462565b67ffffffffffffffff8111156128c3576128c3612e7d565b6040519080825280602002602001820160405280156128ec578160200160208202803683370190505b5090505f5b602083516128ff9190613462565b811015612954576129258361291583602061344b565b612920906020613499565b015190565b828281518110612937576129376133a8565b60209081029190910101528061294c81613481565b9150506128f1565b50919050565b60606020825161296a9190613462565b67ffffffffffffffff81111561298257612982612e7d565b6040519080825280602002602001820160405280156129ab578160200160208202803683370190505b5090505f5b602083516129be9190613462565b811015612954576129d48361291583602061344b565b8282815181106129e6576129e66133a8565b6001600160a01b039092166020928302919091019091015280612a0881613481565b9150506129b0565b612a1a8282610fe9565b6109f05760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161081b565b5f600154821015612a9c5760405162461bcd60e51b815260206004820152601b60248201527f417065526f757465723a20496e73756666696369656e74206665650000000000604482015260640161081b565b612710612aa98382613395565b612ab3908561344b565b612abd9190613462565b9392505050565b6001600160a01b0383163014612aee57612ae96001600160a01b038516848484612c26565b6108c1565b6108c16001600160a01b038516838361253d565b5f80836001600160a01b031683604051612b1c91906134da565b5f604051808303815f865af19150503d805f8114612b55576040519150601f19603f3d011682016040523d82523d5f602084013e612b5a565b606091505b509150915081612bac5760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015260640161081b565b8051156108c15780806020019051810190612bc791906134f5565b6108c15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161081b565b6040516001600160a01b03808516602483015283166044820152606481018290526108c19085906323b872dd60e01b90608401612569565b828054828255905f5260205f20908101928215612cb1579160200282015b82811115612cb157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612c7c565b50612cbd929150612cc1565b5090565b5b80821115612cbd575f8155600101612cc2565b5f60208284031215612ce5575f80fd5b81356001600160e01b031981168114612abd575f80fd5b80356001600160a01b0381168114612d12575f80fd5b919050565b5f805f805f60a08688031215612d2b575f80fd5b85359450612d3b60208701612cfc565b9350612d4960408701612cfc565b94979396509394606081013594506080013592915050565b5f8151808452602080850194508084015f5b83811015612d985781516001600160a01b031687529582019590820190600101612d73565b509495945050505050565b60208082528251608083830152805160a084018190525f9291820190839060c08601905b80831015612de75783518252928401926001929092019190840190612dc7565b50838701519350601f19925082868203016040870152612e078185612d61565b93505050604085015181858403016060860152612e248382612d61565b92505050606084015160808401528091505092915050565b5f60208284031215612e4c575f80fd5b5035919050565b5f8060408385031215612e64575f80fd5b82359150612e7460208401612cfc565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f6020808385031215612ea2575f80fd5b823567ffffffffffffffff80821115612eb9575f80fd5b818501915085601f830112612ecc575f80fd5b813581811115612ede57612ede612e7d565b8060051b604051601f19603f83011681018181108582111715612f0357612f03612e7d565b604052918252848201925083810185019188831115612f20575f80fd5b938501935b8285101561089157612f3685612cfc565b84529385019392850192612f25565b5f805f8060808587031215612f58575f80fd5b84359350612f6860208601612cfc565b9250612f7660408601612cfc565b9396929550929360600135925050565b5f60808284031215612954575f80fd5b5f805f60608486031215612fa8575f80fd5b833567ffffffffffffffff811115612fbe575f80fd5b612fca86828701612f86565b935050612fd960208501612cfc565b9150604084013590509250925092565b5f60208284031215612ff9575f80fd5b612abd82612cfc565b803560ff81168114612d12575f80fd5b5f805f805f805f60e0888a031215613028575f80fd5b873567ffffffffffffffff81111561303e575f80fd5b61304a8a828b01612f86565b97505061305960208901612cfc565b9550604088013594506060880135935061307560808901613002565b925060a0880135915060c0880135905092959891949750929550565b5f805f80608085870312156130a4575f80fd5b843593506130b460208601612cfc565b92506130c260408601612cfc565b91506130d060608601613002565b905092959194509250565b5f80604083850312156130ec575f80fd5b6130f583612cfc565b946020939093013593505050565b5f805f805f60808688031215613117575f80fd5b8535945061312760208701612cfc565b935061313560408701612cfc565b9250606086013567ffffffffffffffff80821115613151575f80fd5b818801915088601f830112613164575f80fd5b813581811115613172575f80fd5b8960208260051b8501011115613186575f80fd5b9699959850939650602001949392505050565b5f5b838110156131b357818101518382015260200161319b565b50505f910152565b602081525f82518060208401526131d9816040850160208701613199565b601f01601f19169190910160400192915050565b5f805f606084860312156131ff575f80fd5b8335925061320f60208501612cfc565b915061321d60408501612cfc565b90509250925092565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201526734b73a30b4b732b960c11b606082015260800190565b602080825282518282018190525f9190848201906040850190845b818110156132ae5783516001600160a01b031683529284019291840191600101613289565b50909695505050505050565b60208082526023908201527f417065526f757465723a20496e73756666696369656e7420666565207061796d604082015262195b9d60ea1b606082015260800190565b6020808252601e908201527f417065526f757465723a20466565207472616e73666572206661696c65640000604082015260600190565b5f808335601e19843603018112613349575f80fd5b83018035915067ffffffffffffffff821115613363575f80fd5b6020019150600581901b360382131561337a575f80fd5b9250929050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561079457610794613381565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b5f6020828403121561340d575f80fd5b5051919050565b5f60208284031215613424575f80fd5b612abd82613002565b5f60ff821660ff810361344257613442613381565b60010192915050565b808202811582820484141761079457610794613381565b5f8261347c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f6001820161349257613492613381565b5060010190565b8082018082111561079457610794613381565b5f83516134bd818460208801613199565b8351908301906134d1818360208801613199565b01949350505050565b5f82516134eb818460208701613199565b9190910192915050565b5f60208284031215613505575f80fd5b81518015158114612abd575f80fdfe339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95a2646970667358221220ed692369f07105423c6654f1355c3e4fca45eac8a94d5294aa8ab1072f8a5d0264736f6c63430008140033339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab954d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000dd0de6f63fb1f6ce7983f78457a61eb59defb78700000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5570000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000052117f1b96f661fd1059b3d2a2e8041f3a77b62b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557

Deployed Bytecode

0x608060405260043610610235575f3560e01c806391d1485411610129578063c3accd48116100a8578063dd8544b31161006d578063dd8544b3146106d2578063ddca3f43146106f1578063dede7f1514610706578063f2fde38b14610725578063f874225414610744575f80fd5b8063c3accd4814610641578063c8a3a5c614610660578063d547741f1461067f578063d73792a91461069e578063d8baf7cf146106b3575f80fd5b8063a3f4df7e116100ee578063a3f4df7e14610584578063a737274f146105c9578063aede3693146105dc578063b381cf40146105fb578063bed897161461062e575f80fd5b806391d14854146104c157806392f5d88a146104e0578063952e90121461053f578063a0cf0aea1461055e578063a217fddf14610571575f80fd5b8063559f58d3116101b557806376c7a3c71161017a57806376c7a3c71461044657806376ebe69c1461045b5780637c7a561b1461046f578063809356aa146104835780638980f11f146104a2575f80fd5b8063559f58d3146103cf57806369fe0e2d146103e25780636b453c1f146104015780636bf2df861461042057806375d1994714610433575f80fd5b806331ac9920116101fb57806331ac99201461033457806336568abe146103535780633a9a4081146103725780634c09cf4e1461039157806352a52ab0146103b0575f80fd5b8062b99e361461024057806301ffc9a71461027c578063061b15e7146102ab578063248a9ca3146102d75780632f2ff15d14610313575f80fd5b3661023c57005b5f80fd5b34801561024b575f80fd5b5060025461025f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610287575f80fd5b5061029b610296366004612cd5565b610764565b6040519015158152602001610273565b3480156102b6575f80fd5b506102ca6102c5366004612d17565b61079a565b6040516102739190612da3565b3480156102e2575f80fd5b506103056102f1366004612e3c565b5f9081526020819052604090206001015490565b604051908152602001610273565b34801561031e575f80fd5b5061033261032d366004612e53565b61089d565b005b34801561033f575f80fd5b5061033261034e366004612e3c565b6108c7565b34801561035e575f80fd5b5061033261036d366004612e53565b61093b565b34801561037d575f80fd5b5061033261038c366004612e91565b610973565b34801561039c575f80fd5b506102ca6103ab366004612f45565b6109f4565b3480156103bb575f80fd5b5061025f6103ca366004612e3c565b610ad6565b6103326103dd366004612f96565b610afe565b3480156103ed575f80fd5b506103326103fc366004612e3c565b610c5f565b34801561040c575f80fd5b5061033261041b366004612fe9565b610cd3565b61033261042e366004612f96565b610ced565b610332610441366004613012565b610d5d565b348015610451575f80fd5b5061030560015481565b348015610466575f80fd5b50600454610305565b34801561047a575f80fd5b50600554610305565b34801561048e575f80fd5b5061030561049d366004613091565b610e6f565b3480156104ad575f80fd5b506103326104bc3660046130db565b610f17565b3480156104cc575f80fd5b5061029b6104db366004612e53565b610fe9565b3480156104eb575f80fd5b506104ff6104fa366004613103565b611011565b6040805182516001600160a01b03908116825260208085015182169083015283830151169181019190915260609182015191810191909152608001610273565b34801561054a575f80fd5b5061025f610559366004612e3c565b6111a2565b348015610569575f80fd5b5061025f5f81565b34801561057c575f80fd5b506103055f81565b34801561058f575f80fd5b506105bc6040518060400160405280600d81526020016c20b832a9bbb0b82937baba32b960991b81525081565b60405161027391906131bb565b6103326105d7366004612f96565b6111b1565b3480156105e7575f80fd5b506103326105f6366004612e3c565b6112ee565b348015610606575f80fd5b5061025f7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b55781565b61033261063c366004613012565b6113c8565b34801561064c575f80fd5b5061033261065b366004612fe9565b6114d1565b34801561066b575f80fd5b5061033261067a366004612e91565b61156d565b34801561068a575f80fd5b50610332610699366004612e53565b6115ea565b3480156106a9575f80fd5b5061030561271081565b3480156106be575f80fd5b506103326106cd366004612fe9565b61160e565b3480156106dd575f80fd5b506103326106ec366004612fe9565b611625565b3480156106fc575f80fd5b5061030560035481565b348015610711575f80fd5b506104ff6107203660046131ed565b61166d565b348015610730575f80fd5b5061033261073f366004612fe9565b6117d5565b34801561074f575f80fd5b506103055f8051602061351583398151915281565b5f6001600160e01b03198216637965db0b60e01b148061079457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6107c460405180608001604052806060815260200160608152602001606081526020015f81525090565b5f831180156107d35750600583105b6108245760405162461bcd60e51b815260206004820152601c60248201527f417065526f757465723a20496e76616c6964206d61782d73746570730000000060448201526064015b60405180910390fd5b5f61082f87876117e9565b90505f80841161083f575f610849565b610849848761183b565b90506108598888888886866118ce565b91508160200151515f036108885760408051602080820183525f80835291855282519081018352908152908301525b61089182611bfd565b98975050505050505050565b5f828152602081905260409020600101546108b781611c76565b6108c18383611c80565b50505050565b6108de5f8051602061351583398151915233610fe9565b6108fa5760405162461bcd60e51b815260040161081b90613226565b60015460408051918252602082018390527f4bb8a6184424e4bb853a4836042f5a726e4e710873989bfc6abdab19966f5b70910160405180910390a1600155565b6001600160a01b03811633146109645760405163334bd91960e11b815260040160405180910390fd5b61096e8282611d0f565b505050565b61098a5f8051602061351583398151915233610fe9565b6109a65760405162461bcd60e51b815260040161081b90613226565b7febf7325f48e05e5e38809c69f8b02a7c907ed31d8768e6c2d841b1296a9225fe816040516109d5919061326e565b60405180910390a180516109f0906005906020840190612c5e565b5050565b610a1e60405180608001604052806060815260200160608152602001606081526020015f81525090565b5f82118015610a2d5750600582105b610a795760405162461bcd60e51b815260206004820152601c60248201527f417065526f757465723a20496e76616c6964206d61782d737465707300000000604482015260640161081b565b5f610a8486866117e9565b9050610a9486868686855f6118ce565b90508060200151515f03610ac35760408051602080820183525f80835291845282519081018352908152908201525b610acc81611bfd565b9695505050505050565b60048181548110610ae5575f80fd5b5f918252602090912001546001600160a01b0316905081565b80341015610b1e5760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050610b625760405162461bcd60e51b815260040161081b906132fd565b6001600160a01b037f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b55716610b996040850185613334565b6001610ba86040880188613334565b610bb3929150613395565b818110610bc257610bc26133a8565b9050602002016020810190610bd79190612fe9565b6001600160a01b031614610c3c5760405162461bcd60e51b815260206004820152602660248201527f417065526f757465723a2050617468206e6565647320746f20656e642077697460448201526568205741504560d01b606482015260840161081b565b5f610c498433305f611d78565b9050610c5481612464565b6108c15f82856124dc565b610c765f8051602061351583398151915233610fe9565b610c925760405162461bcd60e51b815260040161081b90613226565b60035460408051918252602082018390527faf149a6afa5dcdc16c1a2246211d41ab267c1fc9896c00f79fcfaa012c89769f910160405180910390a1600355565b610cea5f805160206135158339815191528261089d565b50565b80341015610d0d5760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050610d515760405162461bcd60e51b815260040161081b906132fd565b6108c18333845f611d78565b610d6a6040880188613334565b5f818110610d7a57610d7a6133a8565b9050602002016020810190610d8f9190612fe9565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf90610dca90339030908c35908a908a908a908a906004016133bc565b5f604051808303815f87803b158015610de1575f80fd5b505af1158015610df3573d5f803e3d5ffd5b5050505084341015610e175760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169086156108fc029087905f818181858888f19350505050610e5b5760405162461bcd60e51b815260040161081b906132fd565b610e6687875f610ced565b50505050505050565b5f8060058360ff1681548110610e8757610e876133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018990526001600160a01b03888116602483015287811660448301529091169250829063ef99893a90606401602060405180830381865afa158015610ee8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f0c91906133fd565b979650505050505050565b610f2e5f8051602061351583398151915233610fe9565b610f4a5760405162461bcd60e51b815260040161081b90613226565b5f8111610f8e5760405162461bcd60e51b81526020600482015260126024820152712737ba3434b733903a37903932b1b7bb32b960711b604482015260640161081b565b610fa26001600160a01b038316338361253d565b816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882604051610fdd91815260200190565b60405180910390a25050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091525f5b60ff8116841115611197575f600586868460ff1681811061107c5761107c6133a8565b90506020020160208101906110919190613414565b60ff16815481106110a4576110a46133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018c90526001600160a01b038b811660248301528a811660448301529091169250829063ef99893a90606401602060405180830381865afa158015611105573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061112991906133fd565b905060ff8316158061113e5750836060015181115b15611182576040518060800160405280836001600160a01b031681526020018a6001600160a01b03168152602001896001600160a01b031681526020018281525093505b5050808061118f9061342d565b915050611059565b509695505050505050565b60058181548110610ae5575f80fd5b803410156111d15760405162461bcd60e51b815260040161081b906132ba565b6001600160a01b037f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557166112086040850185613334565b5f818110611218576112186133a8565b905060200201602081019061122d9190612fe9565b6001600160a01b0316146112945760405162461bcd60e51b815260206004820152602860248201527f417065526f757465723a2050617468206e6565647320746f20626567696e2077604482015267697468205741504560c01b606482015260840161081b565b6002546040516001600160a01b039091169082156108fc029083905f818181858888f193505050506112d85760405162461bcd60e51b815260040161081b906132fd565b6112e283356125a0565b6108c18330845f611d78565b6113055f8051602061351583398151915233610fe9565b6113215760405162461bcd60e51b815260040161081b90613226565b5f81116113655760405162461bcd60e51b81526020600482015260126024820152712737ba3434b733903a37903932b1b7bb32b960711b604482015260640161081b565b604051339082156108fc029083905f818181858888f1935050505015801561138f573d5f803e3d5ffd5b506040518181525f907f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289060200160405180910390a250565b6113d56040880188613334565b5f8181106113e5576113e56133a8565b90506020020160208101906113fa9190612fe9565b60405163d505accf60e01b81526001600160a01b03919091169063d505accf9061143590339030908c35908a908a908a908a906004016133bc565b5f604051808303815f87803b15801561144c575f80fd5b505af115801561145e573d5f803e3d5ffd5b50505050843410156114825760405162461bcd60e51b815260040161081b906132ba565b6002546040516001600160a01b039091169086156108fc029087905f818181858888f193505050506114c65760405162461bcd60e51b815260040161081b906132fd565b610e6687875f610afe565b6114e85f8051602061351583398151915233610fe9565b6115045760405162461bcd60e51b815260040161081b90613226565b600254604080516001600160a01b03928316815291831660208301527fb2c853ac4d80d18d058c43d8018d077a036e542a79acae1647f5ad2a8c76f4e2910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6115845f8051602061351583398151915233610fe9565b6115a05760405162461bcd60e51b815260040161081b90613226565b7f658ff1688002926d8f426cb10c052ec29003f50042df9652d8613484c1a58647816040516115cf919061326e565b60405180910390a180516109f0906004906020840190612c5e565b5f8281526020819052604090206001015461160481611c76565b6108c18383611d0f565b610cea5f80516020613515833981519152826115ea565b61163c5f8051602061351583398151915233610fe9565b6116585760405162461bcd60e51b815260040161081b90613226565b610cea6001600160a01b038216825f19612613565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091525f5b60055460ff821610156117cc575f60058260ff16815481106116d9576116d96133a8565b5f9182526020822001546040516377ccc49d60e11b8152600481018a90526001600160a01b03898116602483015288811660448301529091169250829063ef99893a90606401602060405180830381865afa15801561173a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061175e91906133fd565b905060ff831615806117735750836060015181115b156117b7576040518060800160405280836001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b031681526020018281525093505b505080806117c49061342d565b9150506116b5565b50949350505050565b6117df5f8261089d565b610cea5f3361093b565b61181360405180608001604052806060815260200160608152602001606081526020015f81525090565b61181c83612726565b81526118306001600160a01b038316612726565b604082015292915050565b5f80611872670de0b6b3a76400007f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578560026109f4565b90508060400151515f146118c75780518051633b9aca0091869161189890600190613395565b815181106118a8576118a86133a8565b60200260200101516118ba919061344b565b6118c49190613462565b91505b5092915050565b6118f860405180608001604052806060815260200160608152602001606081526020015f81525090565b5f61190284612750565b90505f80841515816119158c8c8c61166d565b905080606001515f146119b057811561198e57805f01516001600160a01b03166369cff80d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611967573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061198b91906133fd565b92505b6060810151815160408301516119a89288929091876127b1565b806060015193505b6001891180156119db57506119c660028a613395565b60208960200151516119d89190613462565b11155b15611bed575f5b600454811015611beb57600481815481106119ff576119ff6133a8565b5f918252602090912001546001600160a01b038d8116911614611bd9575f611a4e8e8e60048581548110611a3557611a356133a8565b5f918252602090912001546001600160a01b031661166d565b905080606001515f03611a615750611bd9565b5f611a6b8b612750565b90508415611ad957815f01516001600160a01b03166369cff80d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ab2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ad691906133fd565b95505b606082015182516040840151611af392849290918a6127b1565b611b2b826060015160048581548110611b0e57611b0e6133a8565b5f918252602090912001546001600160a01b03168f8f858f6118ce565b90505f611b3782612875565b90505f611b4383612887565b9050816001600160a01b03168f6001600160a01b0316148015611b6557508881115b15611bd457896060015183606001511115611bcd575f633b9aca008b606001518560600151611b949190613395565b611b9e908f61344b565b611ba89190613462565b90505f611bb58b84613395565b905080821115611bca57505050505050611bd9565b50505b8098508299505b505050505b80611be381613481565b9150506119e2565b505b50929a9950505050505050505050565b611c2760405180608001604052806060815260200160608152602001606081526020015f81525090565b6040518060800160405280611c3e845f015161289b565b8152602001611c50846020015161295a565b8152602001611c62846040015161295a565b815260200183606001518152509050919050565b610cea8133612a10565b5f611c8b8383610fe9565b611d08575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055611cc03390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610794565b505f610794565b5f611d1a8383610fe9565b15611d08575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610794565b5f80611d876040870187613334565b905067ffffffffffffffff811115611da157611da1612e7d565b604051908082528060200260200182016040528015611dca578160200160208202803683370190505b5090505f831180611ddc57505f600154115b15611e7f57611dec863584612a49565b815f81518110611dfe57611dfe6133a8565b6020908102919091010152611e7a611e196040880188613334565b5f818110611e2957611e296133a8565b9050602002016020810190611e3e9190612fe9565b600254835188916001600160a01b03169085905f90611e5f57611e5f6133a8565b60200260200101518a5f0135611e759190613395565b612ac4565b611ea2565b855f0135815f81518110611e9557611e956133a8565b6020026020010181815250505b611f29611eb26040880188613334565b5f818110611ec257611ec26133a8565b9050602002016020810190611ed79190612fe9565b86611ee560608a018a613334565b5f818110611ef557611ef56133a8565b9050602002016020810190611f0a9190612fe9565b845f81518110611f1c57611f1c6133a8565b6020026020010151612ac4565b5f5b611f386060880188613334565b90508110156120b957611f4e6060880188613334565b82818110611f5e57611f5e6133a8565b9050602002016020810190611f739190612fe9565b6001600160a01b031663ef99893a838381518110611f9357611f936133a8565b6020026020010151898060400190611fab9190613334565b85818110611fbb57611fbb6133a8565b9050602002016020810190611fd09190612fe9565b611fdd60408c018c613334565b611fe8876001613499565b818110611ff757611ff76133a8565b905060200201602081019061200c9190612fe9565b6040516001600160e01b031960e086901b16815260048101939093526001600160a01b039182166024840152166044820152606401602060405180830381865afa15801561205c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061208091906133fd565b8261208c836001613499565b8151811061209c5761209c6133a8565b6020908102919091010152806120b181613481565b915050611f2b565b50856020013581600183516120ce9190613395565b815181106120de576120de6133a8565b602002602001015110156121425760405162461bcd60e51b815260206004820152602560248201527f417065526f757465723a20496e73756666696369656e74206f757470757420616044820152641b5bdd5b9d60da1b606482015260840161081b565b5f5b6121516060880188613334565b9050811015612337575f600161216a60608a018a613334565b612175929150613395565b821061218157856121bd565b61218e6060890189613334565b612199846001613499565b8181106121a8576121a86133a8565b90506020020160208101906121bd9190612fe9565b90506121cc6060890189613334565b838181106121dc576121dc6133a8565b90506020020160208101906121f19190612fe9565b6001600160a01b031663eab90da6848481518110612211576122116133a8565b6020026020010151858560016122279190613499565b81518110612237576122376133a8565b60200260200101518b806040019061224f9190613334565b8781811061225f5761225f6133a8565b90506020020160208101906122749190612fe9565b61228160408e018e613334565b61228c896001613499565b81811061229b5761229b6133a8565b90506020020160208101906122b09190612fe9565b6040516001600160e01b031960e087901b168152600481019490945260248401929092526001600160a01b03908116604484015290811660648301528416608482015260a4015f604051808303815f87803b15801561230d575f80fd5b505af115801561231f573d5f803e3d5ffd5b5050505050808061232f90613481565b915050612144565b506123456040870187613334565b600161235460408a018a613334565b61235f929150613395565b81811061236e5761236e6133a8565b90506020020160208101906123839190612fe9565b6001600160a01b03166123996040880188613334565b5f8181106123a9576123a96133a8565b90506020020160208101906123be9190612fe9565b6001600160a01b03167f268530cabee07356e945e52c8eaa3cec1e7b1992fada3d01f9cf44c07e7e4f32885f013584600186516123fb9190613395565b8151811061240b5761240b6133a8565b602002602001015160405161242a929190918252602082015260400190565b60405180910390a380600182516124419190613395565b81518110612451576124516133a8565b6020026020010151915050949350505050565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156124c3575f80fd5b505af11580156124d5573d5f803e3d5ffd5b5050505050565b306001600160a01b0382161461096e576001600160a01b03831661252d576040516001600160a01b0382169083156108fc029084905f818181858888f193505050501580156108c1573d5f803e3d5ffd5b61096e6001600160a01b03841682845b6040516001600160a01b03831660248201526044810182905261096e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b02565b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b1580156125f9575f80fd5b505af115801561260b573d5f803e3d5ffd5b505050505050565b80158061268b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612665573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061268991906133fd565b155b6126f65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161081b565b6040516001600160a01b03831660248201526044810182905261096e90849063095ea7b360e01b90606401612569565b60408051602080825281830190925260609160208201818036833750505060208101929092525090565b61277a60405180608001604052806060815260200160608152602001606081526020015f81525090565b6040518060800160405280835f01518152602001836020015181526020018360400151815260200183606001518152509050919050565b84604001516127c8836001600160a01b0316612726565b6040516020016127d99291906134ac565b60408051601f1981840301815291815286015260208501516128036001600160a01b038516612726565b6040516020016128149291906134ac565b60408051601f198184030181529190526020860152845161283485612726565b6040516020016128459291906134ac565b60408051601f19818403018152919052855260608501805182919061286b908390613499565b9052505050505050565b604081015180515f9161079491612920565b60408101515181515f916107949190612920565b6060602082516128ab9190613462565b67ffffffffffffffff8111156128c3576128c3612e7d565b6040519080825280602002602001820160405280156128ec578160200160208202803683370190505b5090505f5b602083516128ff9190613462565b811015612954576129258361291583602061344b565b612920906020613499565b015190565b828281518110612937576129376133a8565b60209081029190910101528061294c81613481565b9150506128f1565b50919050565b60606020825161296a9190613462565b67ffffffffffffffff81111561298257612982612e7d565b6040519080825280602002602001820160405280156129ab578160200160208202803683370190505b5090505f5b602083516129be9190613462565b811015612954576129d48361291583602061344b565b8282815181106129e6576129e66133a8565b6001600160a01b039092166020928302919091019091015280612a0881613481565b9150506129b0565b612a1a8282610fe9565b6109f05760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161081b565b5f600154821015612a9c5760405162461bcd60e51b815260206004820152601b60248201527f417065526f757465723a20496e73756666696369656e74206665650000000000604482015260640161081b565b612710612aa98382613395565b612ab3908561344b565b612abd9190613462565b9392505050565b6001600160a01b0383163014612aee57612ae96001600160a01b038516848484612c26565b6108c1565b6108c16001600160a01b038516838361253d565b5f80836001600160a01b031683604051612b1c91906134da565b5f604051808303815f865af19150503d805f8114612b55576040519150601f19603f3d011682016040523d82523d5f602084013e612b5a565b606091505b509150915081612bac5760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015260640161081b565b8051156108c15780806020019051810190612bc791906134f5565b6108c15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161081b565b6040516001600160a01b03808516602483015283166044820152606481018290526108c19085906323b872dd60e01b90608401612569565b828054828255905f5260205f20908101928215612cb1579160200282015b82811115612cb157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612c7c565b50612cbd929150612cc1565b5090565b5b80821115612cbd575f8155600101612cc2565b5f60208284031215612ce5575f80fd5b81356001600160e01b031981168114612abd575f80fd5b80356001600160a01b0381168114612d12575f80fd5b919050565b5f805f805f60a08688031215612d2b575f80fd5b85359450612d3b60208701612cfc565b9350612d4960408701612cfc565b94979396509394606081013594506080013592915050565b5f8151808452602080850194508084015f5b83811015612d985781516001600160a01b031687529582019590820190600101612d73565b509495945050505050565b60208082528251608083830152805160a084018190525f9291820190839060c08601905b80831015612de75783518252928401926001929092019190840190612dc7565b50838701519350601f19925082868203016040870152612e078185612d61565b93505050604085015181858403016060860152612e248382612d61565b92505050606084015160808401528091505092915050565b5f60208284031215612e4c575f80fd5b5035919050565b5f8060408385031215612e64575f80fd5b82359150612e7460208401612cfc565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f6020808385031215612ea2575f80fd5b823567ffffffffffffffff80821115612eb9575f80fd5b818501915085601f830112612ecc575f80fd5b813581811115612ede57612ede612e7d565b8060051b604051601f19603f83011681018181108582111715612f0357612f03612e7d565b604052918252848201925083810185019188831115612f20575f80fd5b938501935b8285101561089157612f3685612cfc565b84529385019392850192612f25565b5f805f8060808587031215612f58575f80fd5b84359350612f6860208601612cfc565b9250612f7660408601612cfc565b9396929550929360600135925050565b5f60808284031215612954575f80fd5b5f805f60608486031215612fa8575f80fd5b833567ffffffffffffffff811115612fbe575f80fd5b612fca86828701612f86565b935050612fd960208501612cfc565b9150604084013590509250925092565b5f60208284031215612ff9575f80fd5b612abd82612cfc565b803560ff81168114612d12575f80fd5b5f805f805f805f60e0888a031215613028575f80fd5b873567ffffffffffffffff81111561303e575f80fd5b61304a8a828b01612f86565b97505061305960208901612cfc565b9550604088013594506060880135935061307560808901613002565b925060a0880135915060c0880135905092959891949750929550565b5f805f80608085870312156130a4575f80fd5b843593506130b460208601612cfc565b92506130c260408601612cfc565b91506130d060608601613002565b905092959194509250565b5f80604083850312156130ec575f80fd5b6130f583612cfc565b946020939093013593505050565b5f805f805f60808688031215613117575f80fd5b8535945061312760208701612cfc565b935061313560408701612cfc565b9250606086013567ffffffffffffffff80821115613151575f80fd5b818801915088601f830112613164575f80fd5b813581811115613172575f80fd5b8960208260051b8501011115613186575f80fd5b9699959850939650602001949392505050565b5f5b838110156131b357818101518382015260200161319b565b50505f910152565b602081525f82518060208401526131d9816040850160208701613199565b601f01601f19169190910160400192915050565b5f805f606084860312156131ff575f80fd5b8335925061320f60208501612cfc565b915061321d60408501612cfc565b90509250925092565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201526734b73a30b4b732b960c11b606082015260800190565b602080825282518282018190525f9190848201906040850190845b818110156132ae5783516001600160a01b031683529284019291840191600101613289565b50909695505050505050565b60208082526023908201527f417065526f757465723a20496e73756666696369656e7420666565207061796d604082015262195b9d60ea1b606082015260800190565b6020808252601e908201527f417065526f757465723a20466565207472616e73666572206661696c65640000604082015260600190565b5f808335601e19843603018112613349575f80fd5b83018035915067ffffffffffffffff821115613363575f80fd5b6020019150600581901b360382131561337a575f80fd5b9250929050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561079457610794613381565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b5f6020828403121561340d575f80fd5b5051919050565b5f60208284031215613424575f80fd5b612abd82613002565b5f60ff821660ff810361344257613442613381565b60010192915050565b808202811582820484141761079457610794613381565b5f8261347c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f6001820161349257613492613381565b5060010190565b8082018082111561079457610794613381565b5f83516134bd818460208801613199565b8351908301906134d1818360208801613199565b01949350505050565b5f82516134eb818460208701613199565b9190910192915050565b5f60208284031215613505575f80fd5b81518015158114612abd575f80fdfe339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95a2646970667358221220ed692369f07105423c6654f1355c3e4fca45eac8a94d5294aa8ab1072f8a5d0264736f6c63430008140033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000dd0de6f63fb1f6ce7983f78457a61eb59defb78700000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5570000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000052117f1b96f661fd1059b3d2a2e8041f3a77b62b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557

-----Decoded View---------------
Arg [0] : _adapters (address[]): 0x52117F1B96f661Fd1059b3d2a2e8041f3A77B62b
Arg [1] : _trustedTokens (address[]): 0x48b62137EdfA95a428D35C09E44256a739F6B557
Arg [2] : _feeClaimer (address): 0xdd0dE6F63fB1F6CE7983f78457a61Eb59DeFB787
Arg [3] : _wrapped_native (address): 0x48b62137EdfA95a428D35C09E44256a739F6B557
Arg [4] : _fee (uint256): 10000

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 000000000000000000000000dd0de6f63fb1f6ce7983f78457a61eb59defb787
Arg [3] : 00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557
Arg [4] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 00000000000000000000000052117f1b96f661fd1059b3d2a2e8041f3a77b62b
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.