false
true
0

Contract Address Details

0x19D77173AFa502fcdbcFC6331bFDD1FcF15b16Cc

Contract Name
PhameOrderBookReader
Creator
0x7dbfab–81c946 at 0x424db8–d04734
Balance
0 tPLS
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
25348830
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
PhameOrderBookReader




Optimization enabled
true
Compiler version
v0.7.6+commit.7338295f




Optimization runs
200
EVM Version
istanbul




Verified at
2023-09-13T09:29:19.264218Z

contracts/dataproviders/PhameOrderBookReader.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import "../dependencies/openzeppelin/contracts/SafeMath.sol";

import "../interfaces/IOrderBook.sol";

contract PhameOrderBookReader {
    using SafeMath for uint256;

    struct Vars {
        uint256 i;
        uint256 index;
        address account;
        uint256 uintLength;
        uint256 addressLength;
    }

    function getIncreaseOrders(
        address payable _orderBookAddress,
        address _account,
        uint256[] memory _indices
    ) external view returns (uint256[] memory, address[] memory) {
        Vars memory vars = Vars(0, 0, _account, 5, 3);

        uint256[] memory uintProps = new uint256[](
            vars.uintLength * _indices.length
        );
        address[] memory addressProps = new address[](
            vars.addressLength * _indices.length
        );

        IOrderBook orderBook = IOrderBook(_orderBookAddress);

        while (vars.i < _indices.length) {
            vars.index = _indices[vars.i];
            (
                address purchaseToken,
                uint256 purchaseTokenAmount,
                address collateralToken,
                address indexToken,
                uint256 sizeDelta,
                bool isLong,
                uint256 triggerPrice,
                bool triggerAboveThreshold, // uint256 executionFee // uint256 blockNumber
                ,

            ) = orderBook.getIncreaseOrder(vars.account, vars.index);

            uintProps[vars.i * vars.uintLength] = uint256(purchaseTokenAmount);
            uintProps[vars.i * vars.uintLength + 1] = uint256(sizeDelta);
            uintProps[vars.i * vars.uintLength + 2] = uint256(isLong ? 1 : 0);
            uintProps[vars.i * vars.uintLength + 3] = uint256(triggerPrice);
            uintProps[vars.i * vars.uintLength + 4] = uint256(
                triggerAboveThreshold ? 1 : 0
            );

            addressProps[vars.i * vars.addressLength] = (purchaseToken);
            addressProps[vars.i * vars.addressLength + 1] = (collateralToken);
            addressProps[vars.i * vars.addressLength + 2] = (indexToken);

            vars.i++;
        }

        return (uintProps, addressProps);
    }

    function getDecreaseOrders(
        address payable _orderBookAddress,
        address _account,
        uint256[] memory _indices
    ) external view returns (uint256[] memory, address[] memory) {
        Vars memory vars = Vars(0, 0, _account, 5, 2);

        uint256[] memory uintProps = new uint256[](
            vars.uintLength * _indices.length
        );
        address[] memory addressProps = new address[](
            vars.addressLength * _indices.length
        );

        IOrderBook orderBook = IOrderBook(_orderBookAddress);

        while (vars.i < _indices.length) {
            vars.index = _indices[vars.i];
            (
                address collateralToken,
                uint256 collateralDelta,
                address indexToken,
                uint256 sizeDelta,
                bool isLong,
                uint256 triggerPrice,
                bool triggerAboveThreshold, // uint256 executionFee // uint256 blockNumber
                ,

            ) = orderBook.getDecreaseOrder(vars.account, vars.index);

            uintProps[vars.i * vars.uintLength] = uint256(collateralDelta);
            uintProps[vars.i * vars.uintLength + 1] = uint256(sizeDelta);
            uintProps[vars.i * vars.uintLength + 2] = uint256(isLong ? 1 : 0);
            uintProps[vars.i * vars.uintLength + 3] = uint256(triggerPrice);
            uintProps[vars.i * vars.uintLength + 4] = uint256(
                triggerAboveThreshold ? 1 : 0
            );

            addressProps[vars.i * vars.addressLength] = (collateralToken);
            addressProps[vars.i * vars.addressLength + 1] = (indexToken);

            vars.i++;
        }

        return (uintProps, addressProps);
    }

    function getSwapOrders(
        address payable _orderBookAddress,
        address _account,
        uint256[] memory _indices
    ) external view returns (uint256[] memory, address[] memory) {
        Vars memory vars = Vars(0, 0, _account, 5, 3);

        uint256[] memory uintProps = new uint256[](
            vars.uintLength * _indices.length
        );
        address[] memory addressProps = new address[](
            vars.addressLength * _indices.length
        );

        IOrderBook orderBook = IOrderBook(_orderBookAddress);

        while (vars.i < _indices.length) {
            vars.index = _indices[vars.i];
            (
                address path0,
                address path1,
                address path2,
                uint256 amountIn,
                uint256 minOut,
                uint256 triggerRatio,
                bool triggerAboveThreshold,
                bool shouldUnwrap, // uint256 executionFee // uint256 blockNumber
                ,

            ) = orderBook.getSwapOrder(vars.account, vars.index);

            uintProps[vars.i * vars.uintLength] = uint256(amountIn);
            uintProps[vars.i * vars.uintLength + 1] = uint256(minOut);
            uintProps[vars.i * vars.uintLength + 2] = uint256(triggerRatio);
            uintProps[vars.i * vars.uintLength + 3] = uint256(
                triggerAboveThreshold ? 1 : 0
            );
            uintProps[vars.i * vars.uintLength + 4] = uint256(
                shouldUnwrap ? 1 : 0
            );

            addressProps[vars.i * vars.addressLength] = (path0);
            addressProps[vars.i * vars.addressLength + 1] = (path1);
            addressProps[vars.i * vars.addressLength + 2] = (path2);

            vars.i++;
        }

        return (uintProps, addressProps);
    }
}
        

contracts/dependencies/openzeppelin/contracts/SafeMath.sol

// SPDX-License-Identifier: MIT

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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b)
        internal
        pure
        returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b)
        internal
        pure
        returns (bool, uint256)
    {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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;
    }
}
          

contracts/interfaces/IOrderBook.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

interface IOrderBook {
    event CreateIncreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address purchaseToken,
        uint256 purchaseTokenAmount,
        address collateralToken,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee,
        uint256 blockNumber
    );
    event CancelIncreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address purchaseToken,
        uint256 purchaseTokenAmount,
        address collateralToken,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee
    );
    event ExecuteIncreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address purchaseToken,
        uint256 purchaseTokenAmount,
        address collateralToken,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee,
        uint256 executionPrice
    );
    event UpdateIncreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address collateralToken,
        address indexToken,
        bool isLong,
        uint256 sizeDelta,
        uint256 triggerPrice,
        bool triggerAboveThreshold
    );
    event CreateDecreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address collateralToken,
        uint256 collateralDelta,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee,
        uint256 blockNumber
    );
    event CancelDecreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address collateralToken,
        uint256 collateralDelta,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee
    );
    event ExecuteDecreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address collateralToken,
        uint256 collateralDelta,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold,
        uint256 executionFee,
        uint256 executionPrice
    );
    event UpdateDecreaseOrder(
        address indexed account,
        uint256 orderIndex,
        address collateralToken,
        uint256 collateralDelta,
        address indexToken,
        uint256 sizeDelta,
        bool isLong,
        uint256 triggerPrice,
        bool triggerAboveThreshold
    );
    event CreateSwapOrder(
        address indexed account,
        uint256 orderIndex,
        address[] path,
        uint256 amountIn,
        uint256 minOut,
        uint256 triggerRatio,
        bool triggerAboveThreshold,
        bool shouldUnwrap,
        uint256 executionFee,
        uint256 blockNumber
    );
    event CancelSwapOrder(
        address indexed account,
        uint256 orderIndex,
        address[] path,
        uint256 amountIn,
        uint256 minOut,
        uint256 triggerRatio,
        bool triggerAboveThreshold,
        bool shouldUnwrap,
        uint256 executionFee
    );
    event UpdateSwapOrder(
        address indexed account,
        uint256 ordexIndex,
        address[] path,
        uint256 amountIn,
        uint256 minOut,
        uint256 triggerRatio,
        bool triggerAboveThreshold,
        bool shouldUnwrap,
        uint256 executionFee
    );
    event ExecuteSwapOrder(
        address indexed account,
        uint256 orderIndex,
        address[] path,
        uint256 amountIn,
        uint256 minOut,
        uint256 amountOut,
        uint256 triggerRatio,
        bool triggerAboveThreshold,
        bool shouldUnwrap,
        uint256 executionFee
    );

    event Initialize(
        address router,
        address vault,
        address weth,
        address usdph,
        uint256 minExecutionFee,
        uint256 minPurchaseTokenAmountUsd
    );
    event UpdateMinExecutionFee(uint256 minExecutionFee);
    event UpdateMinPurchaseTokenAmountUsd(uint256 minPurchaseTokenAmountUsd);

    function getSwapOrder(
        address _account,
        uint256 _orderIndex
    )
        external
        view
        returns (
            address path0,
            address path1,
            address path2,
            uint256 amountIn,
            uint256 minOut,
            uint256 triggerRatio,
            bool triggerAboveThreshold,
            bool shouldUnwrap,
            uint256 executionFee,
            uint256 blockNumber
        );

    function getIncreaseOrder(
        address _account,
        uint256 _orderIndex
    )
        external
        view
        returns (
            address purchaseToken,
            uint256 purchaseTokenAmount,
            address collateralToken,
            address indexToken,
            uint256 sizeDelta,
            bool isLong,
            uint256 triggerPrice,
            bool triggerAboveThreshold,
            uint256 executionFee,
            uint256 blockNumber
        );

    function getDecreaseOrder(
        address _account,
        uint256 _orderIndex
    )
        external
        view
        returns (
            address collateralToken,
            uint256 collateralDelta,
            address indexToken,
            uint256 sizeDelta,
            bool isLong,
            uint256 triggerPrice,
            bool triggerAboveThreshold,
            uint256 executionFee,
            uint256 blockNumber
        );

    function executeSwapOrder(address, uint256, address payable) external;

    function executeDecreaseOrder(address, uint256, address payable) external;

    function executeIncreaseOrder(address, uint256, address payable) external;
}
          

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"istanbul"}
              

Contract ABI

[{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"address[]","name":"","internalType":"address[]"}],"name":"getDecreaseOrders","inputs":[{"type":"address","name":"_orderBookAddress","internalType":"address payable"},{"type":"address","name":"_account","internalType":"address"},{"type":"uint256[]","name":"_indices","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"address[]","name":"","internalType":"address[]"}],"name":"getIncreaseOrders","inputs":[{"type":"address","name":"_orderBookAddress","internalType":"address payable"},{"type":"address","name":"_account","internalType":"address"},{"type":"uint256[]","name":"_indices","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"address[]","name":"","internalType":"address[]"}],"name":"getSwapOrders","inputs":[{"type":"address","name":"_orderBookAddress","internalType":"address payable"},{"type":"address","name":"_account","internalType":"address"},{"type":"uint256[]","name":"_indices","internalType":"uint256[]"}]}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50610e0a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630ce933b9146100465780632e1814691461019b578063c38ccd5014610257575b600080fd5b6101026004803603606081101561005c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561009057600080fd5b8201836020820111156100a257600080fd5b803590602001918460208302840111640100000000831117156100c457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610313945050505050565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561014657818101518382015260200161012e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561018557818101518382015260200161016d565b5050505090500194505050505060405180910390f35b610102600480360360608110156101b157600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101e557600080fd5b8201836020820111156101f757600080fd5b8035906020019184602083028401116401000000008311171561021957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610682945050505050565b6101026004803603606081101561026d57600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460208302840111640100000000831117156102d557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a2b945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600281525090506000845182606001510267ffffffffffffffff8111801561036e57600080fd5b50604051908082528060200260200182016040528015610398578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff811180156103bb57600080fd5b506040519080825280602002602001820160405280156103e5578160200160208202803683370190505b509050875b865184511015610674578684600001518151811061040457fe5b60200260200101518460200181815250506000806000806000806000876001600160a01b031663026032ee8c604001518d602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d6101208110156104a957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050509650965096509650965096509650858a8c606001518d60000151028151811061053157fe5b602002602001018181525050838a8c606001518d60000151026001018151811061055757fe5b6020026020010181815250508261056f576000610572565b60015b60ff168a8c606001518d60000151026002018151811061058e57fe5b602002602001018181525050818a8c606001518d6000015102600301815181106105b457fe5b602002602001018181525050806105cc5760006105cf565b60015b60ff168a8c606001518d6000015102600401815181106105eb57fe5b60200260200101818152505086898c608001518d60000151028151811061060e57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505084898c608001518d60000151026001018151811061064857fe5b6001600160a01b0390921660209283029190910190910152505088516001018952506103ea9350505050565b509097909650945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600381525090506000845182606001510267ffffffffffffffff811180156106dd57600080fd5b50604051908082528060200260200182016040528015610707578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff8111801561072a57600080fd5b50604051908082528060200260200182016040528015610754578160200160208202803683370190505b509050875b865184511015610674578684600001518151811061077357fe5b6020026020010151846020018181525050600080600080600080600080886001600160a01b031663d0d40cd68d604001518e602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101406040518083038186803b1580156107ee57600080fd5b505afa158015610802573d6000803e3d6000fd5b505050506040513d61014081101561081957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505097509750975097509750975097509750848b8d606001518e6000015102815181106108ad57fe5b602002602001018181525050838b8d606001518e6000015102600101815181106108d357fe5b602002602001018181525050828b8d606001518e6000015102600201815181106108f957fe5b60200260200101818152505081610911576000610914565b60015b60ff168b8d606001518e60000151026003018151811061093057fe5b6020026020010181815250508061094857600061094b565b60015b60ff168b8d606001518e60000151026004018151811061096757fe5b602002602001018181525050878a8d608001518e60000151028151811061098a57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050868a8d608001518e6000015102600101815181106109c457fe5b60200260200101906001600160a01b031690816001600160a01b031681525050858a8d608001518e6000015102600201815181106109fe57fe5b6001600160a01b0390921660209283029190910190910152505089516001018a5250610759945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600381525090506000845182606001510267ffffffffffffffff81118015610a8657600080fd5b50604051908082528060200260200182016040528015610ab0578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff81118015610ad357600080fd5b50604051908082528060200260200182016040528015610afd578160200160208202803683370190505b509050875b8651845110156106745786846000015181518110610b1c57fe5b6020026020010151846020018181525050600080600080600080600080886001600160a01b031663d3bab1d18d604001518e602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101406040518083038186803b158015610b9757600080fd5b505afa158015610bab573d6000803e3d6000fd5b505050506040513d610140811015610bc257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505097509750975097509750975097509750868b8d606001518e600001510281518110610c5657fe5b602002602001018181525050838b8d606001518e600001510260010181518110610c7c57fe5b60200260200101818152505082610c94576000610c97565b60015b60ff168b8d606001518e600001510260020181518110610cb357fe5b602002602001018181525050818b8d606001518e600001510260030181518110610cd957fe5b60200260200101818152505080610cf1576000610cf4565b60015b60ff168b8d606001518e600001510260040181518110610d1057fe5b602002602001018181525050878a8d608001518e600001510281518110610d3357fe5b60200260200101906001600160a01b031690816001600160a01b031681525050858a8d608001518e600001510260010181518110610d6d57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050848a8d608001518e600001510260020181518110610da757fe5b6001600160a01b0390921660209283029190910190910152505089516001018a5250610b0294505050505056fea2646970667358221220cf7b635a5124462107ec2725d9f5dca06ad9b89761cfb552ff3db2445187150264736f6c63430007060033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630ce933b9146100465780632e1814691461019b578063c38ccd5014610257575b600080fd5b6101026004803603606081101561005c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561009057600080fd5b8201836020820111156100a257600080fd5b803590602001918460208302840111640100000000831117156100c457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610313945050505050565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561014657818101518382015260200161012e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561018557818101518382015260200161016d565b5050505090500194505050505060405180910390f35b610102600480360360608110156101b157600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101e557600080fd5b8201836020820111156101f757600080fd5b8035906020019184602083028401116401000000008311171561021957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610682945050505050565b6101026004803603606081101561026d57600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460208302840111640100000000831117156102d557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a2b945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600281525090506000845182606001510267ffffffffffffffff8111801561036e57600080fd5b50604051908082528060200260200182016040528015610398578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff811180156103bb57600080fd5b506040519080825280602002602001820160405280156103e5578160200160208202803683370190505b509050875b865184511015610674578684600001518151811061040457fe5b60200260200101518460200181815250506000806000806000806000876001600160a01b031663026032ee8c604001518d602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d6101208110156104a957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050509650965096509650965096509650858a8c606001518d60000151028151811061053157fe5b602002602001018181525050838a8c606001518d60000151026001018151811061055757fe5b6020026020010181815250508261056f576000610572565b60015b60ff168a8c606001518d60000151026002018151811061058e57fe5b602002602001018181525050818a8c606001518d6000015102600301815181106105b457fe5b602002602001018181525050806105cc5760006105cf565b60015b60ff168a8c606001518d6000015102600401815181106105eb57fe5b60200260200101818152505086898c608001518d60000151028151811061060e57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505084898c608001518d60000151026001018151811061064857fe5b6001600160a01b0390921660209283029190910190910152505088516001018952506103ea9350505050565b509097909650945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600381525090506000845182606001510267ffffffffffffffff811180156106dd57600080fd5b50604051908082528060200260200182016040528015610707578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff8111801561072a57600080fd5b50604051908082528060200260200182016040528015610754578160200160208202803683370190505b509050875b865184511015610674578684600001518151811061077357fe5b6020026020010151846020018181525050600080600080600080600080886001600160a01b031663d0d40cd68d604001518e602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101406040518083038186803b1580156107ee57600080fd5b505afa158015610802573d6000803e3d6000fd5b505050506040513d61014081101561081957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505097509750975097509750975097509750848b8d606001518e6000015102815181106108ad57fe5b602002602001018181525050838b8d606001518e6000015102600101815181106108d357fe5b602002602001018181525050828b8d606001518e6000015102600201815181106108f957fe5b60200260200101818152505081610911576000610914565b60015b60ff168b8d606001518e60000151026003018151811061093057fe5b6020026020010181815250508061094857600061094b565b60015b60ff168b8d606001518e60000151026004018151811061096757fe5b602002602001018181525050878a8d608001518e60000151028151811061098a57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050868a8d608001518e6000015102600101815181106109c457fe5b60200260200101906001600160a01b031690816001600160a01b031681525050858a8d608001518e6000015102600201815181106109fe57fe5b6001600160a01b0390921660209283029190910190910152505089516001018a5250610759945050505050565b60608060006040518060a001604052806000815260200160008152602001866001600160a01b0316815260200160058152602001600381525090506000845182606001510267ffffffffffffffff81118015610a8657600080fd5b50604051908082528060200260200182016040528015610ab0578160200160208202803683370190505b5090506000855183608001510267ffffffffffffffff81118015610ad357600080fd5b50604051908082528060200260200182016040528015610afd578160200160208202803683370190505b509050875b8651845110156106745786846000015181518110610b1c57fe5b6020026020010151846020018181525050600080600080600080600080886001600160a01b031663d3bab1d18d604001518e602001516040518363ffffffff1660e01b815260040180836001600160a01b03168152602001828152602001925050506101406040518083038186803b158015610b9757600080fd5b505afa158015610bab573d6000803e3d6000fd5b505050506040513d610140811015610bc257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505097509750975097509750975097509750868b8d606001518e600001510281518110610c5657fe5b602002602001018181525050838b8d606001518e600001510260010181518110610c7c57fe5b60200260200101818152505082610c94576000610c97565b60015b60ff168b8d606001518e600001510260020181518110610cb357fe5b602002602001018181525050818b8d606001518e600001510260030181518110610cd957fe5b60200260200101818152505080610cf1576000610cf4565b60015b60ff168b8d606001518e600001510260040181518110610d1057fe5b602002602001018181525050878a8d608001518e600001510281518110610d3357fe5b60200260200101906001600160a01b031690816001600160a01b031681525050858a8d608001518e600001510260010181518110610d6d57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050848a8d608001518e600001510260020181518110610da757fe5b6001600160a01b0390921660209283029190910190910152505089516001018a5250610b0294505050505056fea2646970667358221220cf7b635a5124462107ec2725d9f5dca06ad9b89761cfb552ff3db2445187150264736f6c63430007060033