ETH Price: $2,636.09 (+7.90%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x61012060130498642021-08-18 14:49:251175 days ago1629298165IN
 Create: Adapter01
0 ETH0.2185322550

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Adapter01

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 1 : Adapter01.sol
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol



pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

// File: @uniswap/lib/contracts/libraries/TransferHelper.sol

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

// File: original_contracts/lib/uniswapv2/IUniswapV2Pair.sol

pragma solidity 0.7.5;

interface IUniswapV2Pair {

    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function swap(
        uint amount0Out,
        uint amount1Out,
        address to,
        bytes calldata data
    )
        external;
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol



pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: original_contracts/lib/uniswapv2/NewUniswapV2Lib.sol

pragma solidity 0.7.5;




library NewUniswapV2Lib {
    using SafeMath for uint256;

    function getReservesByPair(
        address pair,
        bool direction
    )
        internal
        view
        returns (uint256 reserveIn, uint256 reserveOut)
    {
        (uint256 reserve0, uint256 reserve1,) = IUniswapV2Pair(pair).getReserves();
        (reserveIn, reserveOut) = direction ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    function getAmountOut(
        uint256 amountIn,
        address pair,
        bool direction,
        uint256 fee
    )
        internal
        view
        returns (uint256 amountOut)
    {
        require(amountIn > 0, "UniswapV2Lib: INSUFFICIENT_INPUT_AMOUNT");
        (uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction);
        uint256 amountInWithFee = amountIn.mul(fee);
        uint256 numerator = amountInWithFee.mul(reserveOut);
        uint256 denominator = reserveIn.mul(10000).add(amountInWithFee);
        amountOut = uint256(numerator / denominator);
    }

    function getAmountIn(
        uint256 amountOut,
        address pair,
        bool direction,
        uint256 fee
    )
        internal
        view
        returns (uint256 amountIn)
    {
        require(amountOut > 0, "UniswapV2Lib: INSUFFICIENT_OUTPUT_AMOUNT");
        (uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction);
        require(reserveOut > amountOut, "UniswapV2Lib: reserveOut should be greater than amountOut");
        uint256 numerator = reserveIn.mul(amountOut).mul(10000);
        uint256 denominator = reserveOut.sub(amountOut).mul(fee);
        amountIn = (numerator / denominator).add(1);
    }
}

// File: openzeppelin-solidity/contracts/utils/Address.sol



pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol



pragma solidity >=0.6.0 <0.8.0;




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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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));
    }

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

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

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

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

// File: original_contracts/ITokenTransferProxy.sol

pragma solidity 0.7.5;


interface ITokenTransferProxy {

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

// File: original_contracts/lib/Utils.sol

pragma solidity 0.7.5;
pragma experimental ABIEncoderV2;





interface IERC20Permit {
    function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
}

library Utils {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    address constant ETH_ADDRESS = address(
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
    );
    
    uint256 constant MAX_UINT = type(uint256).max;

    /**
   * @param fromToken Address of the source token
   * @param fromAmount Amount of source tokens to be swapped
   * @param toAmount Minimum destination token amount expected out of this swap
   * @param expectedAmount Expected amount of destination tokens without slippage
   * @param beneficiary Beneficiary address
   * 0 then 100% will be transferred to beneficiary. Pass 10000 for 100%
   * @param path Route to be taken for this swap to take place

   */
    struct SellData {
        address fromToken;
        uint256 fromAmount;
        uint256 toAmount;
        uint256 expectedAmount;
        address payable beneficiary;
        Utils.Path[] path;
        address payable partner;
        uint256 feePercent;
        bytes permit;
        uint256 deadline;
        bytes16 uuid;
    }

    struct MegaSwapSellData {
        address fromToken;
        uint256 fromAmount;
        uint256 toAmount;
        uint256 expectedAmount;
        address payable beneficiary;
        Utils.MegaSwapPath[] path;
        address payable partner;
        uint256 feePercent;
        bytes permit;
        uint256 deadline;
        bytes16 uuid;
    }

    struct SimpleData {
        address fromToken;
        address toToken;
        uint256 fromAmount;
        uint256 toAmount;
        uint256 expectedAmount;
        address[] callees;
        bytes exchangeData;
        uint256[] startIndexes;
        uint256[] values;
        address payable beneficiary;
        address payable partner;
        uint256 feePercent;
        bytes permit;
        uint256 deadline;
        bytes16 uuid;
    }

    struct Adapter {
        address payable adapter;
        uint256 percent;
        uint256 networkFee;
        Route[] route;
    }

    struct Route {
        uint256 index;//Adapter at which index needs to be used
        address targetExchange;
        uint percent;
        bytes payload;
        uint256 networkFee;//Network fee is associated with 0xv3 trades
    }

    struct MegaSwapPath {
        uint256 fromAmountPercent;
        Path[] path;
    }

    struct Path {
        address to;
        uint256 totalNetworkFee;//Network fee is associated with 0xv3 trades
        Adapter[] adapters;
    }

    function ethAddress() internal pure returns (address) {return ETH_ADDRESS;}

    function maxUint() internal pure returns (uint256) {return MAX_UINT;}

    function approve(
        address addressToApprove,
        address token,
        uint256 amount
    ) internal {
        if (token != ETH_ADDRESS) {
            IERC20 _token = IERC20(token);

            uint allowance = _token.allowance(address(this), addressToApprove);

            if (allowance < amount) {
                _token.safeApprove(addressToApprove, 0);
                _token.safeIncreaseAllowance(addressToApprove, MAX_UINT);
            }
        }
    }

    function transferTokens(
        address token,
        address payable destination,
        uint256 amount
    )
    internal
    {
        if (amount > 0) {
            if (token == ETH_ADDRESS) {
                (bool result, ) = destination.call{value: amount, gas: 10000}("");
                require(result, "Failed to transfer Ether");
            }
            else {
                IERC20(token).safeTransfer(destination, amount);
            }
        }

    }

    function tokenBalance(
        address token,
        address account
    )
    internal
    view
    returns (uint256)
    {
        if (token == ETH_ADDRESS) {
            return account.balance;
        } else {
            return IERC20(token).balanceOf(account);
        }
    }

    function permit(
        address token,
        bytes memory permit
    )
        internal
    {
        if (permit.length == 32 * 7) {
            (bool success,) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit));
            require(success, "Permit failed");
        }
    }

}

// File: original_contracts/lib/weth/IWETH.sol

pragma solidity 0.7.5;



abstract contract IWETH is IERC20 {
    function deposit() external virtual payable;
    function withdraw(uint256 amount) external virtual;
}

// File: original_contracts/lib/uniswapv2/NewUniswapV2.sol

pragma solidity 0.7.5;







abstract contract NewUniswapV2 {
    using SafeMath for uint256;

    // Pool bits are 255-161: fee, 160: direction flag, 159-0: address
    uint256 constant FEE_OFFSET = 161;
    uint256 constant DIRECTION_FLAG =
        0x0000000000000000000000010000000000000000000000000000000000000000;

    struct UniswapV2Data {
        address weth;
        uint256[] pools;
    }

    function swapOnUniswapV2Fork(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        bytes calldata payload
    )
        internal
    {
        UniswapV2Data memory data = abi.decode(payload, (UniswapV2Data));
        _swapOnUniswapV2Fork(
            address(fromToken),
            fromAmount,
            data.weth,
            data.pools
        );
    }

    function _swapOnUniswapV2Fork(
        address tokenIn,
        uint256 amountIn,
        address weth,
        uint256[] memory pools
    )
        private
        returns (uint256 tokensBought)
    {
        uint256 pairs = pools.length;

        require(pairs != 0, "At least one pool required");

        bool tokensBoughtEth;

        if (tokenIn == Utils.ethAddress()) {
            IWETH(weth).deposit{value: amountIn}();
            require(IWETH(weth).transfer(address(pools[0]), amountIn));
        } else {
            TransferHelper.safeTransfer(tokenIn, address(pools[0]), amountIn);
            tokensBoughtEth = weth != address(0);
        }

        tokensBought = amountIn;

        for (uint256 i = 0; i < pairs; ++i) {
            uint256 p = pools[i];
            address pool = address(p);
            bool direction = p & DIRECTION_FLAG == 0;

            tokensBought = NewUniswapV2Lib.getAmountOut(
                tokensBought, pool, direction, p >> FEE_OFFSET
            );
            (uint256 amount0Out, uint256 amount1Out) = direction
                ? (uint256(0), tokensBought) : (tokensBought, uint256(0));
            IUniswapV2Pair(pool).swap(
                amount0Out,
                amount1Out,
                i + 1 == pairs ? address(this) : address(pools[i + 1]),
                ""
            );
        }

        if (tokensBoughtEth) {
            IWETH(weth).withdraw(tokensBought);
        }
    }
}

// File: original_contracts/lib/zeroxv4/LibOrderV4.sol

/* solium-disable */

pragma solidity 0.7.5;



library LibOrderV4 {
    struct Order {
        IERC20 makerToken;
        IERC20 takerToken;
        uint128 makerAmount;
        uint128 takerAmount;
        address maker;
        address taker;
        address txOrigin;
        bytes32 pool;
        uint64 expiry;
        uint256 salt;
    }

    enum SignatureType {
        ILLEGAL,
        INVALID,
        EIP712,
        ETHSIGN
    }

    struct Signature {
        // How to validate the signature.
        SignatureType signatureType;
        // EC Signature data.
        uint8 v;
        // EC Signature data.
        bytes32 r;
        // EC Signature data.
        bytes32 s;
    }
}

// File: original_contracts/lib/WethProvider.sol

pragma solidity 0.7.5;


contract WethProvider {
    address public immutable WETH;

    constructor(address weth) public {
        WETH = weth;
    }
}

// File: original_contracts/lib/zeroxv4/ZeroxV4.sol

pragma solidity 0.7.5;






interface IZeroxV4 {

    function fillRfqOrder(
        // The order
        LibOrderV4.Order calldata order,
        // The signature
        LibOrderV4.Signature calldata signature,
        // How much taker token to fill the order with
        uint128 takerTokenFillAmount
    )
        external
        payable
        // How much maker token from the order the taker received.
        returns (uint128, uint128);
}

abstract contract ZeroxV4 is WethProvider {

    struct ZeroxV4Data {
        LibOrderV4.Order order;
        LibOrderV4.Signature signature;
    }

    function swapOnZeroXv4(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
        internal
    {
        if (address(fromToken) == Utils.ethAddress()) {
            IWETH(WETH).deposit{value: fromAmount}();
        }

        _swapOn0xV4(
            fromToken,
            toToken,
            fromAmount,
            exchange,
            payload
        );
    }

    function buyOnZeroXv4(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
        internal
    {
        if (address(fromToken) == Utils.ethAddress()) {
            IWETH(WETH).deposit{value: fromAmount}();
        }

        _swapOn0xV4(
            fromToken,
            toToken,
            fromAmount,
            exchange,
            payload
        );

        if (address(fromToken) == Utils.ethAddress()) {
            uint256 remainingAmount = Utils.tokenBalance(WETH, address(this));
            if (remainingAmount > 0) {
              IWETH(WETH).withdraw(remainingAmount);
            }
        }
    }

    function _swapOn0xV4(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes memory payload) private {

        ZeroxV4Data memory data = abi.decode(payload, (ZeroxV4Data));

        address _fromToken = address(fromToken);
        address _toToken = address(toToken);
        require(_fromToken != _toToken, "fromToken should be different from toToken");

        if (address(fromToken) == Utils.ethAddress()) {
            _fromToken = WETH;
        }
        else if (address(toToken) == Utils.ethAddress()) {
            _toToken = WETH;
        }

        require(address(data.order.takerToken) == address(_fromToken), "Invalid from token!!");
        require(address(data.order.makerToken) == address(_toToken), "Invalid to token!!");

        Utils.approve(exchange, address(_fromToken), fromAmount);

        IZeroxV4(exchange).fillRfqOrder(
            data.order,
            data.signature,
            uint128(fromAmount)
        );

        if (address(toToken) == Utils.ethAddress()) {
            uint256 receivedAmount = Utils.tokenBalance(WETH, address(this));
            IWETH(WETH).withdraw(receivedAmount);
        }
    }
}

// File: original_contracts/lib/zeroxv2/LibOrderV2.sol

/* solium-disable */

pragma solidity 0.7.5;

//Taken from 0x exchange
library LibOrderV2{


    struct Order {
        address makerAddress;           // Address that created the order.
        address takerAddress;           // Address that is allowed to fill the order. If set to 0, any address is allowed to fill the order.
        address feeRecipientAddress;    // Address that will recieve fees when order is filled.
        address senderAddress;          // Address that is allowed to call Exchange contract methods that affect this order. If set to 0, any address is allowed to call these methods.
        uint256 makerAssetAmount;       // Amount of makerAsset being offered by maker. Must be greater than 0.
        uint256 takerAssetAmount;       // Amount of takerAsset being bid on by maker. Must be greater than 0.
        uint256 makerFee;               // Amount of ZRX paid to feeRecipient by maker when order is filled. If set to 0, no transfer of ZRX from maker to feeRecipient will be attempted.
        uint256 takerFee;               // Amount of ZRX paid to feeRecipient by taker when order is filled. If set to 0, no transfer of ZRX from taker to feeRecipient will be attempted.
        uint256 expirationTimeSeconds;  // Timestamp in seconds at which order expires.
        uint256 salt;                   // Arbitrary number to facilitate uniqueness of the order's hash.
        bytes makerAssetData;           // Encoded data that can be decoded by a specified proxy contract when transferring makerAsset. The last byte references the id of this proxy.
        bytes takerAssetData;           // Encoded data that can be decoded by a specified proxy contract when transferring takerAsset. The last byte references the id of this proxy.
    }

    struct FillResults {
        uint256 makerAssetFilledAmount;  // Total amount of makerAsset(s) filled.
        uint256 takerAssetFilledAmount;  // Total amount of takerAsset(s) filled.
        uint256 makerFeePaid;            // Total amount of ZRX paid by maker(s) to feeRecipient(s).
        uint256 takerFeePaid;            // Total amount of ZRX paid by taker to feeRecipients(s).
    }
}

// File: original_contracts/lib/libraries/LibBytesRichErrors.sol

/*
  Copyright 2019 ZeroEx Intl.
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

pragma solidity 0.7.5;


library LibBytesRichErrors {

    enum InvalidByteOperationErrorCodes {
        FromLessThanOrEqualsToRequired,
        ToLessThanOrEqualsLengthRequired,
        LengthGreaterThanZeroRequired,
        LengthGreaterThanOrEqualsFourRequired,
        LengthGreaterThanOrEqualsTwentyRequired,
        LengthGreaterThanOrEqualsThirtyTwoRequired,
        LengthGreaterThanOrEqualsNestedBytesLengthRequired,
        DestinationLengthGreaterThanOrEqualSourceLengthRequired
    }

    // bytes4(keccak256("InvalidByteOperationError(uint8,uint256,uint256)"))
    bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =
        0x28006595;

    // solhint-disable func-name-mixedcase
    function InvalidByteOperationError(
        InvalidByteOperationErrorCodes errorCode,
        uint256 offset,
        uint256 required
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            INVALID_BYTE_OPERATION_ERROR_SELECTOR,
            errorCode,
            offset,
            required
        );
    }
}

// File: original_contracts/lib/libraries/LibRichErrors.sol

/*
  Copyright 2019 ZeroEx Intl.
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

pragma solidity 0.7.5;


library LibRichErrors {

    // bytes4(keccak256("Error(string)"))
    bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;

    // solhint-disable func-name-mixedcase
    /// @dev ABI encode a standard, string revert error payload.
    ///      This is the same payload that would be included by a `revert(string)`
    ///      solidity statement. It has the function signature `Error(string)`.
    /// @param message The error string.
    /// @return The ABI encoded error.
    function StandardError(
        string memory message
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            STANDARD_ERROR_SELECTOR,
            bytes(message)
        );
    }
    // solhint-enable func-name-mixedcase

    /// @dev Reverts an encoded rich revert reason `errorData`.
    /// @param errorData ABI encoded error data.
    function rrevert(bytes memory errorData)
        internal
        pure
    {
        assembly {
            revert(add(errorData, 0x20), mload(errorData))
        }
    }
}

// File: original_contracts/lib/libraries/LibBytes.sol

/*
  Copyright 2019 ZeroEx Intl.
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

pragma solidity 0.7.5;




library LibBytes {

    using LibBytes for bytes;

    /// @dev Reads an address from a position in a byte array.
    /// @param b Byte array containing an address.
    /// @param index Index in byte array of address.
    /// @return result address from byte array.
    function readAddress(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (address result)
    {
        if (b.length < index + 20) {
            LibRichErrors.rrevert(LibBytesRichErrors.InvalidByteOperationError(
                LibBytesRichErrors.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,
                b.length,
                index + 20 // 20 is length of address
            ));
        }

        // Add offset to index:
        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
        index += 20;

        // Read address from array memory
        assembly {
            // 1. Add index to address of bytes array
            // 2. Load 32-byte word from memory
            // 3. Apply 20-byte mask to obtain address
            result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)
        }
        return result;
    }

}

// File: original_contracts/lib/zeroxv2/ZeroxV2.sol

pragma solidity 0.7.5;








interface IZeroxV2 {

    function marketSellOrdersNoThrow(
        LibOrderV2.Order[] calldata orders,
        uint256 takerAssetFillAmount,
        bytes[] calldata signatures
    )
        external
        returns(LibOrderV2.FillResults memory);
}

abstract contract ZeroxV2 is WethProvider {
    using LibBytes for bytes;

    struct ZeroxV2Data {
        LibOrderV2.Order[] orders;
        bytes[] signatures;
    }

    address public immutable erc20Proxy;

    constructor(address _erc20Proxy) {
        erc20Proxy = _erc20Proxy;
    }

    function swapOnZeroXv2(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
        internal

    {
        address _fromToken = address(fromToken);

        if (address(fromToken) == Utils.ethAddress()) {
            IWETH(WETH).deposit{value: fromAmount}();
        }

        _swapOn0xV2(
            fromToken,
            toToken,
            fromAmount,
            exchange,
            payload
        );

    }

    function buyOnZeroXv2(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
        internal

    {

        address _fromToken = address(fromToken);

        if (address(fromToken) == Utils.ethAddress()) {
            IWETH(WETH).deposit{value: fromAmount}();
            _fromToken = WETH;
        }

        _swapOn0xV2(
            fromToken,
            toToken,
            fromAmount,
            exchange,
            payload
        );

        if (address(fromToken) == Utils.ethAddress()) {
            uint256 remainingAmount = Utils.tokenBalance(address(_fromToken), address(this));
            if (remainingAmount > 0) {
              IWETH(WETH).withdraw(remainingAmount);
            }
        }
    }

    function _swapOn0xV2(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes memory payload
    )
        private
    {

        address _fromToken = address(fromToken);
        address _toToken = address(toToken);
        require(_fromToken != _toToken, "fromToken should be different from toToken");

        if (_fromToken == Utils.ethAddress()) {
            _fromToken = WETH;
        }

        else if (_toToken == Utils.ethAddress()) {
            _toToken = WETH;
        }

        ZeroxV2Data memory data = abi.decode(payload, (ZeroxV2Data));

        for (uint256 i = 0; i < data.orders.length; i++) {
            address srcToken = data.orders[i].takerAssetData.readAddress(16);
            require(srcToken == address(_fromToken), "Invalid from token!!");

            address destToken = data.orders[i].makerAssetData.readAddress(16);
            require(destToken == address(_toToken), "Invalid to token!!");
        }

        Utils.approve(erc20Proxy, address(_fromToken), fromAmount);

        IZeroxV2(exchange).marketSellOrdersNoThrow(
            data.orders,
            fromAmount,
            data.signatures
        );

        if (address(toToken) == Utils.ethAddress()) {
            uint256 receivedAmount = Utils.tokenBalance(WETH, address(this));
            IWETH(WETH).withdraw(receivedAmount);
        }
    }
}

// File: original_contracts/lib/curve/ICurve.sol

pragma solidity 0.7.5;


interface IPool {
  function underlying_coins(int128 index) external view returns (address);

  function coins(int128 index) external view returns (address);
}

interface IPoolV3 {
    function underlying_coins(uint256 index) external view returns(address);

    function coins(uint256 index) external view returns(address);
}

interface ICurvePool {
  function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 minDy) external;

  function exchange(int128 i, int128 j, uint256 dx, uint256 minDy) external;

}

interface ICurveEthPool {

  function exchange(int128 i, int128 j, uint256 dx, uint256 minDy) external payable;
}

interface ICompoundPool {
  function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 minDy, uint256 deadline) external;

  function exchange(int128 i, int128 j, uint256 dx, uint256 minDy, uint256 deadline) external;
}

// File: original_contracts/lib/curve/Curve.sol

pragma solidity 0.7.5;




contract Curve {

  struct CurveData {
    int128 i;
    int128 j;
    uint256 deadline;
    bool underlyingSwap;
  }

  function swapOnCurve(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    address exchange,
    bytes calldata payload
  )
    internal

  {

    CurveData memory curveData = abi.decode(payload, (CurveData));

    Utils.approve(address(exchange), address(fromToken), fromAmount);

    if (curveData.underlyingSwap) {
      ICurvePool(exchange).exchange_underlying(curveData.i, curveData.j, fromAmount, 1);

    }
    else {
      if (address(fromToken) == Utils.ethAddress()) {
        ICurveEthPool(exchange).exchange{value: fromAmount}(curveData.i, curveData.j, fromAmount, 1);
      }
      else {
        ICurvePool(exchange).exchange(curveData.i, curveData.j, fromAmount, 1);
      }

    }
  }
}

// File: original_contracts/lib/balancer/IBalancerPool.sol

pragma solidity 0.7.5;


interface IBalancerPool {
    function swapExactAmountIn(
        address tokenIn,
        uint tokenAmountIn,
        address tokenOut,
        uint minAmountOut,
        uint maxPrice
    )
        external
        returns (
            uint tokenAmountOut,
            uint spotPriceAfter
        );


    function swapExactAmountOut(
        address tokenIn,
        uint maxAmountIn,
        address tokenOut,
        uint tokenAmountOut,
        uint maxPrice
    )
        external
        returns (
            uint tokenAmountIn,
            uint spotPriceAfter
        );
}

// File: original_contracts/lib/balancer/Balancer.sol

pragma solidity 0.7.5;






interface IBalancerProxy {

  struct Swap {
        address pool;
        uint tokenInParam; // tokenInAmount / maxAmountIn / limitAmountIn
        uint tokenOutParam; // minAmountOut / tokenAmountOut / limitAmountOut
        uint maxPrice;
    }

    function batchSwapExactIn(
        Swap[] calldata swaps,
        address tokenIn,
        address tokenOut,
        uint totalAmountIn,
        uint minTotalAmountOut
    )
        external
        returns (uint totalAmountOut);

    function batchSwapExactOut(
        Swap[] calldata swaps,
        address tokenIn,
        address tokenOut,
        uint maxTotalAmountIn
    )
        external
        returns (uint totalAmountIn);

    function batchEthInSwapExactIn(
        Swap[] calldata swaps,
        address tokenOut,
        uint minTotalAmountOut
    )
        external
        payable
        returns (uint totalAmountOut);

    function batchEthOutSwapExactIn(
        Swap[] calldata swaps,
        address tokenIn,
        uint totalAmountIn,
        uint minTotalAmountOut
    )
        external
        returns (uint totalAmountOut);

    function batchEthInSwapExactOut(
        Swap[] calldata swaps,
        address tokenOut
    )
        external
        payable
        returns (uint totalAmountIn);

    function batchEthOutSwapExactOut(
        Swap[] calldata swaps,
        address tokenIn,
        uint maxTotalAmountIn
    )
        external
        returns (uint totalAmountIn);
}

abstract contract Balancer is WethProvider {
    using SafeMath for uint256;

    struct BalancerData {
        IBalancerProxy.Swap[] swaps;
    }

    function swapOnBalancer(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchangeProxy,
        bytes calldata payload
    )
        internal
    {
        BalancerData memory data = abi.decode(payload, (BalancerData));

        address _fromToken = address(fromToken) == Utils.ethAddress()
            ? WETH : address(fromToken);
        address _toToken = address(toToken) == Utils.ethAddress()
            ? WETH : address(toToken);

        if (address(fromToken) == Utils.ethAddress()) {
             IWETH(WETH).deposit{value: fromAmount}();
        }

        uint256 totalInParam;
        for (uint i = 0; i < data.swaps.length; ++i) {
            totalInParam = totalInParam.add(data.swaps[i].tokenInParam);
        }

        for (uint i = 0; i < data.swaps.length; ++i) {
            IBalancerProxy.Swap memory _swap = data.swaps[i];
            uint256 adjustedInParam =
                _swap.tokenInParam.mul(fromAmount).div(totalInParam);
            Utils.approve(
                _swap.pool,
                _fromToken,
                adjustedInParam
            );
            IBalancerPool(_swap.pool).swapExactAmountIn(
                _fromToken,
                adjustedInParam,
                _toToken,
                _swap.tokenOutParam,
                _swap.maxPrice
            );
        }

        if (address(toToken) == Utils.ethAddress()) {
            IWETH(WETH).withdraw(
                IERC20(WETH).balanceOf(address(this))
            );
        }
    }

    function buyOnBalancer(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchangeProxy,
        bytes calldata payload
    )
        internal
    {
        BalancerData memory data = abi.decode(payload, (BalancerData));

        address _fromToken = address(fromToken) == Utils.ethAddress()
            ? WETH : address(fromToken);
        address _toToken = address(toToken) == Utils.ethAddress()
            ? WETH : address(toToken);

        if (address(fromToken) == Utils.ethAddress()) {
             IWETH(WETH).deposit{value: fromAmount}();
        }

        uint256 totalInParam;
        for (uint i = 0; i < data.swaps.length; ++i) {
            totalInParam = totalInParam.add(data.swaps[i].tokenInParam);
        }

        for (uint i = 0; i < data.swaps.length; ++i) {
            IBalancerProxy.Swap memory _swap = data.swaps[i];
            uint256 adjustedInParam =
                _swap.tokenInParam.mul(fromAmount).div(totalInParam);
            Utils.approve(
                _swap.pool,
                _fromToken,
                adjustedInParam
            );
            IBalancerPool(_swap.pool).swapExactAmountOut(
                _fromToken,
                adjustedInParam,
                _toToken,
                _swap.tokenOutParam,
                _swap.maxPrice
            );
        }

        if (
            address(fromToken) == Utils.ethAddress() ||
            address(toToken) == Utils.ethAddress()
        ) {
            IWETH(WETH).withdraw(
                IERC20(WETH).balanceOf(address(this))
            );
        }
    }

}

// File: original_contracts/lib/uniswapv3/ISwapRouterUniV3.sol

pragma solidity 0.7.5;


interface ISwapRouterUniV3 {

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

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

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

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

}

// File: original_contracts/lib/uniswapv3/UniswapV3.sol

pragma solidity 0.7.5;





abstract contract UniswapV3 is WethProvider{

  struct UniswapV3Data {
    uint24 fee;
    uint256 deadline;
    uint160 sqrtPriceLimitX96;
  }

  function swapOnUniswapV3(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    address exchange,
    bytes calldata payload
  )
    internal
  {

    UniswapV3Data memory data = abi.decode(payload, (UniswapV3Data));

    address _fromToken = address(fromToken) == Utils.ethAddress()
    ? WETH : address(fromToken);
    address _toToken = address(toToken) == Utils.ethAddress()
    ? WETH : address(toToken);

    if (address(fromToken) == Utils.ethAddress()) {
      IWETH(WETH).deposit{value : fromAmount}();
    }

    Utils.approve(address(exchange), _fromToken, fromAmount);

    ISwapRouterUniV3(exchange).exactInputSingle(ISwapRouterUniV3.ExactInputSingleParams(
      {
      tokenIn : _fromToken,
      tokenOut : _toToken,
      fee : data.fee,
      recipient : address(this),
      deadline : data.deadline,
      amountIn : fromAmount,
      amountOutMinimum : 1,
      sqrtPriceLimitX96 : data.sqrtPriceLimitX96
      }
      )
    );

    if (address(toToken) == Utils.ethAddress()) {
      IWETH(WETH).withdraw(
        IERC20(WETH).balanceOf(address(this))
      );
    }

  }


  function buyOnUniSwapV3(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    uint256 toAmount,
    address exchange,
    bytes calldata payload
  )
    internal
  {

    UniswapV3Data memory data = abi.decode(payload, (UniswapV3Data));

    address _fromToken = address(fromToken) == Utils.ethAddress()
    ? WETH : address(fromToken);
    address _toToken = address(toToken) == Utils.ethAddress()
    ? WETH : address(toToken);

    if (address(fromToken) == Utils.ethAddress()) {
      IWETH(WETH).deposit{value : fromAmount}();
    }

    Utils.approve(address(exchange), _fromToken, fromAmount);

    ISwapRouterUniV3(exchange).exactOutputSingle(ISwapRouterUniV3.ExactOutputSingleParams(
      {
      tokenIn : _fromToken,
      tokenOut : _toToken,
      fee : data.fee,
      recipient : address(this),
      deadline : data.deadline,
      amountOut : toAmount,
      amountInMaximum : fromAmount,
      sqrtPriceLimitX96 : data.sqrtPriceLimitX96
      }
      )
    );

    if (
      address(fromToken) == Utils.ethAddress() ||
      address(toToken) == Utils.ethAddress()
    ) {
      IWETH(WETH).withdraw(
        IERC20(WETH).balanceOf(address(this))
      );
    }

  }
}

// File: original_contracts/AugustusStorage.sol

pragma solidity 0.7.5;


contract AugustusStorage {

    struct FeeStructure {
        uint256 partnerShare;
        bool noPositiveSlippage;
        bool positiveSlippageToUser;
        uint16 feePercent;
        string partnerId;
        bytes data;
    }

    ITokenTransferProxy internal tokenTransferProxy;
    address payable internal feeWallet;
    
    mapping(address => FeeStructure) internal registeredPartners;

    mapping (bytes4 => address) internal selectorVsRouter;
    mapping (bytes32 => bool) internal adapterInitialized;
    mapping (bytes32 => bytes) internal adapterVsData;

    mapping (bytes32 => bytes) internal routerData;
    mapping (bytes32 => bool) internal routerInitialized;


    bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE");

    bytes32 public constant ROUTER_ROLE = keccak256("ROUTER_ROLE");

}

// File: original_contracts/lib/aavee2/Aavee2.sol

pragma solidity 0.7.5;





interface IWETHGateway {
  function depositETH(
    address lendingPool,
    address onBehalfOf,
    uint16 referralCode
  ) external payable;

  function withdrawETH(
    address lendingPool,
    uint256 amount,
    address onBehalfOf
  ) external;

}


interface IAaveLendingPool {
  function deposit(
    IERC20 asset,
    uint256 amount,
    address onBehalfOf,
    uint16 referralCode
  ) external;

  function withdraw(
    IERC20 asset,
    uint256 amount,
    address to
  ) external returns (uint256);
}

contract Aavee2 {

  struct AaveeData {
    address aToken;
  }

  uint16 public immutable refCode;
  address public immutable  lendingPool;
  address public immutable  wethGateway;

  constructor (
    uint16 _refCode,
    address _lendingPool,
    address _wethGateway
  )
    public
  {
    refCode = _refCode;
    lendingPool = _lendingPool;
    wethGateway = _wethGateway;
  }

  function swapOnAaveeV2(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    bytes calldata payload
  )
    internal
  {
    _swapOnAaveeV2(
      fromToken,
      toToken,
      fromAmount,
      payload
    );
  }

  function buyOnAaveeV2(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    bytes calldata payload
  )
    internal
  {
    _swapOnAaveeV2(
      fromToken,
      toToken,
      fromAmount,
      payload
    );
  }

  function _swapOnAaveeV2(
    IERC20 fromToken,
    IERC20 toToken,
    uint256 fromAmount,
    bytes memory payload
  )
    private
  {
    AaveeData memory data = abi.decode(payload, (AaveeData));

    if (address(fromToken) == address(data.aToken)) {
      if (address(toToken) == Utils.ethAddress()) {
        Utils.approve(wethGateway, address(fromToken), fromAmount);
        IWETHGateway(wethGateway).withdrawETH(lendingPool, fromAmount, address(this));
      }
      else {
        Utils.approve(lendingPool, address(fromToken), fromAmount);
        IAaveLendingPool(lendingPool).withdraw(toToken, fromAmount, address(this));
      }
    }
    else if (address(toToken) == address(data.aToken)) {
      if (address(fromToken) == Utils.ethAddress()) {
        IWETHGateway(wethGateway).depositETH{value : fromAmount}(lendingPool, address(this), refCode);
      }
      else {
        Utils.approve(lendingPool, address(fromToken), fromAmount);
        IAaveLendingPool(lendingPool).deposit(fromToken, fromAmount, address(this), refCode);
      }
    }
    else {
      revert("Invalid aToken");
    }
  }
}

// File: original_contracts/lib/oneinchlp/IOneInchPool.sol

pragma solidity 0.7.5;


interface IOneInchPool {
    function swap(
        IERC20 src,
        IERC20 dst,
        uint256 amount,
        uint256 minReturn,
        address referral
    ) external payable returns(uint256 result);
}

// File: original_contracts/lib/oneinchlp/OneInchPool.sol

pragma solidity 0.7.5;




contract OneInchPool {

    function swapOnOneInch(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange
    )
        internal
    {

        address _fromToken = address(fromToken) == Utils.ethAddress()
        ? address(0) : address(fromToken);
        address _toToken = address(toToken) == Utils.ethAddress()
        ? address(0) : address(toToken);

        if (address(fromToken) != Utils.ethAddress()) {
            Utils.approve(address(exchange), _fromToken, fromAmount);
        }

        IOneInchPool(exchange).swap{
            value: address(fromToken) == Utils.ethAddress() ? fromAmount : 0
        }(
            IERC20(_fromToken),
            IERC20(_toToken),
            fromAmount,
            1,
            address(0)
        );
    }

}

// File: original_contracts/lib/mstable/IMStable.sol

pragma solidity 0.7.5;

interface IMStable {
    function mint(
        address _input,
        uint256 _inputQuantity,
        uint256 _minOutputQuantity,
        address _recipient
    ) external virtual returns (uint256 mintOutput);

    function swap(
        address _input,
        address _output,
        uint256 _inputQuantity,
        uint256 _minOutputQuantity,
        address _recipient
    ) external virtual returns (uint256 swapOutput);

    function redeem(
        address _output,
        uint256 _mAssetQuantity,
        uint256 _minOutputQuantity,
        address _recipient
    ) external virtual returns (uint256 outputQuantity);
}

// File: original_contracts/lib/mstable/MStable.sol

pragma solidity 0.7.5;






contract MStable {
    enum OpType {
        swap,
        mint,
        redeem
    }

    struct MStableData {
        uint opType;
    }

    function swapOnMStable(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
    internal

    {

        MStableData memory data = abi.decode(payload, (MStableData));
        Utils.approve(exchange, address(fromToken), fromAmount);

        if (data.opType == uint(OpType.mint)) {
            IMStable(exchange).mint(address(fromToken), fromAmount, 1, address(this));
        } else if (data.opType == uint(OpType.redeem)) {
            IMStable(exchange).redeem(address(toToken), fromAmount, 1, address(this));
        } else if (data.opType == uint(OpType.swap)) {
            IMStable(exchange).swap(address(fromToken), address(toToken), fromAmount, 1, address(this));
        } else {
            revert("Invalid opType");
        }
    }
}

// File: original_contracts/lib/curve/ICurveV2.sol

pragma solidity 0.7.5;

interface ICurveV2Pool {
    function exchange_underlying(uint256 i, uint256 j, uint256 dx, uint256 minDy) external;
    function exchange(uint256 i, uint256 j, uint256 dx, uint256 minDy) external;
}

// File: original_contracts/lib/curve/CurveV2.sol

pragma solidity 0.7.5;






abstract contract CurveV2 is WethProvider {

    struct CurveV2Data {
        uint256 i;
        uint256 j;
        bool underlyingSwap;
    }

    constructor () {}

    function swapOnCurveV2(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        address exchange,
        bytes calldata payload
    )
    internal

    {

        CurveV2Data memory curveV2Data = abi.decode(payload, (CurveV2Data));

        address _fromToken = address(fromToken);

        if (address(fromToken) == Utils.ethAddress()) {
            IWETH(WETH).deposit{value: fromAmount}();
            _fromToken = WETH;
        }

        Utils.approve(address(exchange), address(_fromToken), fromAmount);
        if (curveV2Data.underlyingSwap) {
            ICurveV2Pool(exchange).exchange_underlying(curveV2Data.i, curveV2Data.j, fromAmount, 1);
        }
        else {
            ICurveV2Pool(exchange).exchange(curveV2Data.i, curveV2Data.j, fromAmount, 1);
        }

        if (address(toToken) == Utils.ethAddress()) {
            uint256 receivedAmount = Utils.tokenBalance(WETH, address(this));
            IWETH(WETH).withdraw(receivedAmount);
        }
    }
}

// File: original_contracts/adapters/IAdapter.sol

pragma solidity 0.7.5;



interface IAdapter {

    /**
    * @dev Certain adapters needs to be initialized.
    * This method will be called from Augustus
    */
    function initialize(bytes calldata data) external;

    /**
   * @dev The function which performs the swap on an exchange.
   * @param fromToken Address of the source token
   * @param toToken Address of the destination token
   * @param fromAmount Amount of source tokens to be swapped
   * @param networkFee Network fee to be used in this router
   * @param route Route to be followed
   */
    function swap(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        uint256 networkFee,
        Utils.Route[] calldata route
    )
        external
        payable;
}

// File: original_contracts/adapters/mainnet/Adapter01.sol

pragma solidity 0.7.5;












/**
* @dev This contract will route call to:
* 1- 0xV4
* 2- 0xV2
* 3- Curve
* 4- UniswapV2Forks
* 5- Balancer
* 6- UniswapV3
* 7- Aavee2
* 8- OneInchPool
* 9- MStable
* 10- CurveV2
* The above are the indexes
*/
contract Adapter01 is IAdapter, NewUniswapV2, ZeroxV4, ZeroxV2, Curve, Balancer, UniswapV3, Aavee2, OneInchPool, MStable, CurveV2 {
    using SafeMath for uint256;

    constructor(
        address _erc20Proxy,
        uint16 _aaveeRefCode,
        address _aaveeLendingPool,
        address _aaveeWethGateway,
        address _weth
    )
        WethProvider(_weth)
        Aavee2(_aaveeRefCode, _aaveeLendingPool, _aaveeWethGateway)
        ZeroxV2(_erc20Proxy)
        public
    {
    }

    function initialize(bytes calldata data) override external {
        revert("METHOD NOT IMPLEMENTED");
    }

    function swap(
        IERC20 fromToken,
        IERC20 toToken,
        uint256 fromAmount,
        uint256 networkFee,
        Utils.Route[] calldata route
    )
        external
        override
        payable
    {
        for (uint256 i = 0; i < route.length; i++) {
            if (route[i].index == 1) {
                //swap on 0xV4
                swapOnZeroXv4(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 2) {
                //swap on 0xV2
                swapOnZeroXv2(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 3) {
                //swap on curve
                swapOnCurve(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 4) {
                //swap on uniswapV2Fork
                swapOnUniswapV2Fork(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].payload
                );
            }
            else if (route[i].index == 5) {
                //swap on balancer
                swapOnBalancer(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 6) {
                //swap on uniswapv3
                swapOnUniswapV3(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 7) {
                //swap on aavee2
                swapOnAaveeV2(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].payload
                );
            }
            else if (route[i].index == 8) {
                //swap on oneinch
                swapOnOneInch(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange
                );
            }
            else if (route[i].index == 9) {
                //swap on Mstable
                swapOnMStable(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else if (route[i].index == 10) {
                //swap on CurveV2
                swapOnCurveV2(
                    fromToken,
                    toToken,
                    fromAmount.mul(route[i].percent).div(10000),
                    route[i].targetExchange,
                    route[i].payload
                );
            }
            else {
                revert("Index not supported");
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_erc20Proxy","type":"address"},{"internalType":"uint16","name":"_aaveeRefCode","type":"uint16"},{"internalType":"address","name":"_aaveeLendingPool","type":"address"},{"internalType":"address","name":"_aaveeWethGateway","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20Proxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lendingPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refCode","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"uint256","name":"networkFee","type":"uint256"},{"components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"targetExchange","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint256","name":"networkFee","type":"uint256"}],"internalType":"struct Utils.Route[]","name":"route","type":"tuple[]"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"wethGateway","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101206040523480156200001257600080fd5b506040516200506738038062005067833981016040819052620000359162000096565b606090811b6001600160601b031990811660805294811b851660a05260f09390931b6001600160f01b03191660c05290821b831660e052901b16610100526200010c565b80516001600160a01b03811681146200009157600080fd5b919050565b600080600080600060a08688031215620000ae578081fd5b620000b98662000079565b9450602086015161ffff81168114620000d0578182fd5b9350620000e06040870162000079565b9250620000f06060870162000079565b9150620001006080870162000079565b90509295509295909350565b60805160601c60a05160601c60c05160f01c60e05160601c6101005160601c614e76620001f160003980610203528061289852806128fb5280612b1f5250806101bb5280612928528061299052806129f35280612b4e5280612bd65280612c395250806101735280612b725280612c6c52508061019752806122305250806101df52806109375280610a405280610dae5280610e145280610e7352806110d25280611214528061127a52806112d952806114cd52806119ce5280611a4f5280611bea5280611c4f5280611da95280611e0d528061203f52806120a35250614e766000f3fe6080604052600436106100705760003560e01c8063a59a99731161004e578063a59a9973146100e4578063ad5c4648146100f9578063c5e10eef1461010e578063e76b146c1461012357610070565b8063439fab9114610075578063635677f2146100975780637f555b03146100c2575b600080fd5b34801561008157600080fd5b5061009561009036600461399e565b610136565b005b3480156100a357600080fd5b506100ac610171565b6040516100b99190614c94565b60405180910390f35b3480156100ce57600080fd5b506100d7610195565b6040516100b99190614393565b3480156100f057600080fd5b506100d76101b9565b34801561010557600080fd5b506100d76101dd565b34801561011a57600080fd5b506100d7610201565b610095610131366004613a0b565b610225565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614922565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b818110156108525782828281811061023c57fe5b905060200281019061024e9190614d6c565b35600114156102f9576102f4878761029461271061028e88888881811061027157fe5b90506020028101906102839190614d6c565b8b906040013561085b565b906108b8565b8686868181106102a057fe5b90506020028101906102b29190614d6c565b6102c3906040810190602001613966565b8787878181106102cf57fe5b90506020028101906102e19190614d6c565b6102ef906060810190614d02565b6108fa565b61084a565b82828281811061030557fe5b90506020028101906103179190614d6c565b356002141561039a576102f4878761033a61271061028e88888881811061027157fe5b86868681811061034657fe5b90506020028101906103589190614d6c565b610369906040810190602001613966565b87878781811061037557fe5b90506020028101906103879190614d6c565b610395906060810190614d02565b610a02565b8282828181106103a657fe5b90506020028101906103b89190614d6c565b356003141561043b576102f487876103db61271061028e88888881811061027157fe5b8686868181106103e757fe5b90506020028101906103f99190614d6c565b61040a906040810190602001613966565b87878781811061041657fe5b90506020028101906104289190614d6c565b610436906060810190614d02565b610b03565b82828281811061044757fe5b90506020028101906104599190614d6c565b35600414156104ad576102f4878761047c61271061028e88888881811061027157fe5b86868681811061048857fe5b905060200281019061049a9190614d6c565b6104a8906060810190614d02565b610d2a565b8282828181106104b957fe5b90506020028101906104cb9190614d6c565b356005141561054e576102f487876104ee61271061028e88888881811061027157fe5b8686868181106104fa57fe5b905060200281019061050c9190614d6c565b61051d906040810190602001613966565b87878781811061052957fe5b905060200281019061053b9190614d6c565b610549906060810190614d02565b610d54565b82828281811061055a57fe5b905060200281019061056c9190614d6c565b35600614156105ef576102f4878761058f61271061028e88888881811061027157fe5b86868681811061059b57fe5b90506020028101906105ad9190614d6c565b6105be906040810190602001613966565b8787878181106105ca57fe5b90506020028101906105dc9190614d6c565b6105ea906060810190614d02565b6111ba565b8282828181106105fb57fe5b905060200281019061060d9190614d6c565b3560071415610661576102f4878761063061271061028e88888881811061027157fe5b86868681811061063c57fe5b905060200281019061064e9190614d6c565b61065c906060810190614d02565b6115b4565b82828281811061066d57fe5b905060200281019061067f9190614d6c565b35600814156106d6576102f487876106a261271061028e88888881811061027157fe5b8686868181106106ae57fe5b90506020028101906106c09190614d6c565b6106d1906040810190602001613966565b6115fd565b8282828181106106e257fe5b90506020028101906106f49190614d6c565b3560091415610777576102f4878761071761271061028e88888881811061027157fe5b86868681811061072357fe5b90506020028101906107359190614d6c565b610746906040810190602001613966565b87878781811061075257fe5b90506020028101906107649190614d6c565b610772906060810190614d02565b6117a8565b82828281811061078357fe5b90506020028101906107959190614d6c565b35600a1415610818576102f487876107b861271061028e88888881811061027157fe5b8686868181106107c457fe5b90506020028101906107d69190614d6c565b6107e7906040810190602001613966565b8787878181106107f357fe5b90506020028101906108059190614d6c565b610813906060810190614d02565b61197a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614b15565b600101610228565b50505050505050565b60008261086a575060006108b2565b8282028284828161087757fe5b04146108af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614959565b90505b92915050565b60006108af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c8e565b610902611ce1565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156109b7577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b50505050505b6109fa8686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cf992505050565b505050505050565b85610a0b611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610ac0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610aa657600080fd5b505af1158015610aba573d6000803e3d6000fd5b50505050505b6108528787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611fad92505050565b610b0b6135d6565b610b1782840184613c16565b9050610b2484888761230b565b806060015115610bc157805160208201516040517fa6417ed600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169263a6417ed692610b8a928a906001906004016146c2565b600060405180830381600087803b158015610ba457600080fd5b505af1158015610bb8573d6000803e3d6000fd5b50505050610852565b610bc9611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610c9357805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df02124928992610c5c92919084906001906004016146c2565b6000604051808303818588803b158015610c7557600080fd5b505af1158015610c89573d6000803e3d6000fd5b5050505050610852565b805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df0212492610cef928a906001906004016146c2565b600060405180830381600087803b158015610d0957600080fd5b505af1158015610d1d573d6000803e3d6000fd5b5050505050505050505050565b610d326135fd565b610d3e82840184613d7c565b9050610852868583600001518460200151612457565b610d5c613615565b610d6882840184613af7565b90506000610d74611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610dac5787610dce565b7f00000000000000000000000000000000000000000000000000000000000000005b90506000610dda611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610e125787610e34565b7f00000000000000000000000000000000000000000000000000000000000000005b9050610e3e611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415610ef3577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0886040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b50505050505b6000805b845151811015610f3957610f2f85600001518281518110610f1457fe5b602002602001015160200151836127c390919063ffffffff16565b9150600101610ef7565b5060005b84515181101561105957610f4f613628565b8551805183908110610f5d57fe5b602002602001015190506000610f848461028e8d856020015161085b90919063ffffffff16565b9050610f958260000151878361230b565b8151604080840151606085015191517f8201aa3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90931692638201aa3f92610ff9928b9287928c92916004016144a2565b6040805180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104a9190614249565b50505050806001019050610f3d565b50611062611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614156111ae576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9082906370a082319061110f903090600401614393565b60206040518083038186803b15801561112757600080fd5b505afa15801561113b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115f9190614231565b6040518263ffffffff1660e01b815260040161117b9190614ca3565b600060405180830381600087803b15801561119557600080fd5b505af11580156111a9573d6000803e3d6000fd5b505050505b50505050505050505050565b6111c2613666565b6111ce82840184613e61565b905060006111da611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146112125787611234565b7f00000000000000000000000000000000000000000000000000000000000000005b90506000611240611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614611278578761129a565b7f00000000000000000000000000000000000000000000000000000000000000005b90506112a4611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415611359577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0886040518263ffffffff1660e01b81526004016000604051808303818588803b15801561133f57600080fd5b505af1158015611353573d6000803e3d6000fd5b50505050505b61136486838961230b565b604080516101008101825273ffffffffffffffffffffffffffffffffffffffff8481168252838116602080840191909152865162ffffff1683850152306060840152860151608083015260a082018a9052600160c083015285830151811660e083015291517f414bf3890000000000000000000000000000000000000000000000000000000081529188169163414bf3899161140291600401614b4c565b602060405180830381600087803b15801561141c57600080fd5b505af1158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190614231565b5061145d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614156115a9576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9082906370a082319061150a903090600401614393565b60206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190614231565b6040518263ffffffff1660e01b81526004016115769190614ca3565b600060405180830381600087803b15801561159057600080fd5b505af11580156115a4573d6000803e3d6000fd5b505050505b505050505050505050565b6115f685858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061280292505050565b5050505050565b6000611607611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461163f5784611642565b60005b9050600061164e611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146116865784611689565b60005b9050611693611ce1565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146116d0576116d083838661230b565b8273ffffffffffffffffffffffffffffffffffffffff1663d5bcb9b56116f4611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461172d57600061172f565b855b848488600160006040518763ffffffff1660e01b8152600401611756959493929190614435565b6020604051808303818588803b15801561176f57600080fd5b505af1158015611783573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108529190614231565b6117b0613686565b6117bc82840184613d41565b90506117c984888761230b565b600181511415611884576040517ff74bfe8e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f74bfe8e9061182c908a90899060019030906004016144e3565b602060405180830381600087803b15801561184657600080fd5b505af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190614231565b50610852565b6002815114156118e7576040517f43bcfab600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516906343bcfab69061182c908990899060019030906004016144e3565b8051611948576040517fd5bcb9b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063d5bcb9b59061182c908a908a908a906001903090600401614435565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149ed565b611982613699565b61198e82840184613c87565b905086611999611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415611a71577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015611a3457600080fd5b505af1158015611a48573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000090505b611a7c85828861230b565b816040015115611b1957815160208301516040517f65b2489b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816926365b2489b92611ae2928b90600190600401614ce7565b600060405180830381600087803b158015611afc57600080fd5b505af1158015611b10573d6000803e3d6000fd5b50505050611ba8565b815160208301516040517f5b41b90800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881692635b41b90892611b75928b90600190600401614ce7565b600060405180830381600087803b158015611b8f57600080fd5b505af1158015611ba3573d6000803e3d6000fd5b505050505b611bb0611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611c84576000611c0f7f000000000000000000000000000000000000000000000000000000000000000030612cfd565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90611576908490600401614ca3565b5050505050505050565b60008183611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016891906146e5565b506000838581611cd557fe5b049150505b9392505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b611d016136bc565b81806020019051810190611d1591906140af565b9050858573ffffffffffffffffffffffffffffffffffffffff8083169082161415611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906147c3565b611d74611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415611dcf577f00000000000000000000000000000000000000000000000000000000000000009150611e2d565b611dd7611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611e2d57507f00000000000000000000000000000000000000000000000000000000000000005b8173ffffffffffffffffffffffffffffffffffffffff1683600001516020015173ffffffffffffffffffffffffffffffffffffffff1614611e9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148b4565b82515173ffffffffffffffffffffffffffffffffffffffff828116911614611eee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149b6565b611ef985838861230b565b825160208401516040517faa77476c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169263aa77476c92611f52928b90600401614bc8565b6040805180830381600087803b158015611f6b57600080fd5b505af1158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa391906141ff565b5050611bb0611ce1565b848473ffffffffffffffffffffffffffffffffffffffff8083169082161415612002576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906147c3565b61200a611ce1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612065577f000000000000000000000000000000000000000000000000000000000000000091506120c3565b61206d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120c357507f00000000000000000000000000000000000000000000000000000000000000005b6120cb6136e1565b838060200190518101906120df9190613ebe565b905060005b81515181101561222a57600061212060108460000151848151811061210557fe5b60200260200101516101600151612df890919063ffffffff16565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612187576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148b4565b60006121b960108560000151858151811061219e57fe5b60200260200101516101400151612df890919063ffffffff16565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612220576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149b6565b50506001016120e4565b506122567f0000000000000000000000000000000000000000000000000000000000000000848861230b565b805160208201516040517fdd1c7d1800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169263dd1c7d18926122b0928b919060040161451b565b608060405180830381600087803b1580156122ca57600080fd5b505af11580156122de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123029190613ce2565b50611bb0611ce1565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14612452576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152829060009073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e9061239590309089906004016143da565b60206040518083038186803b1580156123ad57600080fd5b505afa1580156123c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e59190614231565b9050828110156115f65761241173ffffffffffffffffffffffffffffffffffffffff8316866000612e3d565b6115f673ffffffffffffffffffffffffffffffffffffffff8316867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612fc2565b505050565b805160009080612493576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148eb565b600061249d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156125e0578473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b15801561251857600080fd5b505af115801561252c573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061255a57fe5b6020026020010151886040518363ffffffff1660e01b81526004016125809291906143b4565b602060405180830381600087803b15801561259a57600080fd5b505af11580156125ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d29190613982565b6125db57600080fd5b61261a565b6125ff87856000815181106125f157fe5b602002602001015188613080565b5073ffffffffffffffffffffffffffffffffffffffff841615155b85925060005b8281101561272d57600085828151811061263657fe5b60209081029190910101519050807401000000000000000000000000000000000000000081161561266d87838360a182901c6131a3565b96506000808261267f57886000612683565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a600101146126cb578d8a600101815181106126be57fe5b60200260200101516126cd565b305b6040518463ffffffff1660e01b81526004016126eb93929190614cac565b600060405180830381600087803b15801561270557600080fd5b505af1158015612719573d6000803e3d6000fd5b505050505050505050806001019050612620565b5080156127b9576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d90612786908690600401614ca3565b600060405180830381600087803b1580156127a057600080fd5b505af11580156127b4573d6000803e3d6000fd5b505050505b5050949350505050565b6000828201838110156108af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061478c565b61280a6136fb565b8180602001905181019061281e9190613ab2565b9050806000015173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612a8557612860611ce1565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561298b576128be7f0000000000000000000000000000000000000000000000000000000000000000868561230b565b6040517f80500d2000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906380500d2090612954907f00000000000000000000000000000000000000000000000000000000000000009087903090600401614472565b600060405180830381600087803b15801561296e57600080fd5b505af1158015612982573d6000803e3d6000fd5b50505050612a80565b6129b67f0000000000000000000000000000000000000000000000000000000000000000868561230b565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906369328dec90612a2c90879087903090600401614472565b602060405180830381600087803b158015612a4657600080fd5b505af1158015612a5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7e9190614231565b505b6115f6565b805173ffffffffffffffffffffffffffffffffffffffff85811691161415612ccb57612aaf611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612bd1576040517f474cf53d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063474cf53d908590612b9a907f00000000000000000000000000000000000000000000000000000000000000009030907f000000000000000000000000000000000000000000000000000000000000000090600401614401565b6000604051808303818588803b158015612bb357600080fd5b505af1158015612bc7573d6000803e3d6000fd5b5050505050612a80565b612bfc7f0000000000000000000000000000000000000000000000000000000000000000868561230b565b6040517fe8eda9df00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e8eda9df90612c94908890879030907f000000000000000000000000000000000000000000000000000000000000000090600401614666565b600060405180830381600087803b158015612cae57600080fd5b505af1158015612cc2573d6000803e3d6000fd5b505050506115f6565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061487d565b600073ffffffffffffffffffffffffffffffffffffffff831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612d4f575073ffffffffffffffffffffffffffffffffffffffff8116316108b2565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190612da1908590600401614393565b60206040518083038186803b158015612db957600080fd5b505afa158015612dcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df19190614231565b90506108b2565b60008160140183511015612e1e57612e1e612e196004855185601401613238565b6132dd565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b801580612eeb57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063dd62ed3e90612e9990309086906004016143da565b60206040518083038186803b158015612eb157600080fd5b505afa158015612ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ee99190614231565b155b612f21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614ab8565b6124528363095ea7b360e01b8484604051602401612f409291906143b4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526132e5565b6000613059828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b81526004016130039291906143da565b60206040518083038186803b15801561301b57600080fd5b505afa15801561302f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130539190614231565b906127c3565b905061307a8463095ea7b360e01b8584604051602401612f409291906143b4565b50505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016130b39291906143b4565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516131019190614377565b6000604051808303816000865af19150503d806000811461313e576040519150601f19603f3d011682016040523d82523d6000602084013e613143565b606091505b509150915081801561316d57508051158061316d57508080602001905181019061316d9190613982565b6115f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906146f8565b60008085116131de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061472f565b6000806131eb868661339b565b909250905060006131fc888661085b565b9050600061320a828461085b565b9050600061321e836130538761271061085b565b905080828161322957fe5b049a9950505050505050505050565b6060632800659560e01b848484604051602401613257939291906146a0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b6060613347826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134609092919063ffffffff16565b80519091501561245257808060200190518101906133659190613982565b612452576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614a5b565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156133e757600080fd5b505afa1580156133fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061341f91906141b1565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915084613450578082613453565b81815b9097909650945050505050565b606061346f8484600085613477565b949350505050565b6060824710156134b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614820565b6134bc85613579565b6134f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614a24565b600060608673ffffffffffffffffffffffffffffffffffffffff16858760405161351c9190614377565b60006040518083038185875af1925050503d8060008114613559576040519150601f19603f3d011682016040523d82523d6000602084013e61355e565b606091505b509150915061356e828286613583565b979650505050505050565b803b15155b919050565b60608315613592575081611cda565b8251156135a25782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016891906146e5565b60408051608081018252600080825260208201819052918101829052606081019190915290565b60408051808201909152600081526060602082015290565b6040518060200160405280606081525090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b6040518060200160405280600081525090565b604051806060016040528060008152602001600081526020016000151581525090565b60405180604001604052806136cf61370d565b81526020016136dc613761565b905290565b604051806040016040528060608152602001606081525090565b60408051602081019091526000815290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b805161357e81614e0d565b600082601f8301126137a5578081fd5b81516137b86137b382614dc3565b614d9f565b818152915060208083019084810160005b848110156137f2576137e0888484518a01016137fd565b845292820192908201906001016137c9565b505050505092915050565b600082601f83011261380d578081fd5b815167ffffffffffffffff81111561382157fe5b61385260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614d9f565b915080825283602082850101111561386957600080fd5b61387a816020840160208601614de1565b5092915050565b8035600f81900b811461357e57600080fd5b6000608082840312156138a4578081fd5b6040516080810181811067ffffffffffffffff821117156138c157fe5b80604052508091508251600481106138d857600080fd5b8152602083015160ff811681146138ee57600080fd5b8060208301525060408301516040820152606083015160608201525092915050565b80516dffffffffffffffffffffffffffff8116811461357e57600080fd5b80516fffffffffffffffffffffffffffffffff8116811461357e57600080fd5b805167ffffffffffffffff8116811461357e57600080fd5b600060208284031215613977578081fd5b81356108af81614e0d565b600060208284031215613993578081fd5b81516108af81614e32565b600080602083850312156139b0578081fd5b823567ffffffffffffffff808211156139c7578283fd5b818501915085601f8301126139da578283fd5b8135818111156139e8578384fd5b8660208285010111156139f9578384fd5b60209290920196919550909350505050565b60008060008060008060a08789031215613a23578182fd5b8635613a2e81614e0d565b95506020870135613a3e81614e0d565b94506040870135935060608701359250608087013567ffffffffffffffff80821115613a68578384fd5b818901915089601f830112613a7b578384fd5b813581811115613a89578485fd5b8a60208083028501011115613a9c578485fd5b6020830194508093505050509295509295509295565b600060208284031215613ac3578081fd5b6040516020810181811067ffffffffffffffff82111715613ae057fe5b6040528251613aee81614e0d565b81529392505050565b60006020808385031215613b09578182fd5b823567ffffffffffffffff80821115613b20578384fd5b8185019150828287031215613b33578384fd5b604080518481018181108482111715613b4857fe5b8252833583811115613b58578687fd5b80850194505087601f850112613b6c578586fd5b8335613b7a6137b382614dc3565b81815286810190868801608080850289018a018d1015613b98578a8bfd5b8a98505b84891015613c045780828e031215613bb2578a8bfd5b86518181018181108a82111715613bc557fe5b88528235613bd281614e0d565b8152828b01358b8201528783013588820152606080840135908201528452600198909801979289019290810190613b9c565b50508352509098975050505050505050565b600060808284031215613c27578081fd5b6040516080810181811067ffffffffffffffff82111715613c4457fe5b604052613c5083613881565b8152613c5e60208401613881565b6020820152604083013560408201526060830135613c7b81614e32565b60608201529392505050565b600060608284031215613c98578081fd5b6040516060810181811067ffffffffffffffff82111715613cb557fe5b806040525082358152602083013560208201526040830135613cd681614e32565b60408201529392505050565b600060808284031215613cf3578081fd5b6040516080810181811067ffffffffffffffff82111715613d1057fe5b8060405250825181526020830151602082015260408301516040820152606083015160608201528091505092915050565b600060208284031215613d52578081fd5b6040516020810181811067ffffffffffffffff82111715613d6f57fe5b6040529135825250919050565b60006020808385031215613d8e578182fd5b823567ffffffffffffffff80821115613da5578384fd5b9084019060408287031215613db8578384fd5b604051604081018181108382111715613dcd57fe5b6040528235613ddb81614e0d565b81528284013582811115613ded578586fd5b80840193505086601f840112613e01578485fd5b82359150613e116137b383614dc3565b82815284810190848601868502860187018a1015613e2d578788fd5b8795505b84861015613e4f578035835260019590950194918601918601613e31565b50948201949094529695505050505050565b600060608284031215613e72578081fd5b6040516060810181811067ffffffffffffffff82111715613e8f57fe5b604052823562ffffff81168114613ea4578283fd5b8152602083810135908201526040830135613cd681614e0d565b600060208284031215613ecf578081fd5b815167ffffffffffffffff80821115613ee6578283fd5b9083019060408286031215613ef9578283fd5b604051604081018181108382111715613f0e57fe5b604052825182811115613f1f578485fd5b8301601f81018713613f2f578485fd5b8051613f3d6137b382614dc3565b818152602080820191908401885b8481101561407c57815186016101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828f03011215613f89578a8bfd5b613f94610180614d9f565b613fa06020830161378a565b8152613fae6040830161378a565b6020820152613fbf6060830161378a565b6040820152613fd06080830161378a565b606082015260a0820151608082015260c082015160a082015260e082015160c082015261010082015160e08201526101208201516101008201526101408201516101208201526101608201518a811115614028578c8dfd5b6140378f6020838601016137fd565b610140830152506101808201518a811115614050578c8dfd5b61405f8f6020838601016137fd565b610160830152508552506020938401939190910190600101613f4b565b50508452505050602083015182811115614094578485fd5b6140a087828601613795565b60208301525095945050505050565b60008183036101c08112156140c2578182fd5b6040516040810181811067ffffffffffffffff821117156140df57fe5b604052610140808312156140f1578384fd5b6140fa81614d9f565b92506141058561378a565b83526141136020860161378a565b60208401526141246040860161392e565b60408401526141356060860161392e565b60608401526141466080860161378a565b608084015261415760a0860161378a565b60a084015261416860c0860161378a565b60c084015260e085015160e084015261010061418581870161394e565b9084015261012085810151908401528282526141a386828701613893565b602083015250949350505050565b6000806000606084860312156141c5578081fd5b6141ce84613910565b92506141dc60208501613910565b9150604084015163ffffffff811681146141f4578182fd5b809150509250925092565b60008060408385031215614211578182fd5b61421a8361392e565b91506142286020840161392e565b90509250929050565b600060208284031215614242578081fd5b5051919050565b6000806040838503121561425b578182fd5b505080516020909101519092909150565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208085018081965082840281019150828601855b858110156142cc5782840389526142ba8483516142d9565b988501989350908401906001016142a2565b5091979650505050505050565b600081518084526142f1816020860160208601614de1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80516004811061432f57fe5b825260208181015160ff169083015260408082015190830152606090810151910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b60008251614389818460208701614de1565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff938416815291909216602082015261ffff909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff9586168152938516602085015260408401929092526060830152909116608082015260a00190565b73ffffffffffffffffffffffffffffffffffffffff93841681526020810192909252909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff958616815260208101949094529190931660408301526060820192909252608081019190915260a00190565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093526040830191909152909116606082015260800190565b606080825284518282018190526000919060809081850190602080820287018401818b01875b8481101561463e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8403018652815161018061458085835161426c565b858201516145908787018261426c565b506040808301516145a38288018261426c565b5050898201516145b58b87018261426c565b5081890151858a015260a0808301519086015260c0808301519086015260e08083015190860152610100808301519086015261012080830151908601526101408083015181870183905261460b838801826142d9565b92505050610160808301519250858203818701525061462a81836142d9565b978601979450505090830190600101614541565b505089828901528781036040890152614657818a614286565b9b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093529216604082015261ffff909116606082015260800190565b60608101600885106146ae57fe5b938152602081019290925260409091015290565b600f94850b81529290930b60208301526040820152606081019190915260800190565b6000602082526108af60208301846142d9565b6020808252601f908201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604082015260600190565b60208082526027908201527f556e697377617056324c69623a20494e53554646494349454e545f494e50555460408201527f5f414d4f554e5400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602a908201527f66726f6d546f6b656e2073686f756c6420626520646966666572656e7420667260408201527f6f6d20746f546f6b656e00000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600e908201527f496e76616c69642061546f6b656e000000000000000000000000000000000000604082015260600190565b60208082526014908201527f496e76616c69642066726f6d20746f6b656e2121000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f496e76616c696420746f20746f6b656e21210000000000000000000000000000604082015260600190565b6020808252600e908201527f496e76616c6964206f7054797065000000000000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60208082526013908201527f496e646578206e6f7420737570706f7274656400000000000000000000000000604082015260600190565b60006101008201905073ffffffffffffffffffffffffffffffffffffffff80845116835280602085015116602084015262ffffff60408501511660408401528060608501511660608401526080840151608084015260a084015160a084015260c084015160c08401528060e08501511660e08401525092915050565b60006101e082019050614bdc82865161426c565b6020850151614bee602084018261426c565b506040850151614c016040840182614353565b506060850151614c146060840182614353565b506080850151614c27608084018261426c565b5060a0850151614c3a60a084018261426c565b5060c0850151614c4d60c084018261426c565b5060e085015160e083015261010080860151614c6b82850182614369565b50506101208581015190830152614c86610140830185614323565b61346f6101c0830184614353565b61ffff91909116815260200190565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b93845260208401929092526040830152606082015260800190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614d36578283fd5b83018035915067ffffffffffffffff821115614d50578283fd5b602001915036819003821315614d6557600080fd5b9250929050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112614389578182fd5b60405181810167ffffffffffffffff81118282101715614dbb57fe5b604052919050565b600067ffffffffffffffff821115614dd757fe5b5060209081020190565b60005b83811015614dfc578181015183820152602001614de4565b8381111561307a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114614e2f57600080fd5b50565b8015158114614e2f57600080fdfea264697066735822122053c3f714936bd6a4bc967abf8b4458c9752c0992790a014f3a3fe71e270b379864736f6c6343000705003300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef00000000000000000000000000000000000000000000000000000000000000010000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e04000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106100705760003560e01c8063a59a99731161004e578063a59a9973146100e4578063ad5c4648146100f9578063c5e10eef1461010e578063e76b146c1461012357610070565b8063439fab9114610075578063635677f2146100975780637f555b03146100c2575b600080fd5b34801561008157600080fd5b5061009561009036600461399e565b610136565b005b3480156100a357600080fd5b506100ac610171565b6040516100b99190614c94565b60405180910390f35b3480156100ce57600080fd5b506100d7610195565b6040516100b99190614393565b3480156100f057600080fd5b506100d76101b9565b34801561010557600080fd5b506100d76101dd565b34801561011a57600080fd5b506100d7610201565b610095610131366004613a0b565b610225565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614922565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000181565b7f00000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef81565b7f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a981565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e0481565b60005b818110156108525782828281811061023c57fe5b905060200281019061024e9190614d6c565b35600114156102f9576102f4878761029461271061028e88888881811061027157fe5b90506020028101906102839190614d6c565b8b906040013561085b565b906108b8565b8686868181106102a057fe5b90506020028101906102b29190614d6c565b6102c3906040810190602001613966565b8787878181106102cf57fe5b90506020028101906102e19190614d6c565b6102ef906060810190614d02565b6108fa565b61084a565b82828281811061030557fe5b90506020028101906103179190614d6c565b356002141561039a576102f4878761033a61271061028e88888881811061027157fe5b86868681811061034657fe5b90506020028101906103589190614d6c565b610369906040810190602001613966565b87878781811061037557fe5b90506020028101906103879190614d6c565b610395906060810190614d02565b610a02565b8282828181106103a657fe5b90506020028101906103b89190614d6c565b356003141561043b576102f487876103db61271061028e88888881811061027157fe5b8686868181106103e757fe5b90506020028101906103f99190614d6c565b61040a906040810190602001613966565b87878781811061041657fe5b90506020028101906104289190614d6c565b610436906060810190614d02565b610b03565b82828281811061044757fe5b90506020028101906104599190614d6c565b35600414156104ad576102f4878761047c61271061028e88888881811061027157fe5b86868681811061048857fe5b905060200281019061049a9190614d6c565b6104a8906060810190614d02565b610d2a565b8282828181106104b957fe5b90506020028101906104cb9190614d6c565b356005141561054e576102f487876104ee61271061028e88888881811061027157fe5b8686868181106104fa57fe5b905060200281019061050c9190614d6c565b61051d906040810190602001613966565b87878781811061052957fe5b905060200281019061053b9190614d6c565b610549906060810190614d02565b610d54565b82828281811061055a57fe5b905060200281019061056c9190614d6c565b35600614156105ef576102f4878761058f61271061028e88888881811061027157fe5b86868681811061059b57fe5b90506020028101906105ad9190614d6c565b6105be906040810190602001613966565b8787878181106105ca57fe5b90506020028101906105dc9190614d6c565b6105ea906060810190614d02565b6111ba565b8282828181106105fb57fe5b905060200281019061060d9190614d6c565b3560071415610661576102f4878761063061271061028e88888881811061027157fe5b86868681811061063c57fe5b905060200281019061064e9190614d6c565b61065c906060810190614d02565b6115b4565b82828281811061066d57fe5b905060200281019061067f9190614d6c565b35600814156106d6576102f487876106a261271061028e88888881811061027157fe5b8686868181106106ae57fe5b90506020028101906106c09190614d6c565b6106d1906040810190602001613966565b6115fd565b8282828181106106e257fe5b90506020028101906106f49190614d6c565b3560091415610777576102f4878761071761271061028e88888881811061027157fe5b86868681811061072357fe5b90506020028101906107359190614d6c565b610746906040810190602001613966565b87878781811061075257fe5b90506020028101906107649190614d6c565b610772906060810190614d02565b6117a8565b82828281811061078357fe5b90506020028101906107959190614d6c565b35600a1415610818576102f487876107b861271061028e88888881811061027157fe5b8686868181106107c457fe5b90506020028101906107d69190614d6c565b6107e7906040810190602001613966565b8787878181106107f357fe5b90506020028101906108059190614d6c565b610813906060810190614d02565b61197a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614b15565b600101610228565b50505050505050565b60008261086a575060006108b2565b8282028284828161087757fe5b04146108af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614959565b90505b92915050565b60006108af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c8e565b610902611ce1565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156109b7577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b50505050505b6109fa8686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cf992505050565b505050505050565b85610a0b611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610ac0577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610aa657600080fd5b505af1158015610aba573d6000803e3d6000fd5b50505050505b6108528787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611fad92505050565b610b0b6135d6565b610b1782840184613c16565b9050610b2484888761230b565b806060015115610bc157805160208201516040517fa6417ed600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169263a6417ed692610b8a928a906001906004016146c2565b600060405180830381600087803b158015610ba457600080fd5b505af1158015610bb8573d6000803e3d6000fd5b50505050610852565b610bc9611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610c9357805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df02124928992610c5c92919084906001906004016146c2565b6000604051808303818588803b158015610c7557600080fd5b505af1158015610c89573d6000803e3d6000fd5b5050505050610852565b805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df0212492610cef928a906001906004016146c2565b600060405180830381600087803b158015610d0957600080fd5b505af1158015610d1d573d6000803e3d6000fd5b5050505050505050505050565b610d326135fd565b610d3e82840184613d7c565b9050610852868583600001518460200151612457565b610d5c613615565b610d6882840184613af7565b90506000610d74611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610dac5787610dce565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90506000610dda611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610e125787610e34565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b9050610e3e611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415610ef3577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0886040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b50505050505b6000805b845151811015610f3957610f2f85600001518281518110610f1457fe5b602002602001015160200151836127c390919063ffffffff16565b9150600101610ef7565b5060005b84515181101561105957610f4f613628565b8551805183908110610f5d57fe5b602002602001015190506000610f848461028e8d856020015161085b90919063ffffffff16565b9050610f958260000151878361230b565b8151604080840151606085015191517f8201aa3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90931692638201aa3f92610ff9928b9287928c92916004016144a2565b6040805180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104a9190614249565b50505050806001019050610f3d565b50611062611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614156111ae576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d9082906370a082319061110f903090600401614393565b60206040518083038186803b15801561112757600080fd5b505afa15801561113b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115f9190614231565b6040518263ffffffff1660e01b815260040161117b9190614ca3565b600060405180830381600087803b15801561119557600080fd5b505af11580156111a9573d6000803e3d6000fd5b505050505b50505050505050505050565b6111c2613666565b6111ce82840184613e61565b905060006111da611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146112125787611234565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90506000611240611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614611278578761129a565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90506112a4611ce1565b73ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415611359577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0886040518263ffffffff1660e01b81526004016000604051808303818588803b15801561133f57600080fd5b505af1158015611353573d6000803e3d6000fd5b50505050505b61136486838961230b565b604080516101008101825273ffffffffffffffffffffffffffffffffffffffff8481168252838116602080840191909152865162ffffff1683850152306060840152860151608083015260a082018a9052600160c083015285830151811660e083015291517f414bf3890000000000000000000000000000000000000000000000000000000081529188169163414bf3899161140291600401614b4c565b602060405180830381600087803b15801561141c57600080fd5b505af1158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190614231565b5061145d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614156115a9576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d9082906370a082319061150a903090600401614393565b60206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190614231565b6040518263ffffffff1660e01b81526004016115769190614ca3565b600060405180830381600087803b15801561159057600080fd5b505af11580156115a4573d6000803e3d6000fd5b505050505b505050505050505050565b6115f685858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061280292505050565b5050505050565b6000611607611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461163f5784611642565b60005b9050600061164e611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146116865784611689565b60005b9050611693611ce1565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146116d0576116d083838661230b565b8273ffffffffffffffffffffffffffffffffffffffff1663d5bcb9b56116f4611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461172d57600061172f565b855b848488600160006040518763ffffffff1660e01b8152600401611756959493929190614435565b6020604051808303818588803b15801561176f57600080fd5b505af1158015611783573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108529190614231565b6117b0613686565b6117bc82840184613d41565b90506117c984888761230b565b600181511415611884576040517ff74bfe8e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f74bfe8e9061182c908a90899060019030906004016144e3565b602060405180830381600087803b15801561184657600080fd5b505af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190614231565b50610852565b6002815114156118e7576040517f43bcfab600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516906343bcfab69061182c908990899060019030906004016144e3565b8051611948576040517fd5bcb9b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063d5bcb9b59061182c908a908a908a906001903090600401614435565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149ed565b611982613699565b61198e82840184613c87565b905086611999611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415611a71577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015611a3457600080fd5b505af1158015611a48573d6000803e3d6000fd5b50505050507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290505b611a7c85828861230b565b816040015115611b1957815160208301516040517f65b2489b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816926365b2489b92611ae2928b90600190600401614ce7565b600060405180830381600087803b158015611afc57600080fd5b505af1158015611b10573d6000803e3d6000fd5b50505050611ba8565b815160208301516040517f5b41b90800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881692635b41b90892611b75928b90600190600401614ce7565b600060405180830381600087803b158015611b8f57600080fd5b505af1158015611ba3573d6000803e3d6000fd5b505050505b611bb0611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611c84576000611c0f7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc230612cfd565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d90611576908490600401614ca3565b5050505050505050565b60008183611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016891906146e5565b506000838581611cd557fe5b049150505b9392505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b611d016136bc565b81806020019051810190611d1591906140af565b9050858573ffffffffffffffffffffffffffffffffffffffff8083169082161415611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906147c3565b611d74611ce1565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415611dcf577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29150611e2d565b611dd7611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611e2d57507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b8173ffffffffffffffffffffffffffffffffffffffff1683600001516020015173ffffffffffffffffffffffffffffffffffffffff1614611e9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148b4565b82515173ffffffffffffffffffffffffffffffffffffffff828116911614611eee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149b6565b611ef985838861230b565b825160208401516040517faa77476c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169263aa77476c92611f52928b90600401614bc8565b6040805180830381600087803b158015611f6b57600080fd5b505af1158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa391906141ff565b5050611bb0611ce1565b848473ffffffffffffffffffffffffffffffffffffffff8083169082161415612002576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906147c3565b61200a611ce1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612065577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506120c3565b61206d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120c357507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6120cb6136e1565b838060200190518101906120df9190613ebe565b905060005b81515181101561222a57600061212060108460000151848151811061210557fe5b60200260200101516101600151612df890919063ffffffff16565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612187576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148b4565b60006121b960108560000151858151811061219e57fe5b60200260200101516101400151612df890919063ffffffff16565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612220576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906149b6565b50506001016120e4565b506122567f00000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef848861230b565b805160208201516040517fdd1c7d1800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169263dd1c7d18926122b0928b919060040161451b565b608060405180830381600087803b1580156122ca57600080fd5b505af11580156122de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123029190613ce2565b50611bb0611ce1565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14612452576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152829060009073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e9061239590309089906004016143da565b60206040518083038186803b1580156123ad57600080fd5b505afa1580156123c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e59190614231565b9050828110156115f65761241173ffffffffffffffffffffffffffffffffffffffff8316866000612e3d565b6115f673ffffffffffffffffffffffffffffffffffffffff8316867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612fc2565b505050565b805160009080612493576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906148eb565b600061249d611ce1565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156125e0578473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b15801561251857600080fd5b505af115801561252c573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061255a57fe5b6020026020010151886040518363ffffffff1660e01b81526004016125809291906143b4565b602060405180830381600087803b15801561259a57600080fd5b505af11580156125ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d29190613982565b6125db57600080fd5b61261a565b6125ff87856000815181106125f157fe5b602002602001015188613080565b5073ffffffffffffffffffffffffffffffffffffffff841615155b85925060005b8281101561272d57600085828151811061263657fe5b60209081029190910101519050807401000000000000000000000000000000000000000081161561266d87838360a182901c6131a3565b96506000808261267f57886000612683565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a600101146126cb578d8a600101815181106126be57fe5b60200260200101516126cd565b305b6040518463ffffffff1660e01b81526004016126eb93929190614cac565b600060405180830381600087803b15801561270557600080fd5b505af1158015612719573d6000803e3d6000fd5b505050505050505050806001019050612620565b5080156127b9576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d90612786908690600401614ca3565b600060405180830381600087803b1580156127a057600080fd5b505af11580156127b4573d6000803e3d6000fd5b505050505b5050949350505050565b6000828201838110156108af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061478c565b61280a6136fb565b8180602001905181019061281e9190613ab2565b9050806000015173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612a8557612860611ce1565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561298b576128be7f000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e04868561230b565b6040517f80500d2000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e0416906380500d2090612954907f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a99087903090600401614472565b600060405180830381600087803b15801561296e57600080fd5b505af1158015612982573d6000803e3d6000fd5b50505050612a80565b6129b67f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9868561230b565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a916906369328dec90612a2c90879087903090600401614472565b602060405180830381600087803b158015612a4657600080fd5b505af1158015612a5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7e9190614231565b505b6115f6565b805173ffffffffffffffffffffffffffffffffffffffff85811691161415612ccb57612aaf611ce1565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612bd1576040517f474cf53d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e04169063474cf53d908590612b9a907f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a99030907f000000000000000000000000000000000000000000000000000000000000000190600401614401565b6000604051808303818588803b158015612bb357600080fd5b505af1158015612bc7573d6000803e3d6000fd5b5050505050612a80565b612bfc7f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9868561230b565b6040517fe8eda9df00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9169063e8eda9df90612c94908890879030907f000000000000000000000000000000000000000000000000000000000000000190600401614666565b600060405180830381600087803b158015612cae57600080fd5b505af1158015612cc2573d6000803e3d6000fd5b505050506115f6565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061487d565b600073ffffffffffffffffffffffffffffffffffffffff831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612d4f575073ffffffffffffffffffffffffffffffffffffffff8116316108b2565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190612da1908590600401614393565b60206040518083038186803b158015612db957600080fd5b505afa158015612dcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df19190614231565b90506108b2565b60008160140183511015612e1e57612e1e612e196004855185601401613238565b6132dd565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b801580612eeb57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063dd62ed3e90612e9990309086906004016143da565b60206040518083038186803b158015612eb157600080fd5b505afa158015612ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ee99190614231565b155b612f21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614ab8565b6124528363095ea7b360e01b8484604051602401612f409291906143b4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526132e5565b6000613059828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b81526004016130039291906143da565b60206040518083038186803b15801561301b57600080fd5b505afa15801561302f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130539190614231565b906127c3565b905061307a8463095ea7b360e01b8584604051602401612f409291906143b4565b50505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016130b39291906143b4565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516131019190614377565b6000604051808303816000865af19150503d806000811461313e576040519150601f19603f3d011682016040523d82523d6000602084013e613143565b606091505b509150915081801561316d57508051158061316d57508080602001905181019061316d9190613982565b6115f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610168906146f8565b60008085116131de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101689061472f565b6000806131eb868661339b565b909250905060006131fc888661085b565b9050600061320a828461085b565b9050600061321e836130538761271061085b565b905080828161322957fe5b049a9950505050505050505050565b6060632800659560e01b848484604051602401613257939291906146a0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b6060613347826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134609092919063ffffffff16565b80519091501561245257808060200190518101906133659190613982565b612452576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614a5b565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156133e757600080fd5b505afa1580156133fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061341f91906141b1565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915084613450578082613453565b81815b9097909650945050505050565b606061346f8484600085613477565b949350505050565b6060824710156134b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614820565b6134bc85613579565b6134f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016890614a24565b600060608673ffffffffffffffffffffffffffffffffffffffff16858760405161351c9190614377565b60006040518083038185875af1925050503d8060008114613559576040519150601f19603f3d011682016040523d82523d6000602084013e61355e565b606091505b509150915061356e828286613583565b979650505050505050565b803b15155b919050565b60608315613592575081611cda565b8251156135a25782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016891906146e5565b60408051608081018252600080825260208201819052918101829052606081019190915290565b60408051808201909152600081526060602082015290565b6040518060200160405280606081525090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b6040518060200160405280600081525090565b604051806060016040528060008152602001600081526020016000151581525090565b60405180604001604052806136cf61370d565b81526020016136dc613761565b905290565b604051806040016040528060608152602001606081525090565b60408051602081019091526000815290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b805161357e81614e0d565b600082601f8301126137a5578081fd5b81516137b86137b382614dc3565b614d9f565b818152915060208083019084810160005b848110156137f2576137e0888484518a01016137fd565b845292820192908201906001016137c9565b505050505092915050565b600082601f83011261380d578081fd5b815167ffffffffffffffff81111561382157fe5b61385260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614d9f565b915080825283602082850101111561386957600080fd5b61387a816020840160208601614de1565b5092915050565b8035600f81900b811461357e57600080fd5b6000608082840312156138a4578081fd5b6040516080810181811067ffffffffffffffff821117156138c157fe5b80604052508091508251600481106138d857600080fd5b8152602083015160ff811681146138ee57600080fd5b8060208301525060408301516040820152606083015160608201525092915050565b80516dffffffffffffffffffffffffffff8116811461357e57600080fd5b80516fffffffffffffffffffffffffffffffff8116811461357e57600080fd5b805167ffffffffffffffff8116811461357e57600080fd5b600060208284031215613977578081fd5b81356108af81614e0d565b600060208284031215613993578081fd5b81516108af81614e32565b600080602083850312156139b0578081fd5b823567ffffffffffffffff808211156139c7578283fd5b818501915085601f8301126139da578283fd5b8135818111156139e8578384fd5b8660208285010111156139f9578384fd5b60209290920196919550909350505050565b60008060008060008060a08789031215613a23578182fd5b8635613a2e81614e0d565b95506020870135613a3e81614e0d565b94506040870135935060608701359250608087013567ffffffffffffffff80821115613a68578384fd5b818901915089601f830112613a7b578384fd5b813581811115613a89578485fd5b8a60208083028501011115613a9c578485fd5b6020830194508093505050509295509295509295565b600060208284031215613ac3578081fd5b6040516020810181811067ffffffffffffffff82111715613ae057fe5b6040528251613aee81614e0d565b81529392505050565b60006020808385031215613b09578182fd5b823567ffffffffffffffff80821115613b20578384fd5b8185019150828287031215613b33578384fd5b604080518481018181108482111715613b4857fe5b8252833583811115613b58578687fd5b80850194505087601f850112613b6c578586fd5b8335613b7a6137b382614dc3565b81815286810190868801608080850289018a018d1015613b98578a8bfd5b8a98505b84891015613c045780828e031215613bb2578a8bfd5b86518181018181108a82111715613bc557fe5b88528235613bd281614e0d565b8152828b01358b8201528783013588820152606080840135908201528452600198909801979289019290810190613b9c565b50508352509098975050505050505050565b600060808284031215613c27578081fd5b6040516080810181811067ffffffffffffffff82111715613c4457fe5b604052613c5083613881565b8152613c5e60208401613881565b6020820152604083013560408201526060830135613c7b81614e32565b60608201529392505050565b600060608284031215613c98578081fd5b6040516060810181811067ffffffffffffffff82111715613cb557fe5b806040525082358152602083013560208201526040830135613cd681614e32565b60408201529392505050565b600060808284031215613cf3578081fd5b6040516080810181811067ffffffffffffffff82111715613d1057fe5b8060405250825181526020830151602082015260408301516040820152606083015160608201528091505092915050565b600060208284031215613d52578081fd5b6040516020810181811067ffffffffffffffff82111715613d6f57fe5b6040529135825250919050565b60006020808385031215613d8e578182fd5b823567ffffffffffffffff80821115613da5578384fd5b9084019060408287031215613db8578384fd5b604051604081018181108382111715613dcd57fe5b6040528235613ddb81614e0d565b81528284013582811115613ded578586fd5b80840193505086601f840112613e01578485fd5b82359150613e116137b383614dc3565b82815284810190848601868502860187018a1015613e2d578788fd5b8795505b84861015613e4f578035835260019590950194918601918601613e31565b50948201949094529695505050505050565b600060608284031215613e72578081fd5b6040516060810181811067ffffffffffffffff82111715613e8f57fe5b604052823562ffffff81168114613ea4578283fd5b8152602083810135908201526040830135613cd681614e0d565b600060208284031215613ecf578081fd5b815167ffffffffffffffff80821115613ee6578283fd5b9083019060408286031215613ef9578283fd5b604051604081018181108382111715613f0e57fe5b604052825182811115613f1f578485fd5b8301601f81018713613f2f578485fd5b8051613f3d6137b382614dc3565b818152602080820191908401885b8481101561407c57815186016101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828f03011215613f89578a8bfd5b613f94610180614d9f565b613fa06020830161378a565b8152613fae6040830161378a565b6020820152613fbf6060830161378a565b6040820152613fd06080830161378a565b606082015260a0820151608082015260c082015160a082015260e082015160c082015261010082015160e08201526101208201516101008201526101408201516101208201526101608201518a811115614028578c8dfd5b6140378f6020838601016137fd565b610140830152506101808201518a811115614050578c8dfd5b61405f8f6020838601016137fd565b610160830152508552506020938401939190910190600101613f4b565b50508452505050602083015182811115614094578485fd5b6140a087828601613795565b60208301525095945050505050565b60008183036101c08112156140c2578182fd5b6040516040810181811067ffffffffffffffff821117156140df57fe5b604052610140808312156140f1578384fd5b6140fa81614d9f565b92506141058561378a565b83526141136020860161378a565b60208401526141246040860161392e565b60408401526141356060860161392e565b60608401526141466080860161378a565b608084015261415760a0860161378a565b60a084015261416860c0860161378a565b60c084015260e085015160e084015261010061418581870161394e565b9084015261012085810151908401528282526141a386828701613893565b602083015250949350505050565b6000806000606084860312156141c5578081fd5b6141ce84613910565b92506141dc60208501613910565b9150604084015163ffffffff811681146141f4578182fd5b809150509250925092565b60008060408385031215614211578182fd5b61421a8361392e565b91506142286020840161392e565b90509250929050565b600060208284031215614242578081fd5b5051919050565b6000806040838503121561425b578182fd5b505080516020909101519092909150565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208085018081965082840281019150828601855b858110156142cc5782840389526142ba8483516142d9565b988501989350908401906001016142a2565b5091979650505050505050565b600081518084526142f1816020860160208601614de1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80516004811061432f57fe5b825260208181015160ff169083015260408082015190830152606090810151910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b60008251614389818460208701614de1565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff938416815291909216602082015261ffff909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff9586168152938516602085015260408401929092526060830152909116608082015260a00190565b73ffffffffffffffffffffffffffffffffffffffff93841681526020810192909252909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff958616815260208101949094529190931660408301526060820192909252608081019190915260a00190565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093526040830191909152909116606082015260800190565b606080825284518282018190526000919060809081850190602080820287018401818b01875b8481101561463e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8403018652815161018061458085835161426c565b858201516145908787018261426c565b506040808301516145a38288018261426c565b5050898201516145b58b87018261426c565b5081890151858a015260a0808301519086015260c0808301519086015260e08083015190860152610100808301519086015261012080830151908601526101408083015181870183905261460b838801826142d9565b92505050610160808301519250858203818701525061462a81836142d9565b978601979450505090830190600101614541565b505089828901528781036040890152614657818a614286565b9b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093529216604082015261ffff909116606082015260800190565b60608101600885106146ae57fe5b938152602081019290925260409091015290565b600f94850b81529290930b60208301526040820152606081019190915260800190565b6000602082526108af60208301846142d9565b6020808252601f908201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604082015260600190565b60208082526027908201527f556e697377617056324c69623a20494e53554646494349454e545f494e50555460408201527f5f414d4f554e5400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602a908201527f66726f6d546f6b656e2073686f756c6420626520646966666572656e7420667260408201527f6f6d20746f546f6b656e00000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600e908201527f496e76616c69642061546f6b656e000000000000000000000000000000000000604082015260600190565b60208082526014908201527f496e76616c69642066726f6d20746f6b656e2121000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f496e76616c696420746f20746f6b656e21210000000000000000000000000000604082015260600190565b6020808252600e908201527f496e76616c6964206f7054797065000000000000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60208082526013908201527f496e646578206e6f7420737570706f7274656400000000000000000000000000604082015260600190565b60006101008201905073ffffffffffffffffffffffffffffffffffffffff80845116835280602085015116602084015262ffffff60408501511660408401528060608501511660608401526080840151608084015260a084015160a084015260c084015160c08401528060e08501511660e08401525092915050565b60006101e082019050614bdc82865161426c565b6020850151614bee602084018261426c565b506040850151614c016040840182614353565b506060850151614c146060840182614353565b506080850151614c27608084018261426c565b5060a0850151614c3a60a084018261426c565b5060c0850151614c4d60c084018261426c565b5060e085015160e083015261010080860151614c6b82850182614369565b50506101208581015190830152614c86610140830185614323565b61346f6101c0830184614353565b61ffff91909116815260200190565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b93845260208401929092526040830152606082015260800190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614d36578283fd5b83018035915067ffffffffffffffff821115614d50578283fd5b602001915036819003821315614d6557600080fd5b9250929050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112614389578182fd5b60405181810167ffffffffffffffff81118282101715614dbb57fe5b604052919050565b600067ffffffffffffffff821115614dd757fe5b5060209081020190565b60005b83811015614dfc578181015183820152602001614de4565b8381111561307a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114614e2f57600080fd5b50565b8015158114614e2f57600080fdfea264697066735822122053c3f714936bd6a4bc967abf8b4458c9752c0992790a014f3a3fe71e270b379864736f6c63430007050033

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

00000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef00000000000000000000000000000000000000000000000000000000000000010000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e04000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _erc20Proxy (address): 0x95E6F48254609A6ee006F7D493c8e5fB97094ceF
Arg [1] : _aaveeRefCode (uint16): 1
Arg [2] : _aaveeLendingPool (address): 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9
Arg [3] : _aaveeWethGateway (address): 0xcc9a0B7c43DC2a5F023Bb9b738E45B0Ef6B06E04
Arg [4] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9
Arg [3] : 000000000000000000000000cc9a0b7c43dc2a5f023bb9b738e45b0ef6b06e04
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.