Contract Address Details

0x6C81F37b6d914027C48630F876a874ed6e13119E

Contract Name
Treasury
Creator
0xec251b–784eea at 0x92a432–af592f
Balance
0 REI ( )
Tokens
Fetching tokens...
Transactions
259 Transactions
Transfers
364 Transfers
Gas Used
190,978,297
Last Balance Update
20177834
Contract name:
Treasury




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
Verified at
2022-12-01T07:29:45.738253Z

Contract source code

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}
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;
    }
}
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);
}
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);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(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);
            }
        }
    }
}

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");
        }
    }
}
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

library Babylonian {
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

contract Operator is Context, Ownable {
    address private _operator;

    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    constructor() internal {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    function isOperator() public view returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(newOperator_ != address(0), "operator: zero address given for new operator");
        emit OperatorTransferred(address(0), newOperator_);
        _operator = newOperator_;
    }
}
contract ContractGuard {
    mapping(uint256 => mapping(address => bool)) private _status;

    function checkSameOriginReentranted() internal view returns (bool) {
        return _status[block.number][tx.origin];
    }

    function checkSameSenderReentranted() internal view returns (bool) {
        return _status[block.number][msg.sender];
    }

    modifier onlyOneBlock() {
        require(!checkSameOriginReentranted(), "ContractGuard: one block, one function");
        require(!checkSameSenderReentranted(), "ContractGuard: one block, one function");

        _;

        _status[block.number][tx.origin] = true;
        _status[block.number][msg.sender] = true;
    }
}

interface IBasisAsset {
    function mint(address recipient, uint256 amount) external returns (bool);

    function burn(uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;

    function isOperator() external returns (bool);

    function operator() external view returns (address);

    function transferOperator(address newOperator_) external;
}

interface IOracle {
    function update() external;

    function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut);

    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut);
}
interface IMasonry {
    function balanceOf(address _mason) external view returns (uint256);

    function earned(address _mason) external view returns (uint256);

    function canWithdraw(address _mason) external view returns (bool);

    function canClaimReward(address _mason) external view returns (bool);

    function epoch() external view returns (uint256);

    function nextEpochPoint() external view returns (uint256);

    function getNavaPrice() external view returns (uint256);

    function setOperator(address _operator) external;

    function setLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external;

    function stake(uint256 _amount) external;

    function withdraw(uint256 _amount) external;

    function exit() external;

    function claimReward() external;

    function allocateSeigniorage(uint256 _amount) external;

    function governanceRecoverUnsupported(address _token, uint256 _amount, address _to) external;
}

contract Treasury is ContractGuard {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    /* ========= CONSTANT VARIABLES ======== */

    uint256 public constant PERIOD = 6 hours;

    /* ========== STATE VARIABLES ========== */

    // governance
    address public operator;

    // flags
    bool public initialized = false;

    // epoch
    uint256 public startTime;
    uint256 public epoch = 0;
    uint256 public epochSupplyContractionLeft = 0;

    // exclusions from total supply
    address[] public excludedFromTotalSupply = [
        address(0xb9F9993f0D4A63344D9571387E18f659B6AE5447)// NavaGenesisPool
        // address(0xb9F9993f0D4A63344D9571387E18f659B6AE5447)// new NavaRewardPool
        // address(0xb9F9993f0D4A63344D9571387E18f659B6AE5447) // old NavaRewardPool
    ];

    // core components
    address public nava;
    address public nbond;
    address public nshare;

    address public masonry;
    address public navaOracle;

    // price
    uint256 public navaPriceOne;
    uint256 public navaPriceCeiling;

    uint256 public seigniorageSaved;

    uint256[] public supplyTiers;
    uint256[] public maxExpansionTiers;

    uint256 public maxSupplyExpansionPercent;
    uint256 public bondDepletionFloorPercent;
    uint256 public seigniorageExpansionFloorPercent;
    uint256 public maxSupplyContractionPercent;
    uint256 public maxDebtRatioPercent;

    // 28 first epochs (1 week) with 4.5% expansion regardless of NAVA price
    uint256 public bootstrapEpochs;
    uint256 public bootstrapSupplyExpansionPercent;

    /* =================== Added variables =================== */
    uint256 public previousEpochNavaPrice;
    uint256 public maxDiscountRate; // when purchasing bond
    uint256 public maxPremiumRate; // when redeeming bond
    uint256 public discountPercent;
    uint256 public premiumThreshold;
    uint256 public premiumPercent;
    uint256 public mintingFactorForPayingDebt; // print extra NAVA during debt phase

    address public daoFund;
    uint256 public daoFundSharedPercent;

    address public devFund;
    uint256 public devFundSharedPercent;

    /* =================== Events =================== */

    event Initialized(address indexed executor, uint256 at);
    event BurnedBonds(address indexed from, uint256 bondAmount);
    event RedeemedBonds(address indexed from, uint256 navaAmount, uint256 bondAmount);
    event BoughtBonds(address indexed from, uint256 navaAmount, uint256 bondAmount);
    event TreasuryFunded(uint256 timestamp, uint256 seigniorage);
    event MasonryFunded(uint256 timestamp, uint256 seigniorage);
    event DaoFundFunded(uint256 timestamp, uint256 seigniorage);
    event DevFundFunded(uint256 timestamp, uint256 seigniorage);

    /* =================== Modifier =================== */

    modifier onlyOperator() {
        require(operator == msg.sender, "Treasury: caller is not the operator");
        _;
    }

    modifier checkCondition {
        require(now >= startTime, "Treasury: not started yet");

        _;
    }

    modifier checkEpoch {
        require(now >= nextEpochPoint(), "Treasury: not opened yet");

        _;

        epoch = epoch.add(1);
        epochSupplyContractionLeft = (getNavaPrice() > navaPriceCeiling) ? 0 : getNavaCirculatingSupply().mul(maxSupplyContractionPercent).div(10000);
    }

    modifier checkOperator {
        require(
            IBasisAsset(nava).operator() == address(this) &&
                IBasisAsset(nbond).operator() == address(this) &&
                IBasisAsset(nshare).operator() == address(this) &&
                Operator(masonry).operator() == address(this),
            "Treasury: need more permission"
        );

        _;
    }

    modifier notInitialized {
        require(!initialized, "Treasury: already initialized");

        _;
    }

    /* ========== VIEW FUNCTIONS ========== */

    function isInitialized() public view returns (bool) {
        return initialized;
    }

    // epoch
    function nextEpochPoint() public view returns (uint256) {
        return startTime.add(epoch.mul(PERIOD));
    }

    // oracle
    function getNavaPrice() public view returns (uint256 navaPrice) {
        try IOracle(navaOracle).consult(nava, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult NAVA price from the oracle");
        }
    }

    function getNavaUpdatedPrice() public view returns (uint256 _navaPrice) {
        try IOracle(navaOracle).twap(nava, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult NAVA price from the oracle");
        }
    }

    // budget
    function getReserve() public view returns (uint256) {
        return seigniorageSaved;
    }

    function getBurnableNavaLeft() public view returns (uint256 _burnableNavaLeft) {
        uint256 _navaPrice = getNavaPrice();
        if (_navaPrice <= navaPriceOne) {
            uint256 _navaSupply = getNavaCirculatingSupply();
            uint256 _bondMaxSupply = _navaSupply.mul(maxDebtRatioPercent).div(10000);
            uint256 _bondSupply = IERC20(nbond).totalSupply();
            if (_bondMaxSupply > _bondSupply) {
                uint256 _maxMintableBond = _bondMaxSupply.sub(_bondSupply);
                uint256 _maxBurnableNava = _maxMintableBond.mul(_navaPrice).div(1e18);
                _burnableNavaLeft = Math.min(epochSupplyContractionLeft, _maxBurnableNava);
            }
        }
    }

    function getRedeemableBonds() public view returns (uint256 _redeemableBonds) {
        uint256 _navaPrice = getNavaPrice();
        if (_navaPrice > navaPriceCeiling) {
            uint256 _totalNava = IERC20(nava).balanceOf(address(this));
            uint256 _rate = getBondPremiumRate();
            if (_rate > 0) {
                _redeemableBonds = _totalNava.mul(1e18).div(_rate);
            }
        }
    }

    function getBondDiscountRate() public view returns (uint256 _rate) {
        uint256 _navaPrice = getNavaPrice();
        if (_navaPrice <= navaPriceOne) {
            if (discountPercent == 0) {
                // no discount
                _rate = navaPriceOne;
            } else {
                uint256 _bondAmount = navaPriceOne.mul(1e18).div(_navaPrice); // to burn 1 NAVA
                uint256 _discountAmount = _bondAmount.sub(navaPriceOne).mul(discountPercent).div(10000);
                _rate = navaPriceOne.add(_discountAmount);
                if (maxDiscountRate > 0 && _rate > maxDiscountRate) {
                    _rate = maxDiscountRate;
                }
            }
        }
    }

    function getBondPremiumRate() public view returns (uint256 _rate) {
        uint256 _navaPrice = getNavaPrice();
        if (_navaPrice > navaPriceCeiling) {
            uint256 _navaPricePremiumThreshold = navaPriceOne.mul(premiumThreshold).div(100);
            if (_navaPrice >= _navaPricePremiumThreshold) {
                //Price > 1.10
                uint256 _premiumAmount = _navaPrice.sub(navaPriceOne).mul(premiumPercent).div(10000);
                _rate = navaPriceOne.add(_premiumAmount);
                if (maxPremiumRate > 0 && _rate > maxPremiumRate) {
                    _rate = maxPremiumRate;
                }
            } else {
                // no premium bonus
                _rate = navaPriceOne;
            }
        }
    }

    /* ========== GOVERNANCE ========== */

    function initialize(
        address _nava,
        address _nbond,
        address _nshare,
        address _navaOracle,
        address _masonry,
        uint256 _startTime
    ) public notInitialized {
        nava = _nava;
        nbond = _nbond;
        nshare = _nshare;
        navaOracle = _navaOracle;
        masonry = _masonry;
        startTime = _startTime;

        navaPriceOne = 1*10**18;
        navaPriceCeiling = navaPriceOne.mul(101).div(100);

        // Dynamic max expansion percent
        supplyTiers = [0 ether, 500000 ether, 2000000 ether, 4000000 ether, 8000000 ether, 20000000 ether];
        maxExpansionTiers = [300, 250, 200, 150, 125, 100];

        maxSupplyExpansionPercent = 400; // Upto 4.0% supply for expansion

        bondDepletionFloorPercent = 10000; // 100% of Bond supply for depletion floor
        seigniorageExpansionFloorPercent = 3500; // At least 35% of expansion reserved for masonry
        maxSupplyContractionPercent = 300; // Upto 3.0% supply for contraction (to burn NAVA and mint nBOND)
        maxDebtRatioPercent = 3500; // Upto 35% supply of nBOND to purchase

        premiumThreshold = 110;
        premiumPercent = 7000;

        // First 28 epochs with 4.5% expansion
        bootstrapEpochs = 28;
        bootstrapSupplyExpansionPercent = 300;

        // set seigniorageSaved to it's balance
        seigniorageSaved = IERC20(nava).balanceOf(address(this));

        initialized = true;
        operator = msg.sender;
        emit Initialized(msg.sender, block.number);
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    function setMasonry(address _masonry) external onlyOperator {
        masonry = _masonry;
    }

    function setNavaOracle(address _navaOracle) external onlyOperator {
        navaOracle = _navaOracle;
    }

    function setNavaPriceCeiling(uint256 _navaPriceCeiling) external onlyOperator {
        require(_navaPriceCeiling >= navaPriceOne && _navaPriceCeiling <= navaPriceOne.mul(120).div(100), "out of range"); // [$1.0, $1.2]
        navaPriceCeiling = _navaPriceCeiling;
    }

    function setMaxSupplyExpansionPercents(uint256 _maxSupplyExpansionPercent) external onlyOperator {
        require(_maxSupplyExpansionPercent >= 10 && _maxSupplyExpansionPercent <= 1000, "_maxSupplyExpansionPercent: out of range"); // [0.1%, 10%]
        maxSupplyExpansionPercent = _maxSupplyExpansionPercent;
    }

    function setSupplyTiersEntry(uint8 _index, uint256 _value) external onlyOperator returns (bool) {
        require(_index >= 0, "Index has to be higher than 0");
        require(_index < 6, "Index has to be lower than count of tiers");
        if (_index > 0) {
            require(_value > supplyTiers[_index - 1]);
        }
        if (_index < 5) {
            require(_value < supplyTiers[_index + 1]);
        }
        supplyTiers[_index] = _value;
        return true;
    }

    function setMaxExpansionTiersEntry(uint8 _index, uint256 _value) external onlyOperator returns (bool) {
        require(_index >= 0, "Index has to be higher than 0");
        require(_index < 6, "Index has to be lower than count of tiers");
        require(_value >= 10 && _value <= 1000, "_value: out of range"); // [0.1%, 10%]
        maxExpansionTiers[_index] = _value;
        return true;
    }

    function setBondDepletionFloorPercent(uint256 _bondDepletionFloorPercent) external onlyOperator {
        require(_bondDepletionFloorPercent >= 500 && _bondDepletionFloorPercent <= 10000, "out of range"); // [5%, 100%]
        bondDepletionFloorPercent = _bondDepletionFloorPercent;
    }

    function setMaxSupplyContractionPercent(uint256 _maxSupplyContractionPercent) external onlyOperator {
        require(_maxSupplyContractionPercent >= 100 && _maxSupplyContractionPercent <= 1500, "out of range"); // [0.1%, 15%]
        maxSupplyContractionPercent = _maxSupplyContractionPercent;
    }

    function setMaxDebtRatioPercent(uint256 _maxDebtRatioPercent) external onlyOperator {
        require(_maxDebtRatioPercent >= 1000 && _maxDebtRatioPercent <= 10000, "out of range"); // [10%, 100%]
        maxDebtRatioPercent = _maxDebtRatioPercent;
    }

    function setBootstrap(uint256 _bootstrapEpochs, uint256 _bootstrapSupplyExpansionPercent) external onlyOperator {
        require(_bootstrapEpochs <= 120, "_bootstrapEpochs: out of range"); // <= 1 month
        require(_bootstrapSupplyExpansionPercent >= 100 && _bootstrapSupplyExpansionPercent <= 1000, "_bootstrapSupplyExpansionPercent: out of range"); // [1%, 10%]
        bootstrapEpochs = _bootstrapEpochs;
        bootstrapSupplyExpansionPercent = _bootstrapSupplyExpansionPercent;
    }

    function setExtraFunds(
        address _daoFund,
        uint256 _daoFundSharedPercent,
        address _devFund,
        uint256 _devFundSharedPercent
    ) external onlyOperator {
        require(_daoFund != address(0), "zero");
        require(_daoFundSharedPercent <= 3000, "out of range"); // <= 30%
        require(_devFund != address(0), "zero");
        require(_devFundSharedPercent <= 1000, "out of range"); // <= 10%
        daoFund = _daoFund;
        daoFundSharedPercent = _daoFundSharedPercent;
        devFund = _devFund;
        devFundSharedPercent = _devFundSharedPercent;
    }

    function setMaxDiscountRate(uint256 _maxDiscountRate) external onlyOperator {
        maxDiscountRate = _maxDiscountRate;
    }

    function setMaxPremiumRate(uint256 _maxPremiumRate) external onlyOperator {
        maxPremiumRate = _maxPremiumRate;
    }

    function setDiscountPercent(uint256 _discountPercent) external onlyOperator {
        require(_discountPercent <= 20000, "_discountPercent is over 200%");
        discountPercent = _discountPercent;
    }

    function setPremiumThreshold(uint256 _premiumThreshold) external onlyOperator {
        require(_premiumThreshold >= navaPriceCeiling, "_premiumThreshold exceeds navaPriceCeiling");
        require(_premiumThreshold <= 150, "_premiumThreshold is higher than 1.5");
        premiumThreshold = _premiumThreshold;
    }

    function setPremiumPercent(uint256 _premiumPercent) external onlyOperator {
        require(_premiumPercent <= 20000, "_premiumPercent is over 200%");
        premiumPercent = _premiumPercent;
    }

    function setMintingFactorForPayingDebt(uint256 _mintingFactorForPayingDebt) external onlyOperator {
        require(_mintingFactorForPayingDebt >= 10000 && _mintingFactorForPayingDebt <= 20000, "_mintingFactorForPayingDebt: out of range"); // [100%, 200%]
        mintingFactorForPayingDebt = _mintingFactorForPayingDebt;
    }

    /* ========== MUTABLE FUNCTIONS ========== */

    function _updateNavaPrice() internal {
        try IOracle(navaOracle).update() {} catch {}
    }

    function getNavaCirculatingSupply() public view returns (uint256) {
        IERC20 navaErc20 = IERC20(nava);
        uint256 totalSupply = navaErc20.totalSupply();
        uint256 balanceExcluded = 0;
        for (uint8 entryId = 0; entryId < excludedFromTotalSupply.length; ++entryId) {
            balanceExcluded = balanceExcluded.add(navaErc20.balanceOf(excludedFromTotalSupply[entryId]));
        }
        return totalSupply.sub(balanceExcluded);
    }

    function buyBonds(uint256 _navaAmount, uint256 targetPrice) external onlyOneBlock checkCondition checkOperator {
        require(_navaAmount > 0, "Treasury: cannot purchase bonds with zero amount");

        uint256 navaPrice = getNavaPrice();
        require(navaPrice == targetPrice, "Treasury: NAVA price moved");
        require(
            navaPrice < navaPriceOne, // price < $1
            "Treasury: navaPrice not eligible for bond purchase"
        );

        require(_navaAmount <= epochSupplyContractionLeft, "Treasury: not enough bond left to purchase");

        uint256 _rate = getBondDiscountRate();
        require(_rate > 0, "Treasury: invalid bond rate");

        uint256 _bondAmount = _navaAmount.mul(_rate).div(1e18);
        uint256 navaSupply = getNavaCirculatingSupply();
        uint256 newBondSupply = IERC20(nbond).totalSupply().add(_bondAmount);
        require(newBondSupply <= navaSupply.mul(maxDebtRatioPercent).div(10000), "over max debt ratio");

        IBasisAsset(nava).burnFrom(msg.sender, _navaAmount);
        IBasisAsset(nbond).mint(msg.sender, _bondAmount);

        epochSupplyContractionLeft = epochSupplyContractionLeft.sub(_navaAmount);
        _updateNavaPrice();

        emit BoughtBonds(msg.sender, _navaAmount, _bondAmount);
    }

    function redeemBonds(uint256 _bondAmount, uint256 targetPrice) external onlyOneBlock checkCondition checkOperator {
        require(_bondAmount > 0, "Treasury: cannot redeem bonds with zero amount");

        uint256 navaPrice = getNavaPrice();
        require(navaPrice == targetPrice, "Treasury: NAVA price moved");
        require(
            navaPrice > navaPriceCeiling, // price > $1.01
            "Treasury: navaPrice not eligible for bond purchase"
        );

        uint256 _rate = getBondPremiumRate();
        require(_rate > 0, "Treasury: invalid bond rate");

        uint256 _navaAmount = _bondAmount.mul(_rate).div(1e18);
        require(IERC20(nava).balanceOf(address(this)) >= _navaAmount, "Treasury: treasury has no more budget");

        seigniorageSaved = seigniorageSaved.sub(Math.min(seigniorageSaved, _navaAmount));

        IBasisAsset(nbond).burnFrom(msg.sender, _bondAmount);
        IERC20(nava).safeTransfer(msg.sender, _navaAmount);

        _updateNavaPrice();

        emit RedeemedBonds(msg.sender, _navaAmount, _bondAmount);
    }

    function _sendToMasonry(uint256 _amount) internal {
        IBasisAsset(nava).mint(address(this), _amount);

        uint256 _daoFundSharedAmount = 0;
        if (daoFundSharedPercent > 0) {
            _daoFundSharedAmount = _amount.mul(daoFundSharedPercent).div(10000);
            IERC20(nava).transfer(daoFund, _daoFundSharedAmount);
            emit DaoFundFunded(now, _daoFundSharedAmount);
        }

        uint256 _devFundSharedAmount = 0;
        if (devFundSharedPercent > 0) {
            _devFundSharedAmount = _amount.mul(devFundSharedPercent).div(10000);
            IERC20(nava).transfer(devFund, _devFundSharedAmount);
            emit DevFundFunded(now, _devFundSharedAmount);
        }

        _amount = _amount.sub(_daoFundSharedAmount).sub(_devFundSharedAmount);

        IERC20(nava).safeApprove(masonry, 0);
        IERC20(nava).safeApprove(masonry, _amount);
        IMasonry(masonry).allocateSeigniorage(_amount);
        emit MasonryFunded(now, _amount);
    }

    function _calculateMaxSupplyExpansionPercent(uint256 _navaSupply) internal returns (uint256) {
        for (uint8 tierId = 5; tierId >= 0; --tierId) {
            if (_navaSupply >= supplyTiers[tierId]) {
                maxSupplyExpansionPercent = maxExpansionTiers[tierId];
                break;
            }
        }
        return maxSupplyExpansionPercent;
    }

    function allocateSeigniorage() external onlyOneBlock checkCondition checkEpoch checkOperator {
        _updateNavaPrice();
        previousEpochNavaPrice = getNavaPrice();
        uint256 navaSupply = getNavaCirculatingSupply().sub(seigniorageSaved);
        if (epoch < bootstrapEpochs) {
            // 28 first epochs with 4.5% expansion
            _sendToMasonry(navaSupply.mul(bootstrapSupplyExpansionPercent).div(10000));
        } else {
            if (previousEpochNavaPrice > navaPriceCeiling) {
                // Expansion ($NAVA Price > 1 $FTM): there is some seigniorage to be allocated
                uint256 bondSupply = IERC20(nbond).totalSupply();
                uint256 _percentage = previousEpochNavaPrice.sub(navaPriceOne);
                uint256 _savedForBond;
                uint256 _savedForMasonry;
                uint256 _mse = _calculateMaxSupplyExpansionPercent(navaSupply).mul(1e14);
                if (_percentage > _mse) {
                    _percentage = _mse;
                }
                if (seigniorageSaved >= bondSupply.mul(bondDepletionFloorPercent).div(10000)) {
                    // saved enough to pay debt, mint as usual rate
                    _savedForMasonry = navaSupply.mul(_percentage).div(1e18);
                } else {
                    // have not saved enough to pay debt, mint more
                    uint256 _seigniorage = navaSupply.mul(_percentage).div(1e18);
                    _savedForMasonry = _seigniorage.mul(seigniorageExpansionFloorPercent).div(10000);
                    _savedForBond = _seigniorage.sub(_savedForMasonry);
                    if (mintingFactorForPayingDebt > 0) {
                        _savedForBond = _savedForBond.mul(mintingFactorForPayingDebt).div(10000);
                    }
                }
                if (_savedForMasonry > 0) {
                    _sendToMasonry(_savedForMasonry);
                }
                if (_savedForBond > 0) {
                    seigniorageSaved = seigniorageSaved.add(_savedForBond);
                    IBasisAsset(nava).mint(address(this), _savedForBond);
                    emit TreasuryFunded(now, _savedForBond);
                }
            }
        }
    }

    function governanceRecoverUnsupported(
        IERC20 _token,
        uint256 _amount,
        address _to
    ) external onlyOperator {
        // do not allow to drain core tokens
        require(address(_token) != address(nava), "nava");
        require(address(_token) != address(nbond), "bond");
        require(address(_token) != address(nshare), "share");
        _token.safeTransfer(_to, _amount);
    }

    function masonrySetOperator(address _operator) external onlyOperator {
        IMasonry(masonry).setOperator(_operator);
    }

    function masonrySetLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external onlyOperator {
        IMasonry(masonry).setLockUp(_withdrawLockupEpochs, _rewardLockupEpochs);
    }

    function masonryAllocateSeigniorage(uint256 amount) external onlyOperator {
        IMasonry(masonry).allocateSeigniorage(amount);
    }

    function masonryGovernanceRecoverUnsupported(
        address _token,
        uint256 _amount,
        address _to
    ) external onlyOperator {
        IMasonry(masonry).governanceRecoverUnsupported(_token, _amount, _to);
    }
}
        
>

Contract ABI

[{"type":"event","name":"BoughtBonds","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"uint256","name":"navaAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"bondAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BurnedBonds","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"uint256","name":"bondAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DaoFundFunded","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"seigniorage","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DevFundFunded","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"seigniorage","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"address","name":"executor","internalType":"address","indexed":true},{"type":"uint256","name":"at","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"MasonryFunded","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"seigniorage","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RedeemedBonds","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"uint256","name":"navaAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"bondAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TreasuryFunded","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"seigniorage","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PERIOD","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"allocateSeigniorage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bondDepletionFloorPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bootstrapEpochs","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bootstrapSupplyExpansionPercent","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyBonds","inputs":[{"type":"uint256","name":"_navaAmount","internalType":"uint256"},{"type":"uint256","name":"targetPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"daoFund","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"daoFundSharedPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devFund","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"devFundSharedPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"discountPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"epoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"epochSupplyContractionLeft","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"excludedFromTotalSupply","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_rate","internalType":"uint256"}],"name":"getBondDiscountRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_rate","internalType":"uint256"}],"name":"getBondPremiumRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_burnableNavaLeft","internalType":"uint256"}],"name":"getBurnableNavaLeft","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNavaCirculatingSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"navaPrice","internalType":"uint256"}],"name":"getNavaPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_navaPrice","internalType":"uint256"}],"name":"getNavaUpdatedPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_redeemableBonds","internalType":"uint256"}],"name":"getRedeemableBonds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getReserve","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"governanceRecoverUnsupported","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_nava","internalType":"address"},{"type":"address","name":"_nbond","internalType":"address"},{"type":"address","name":"_nshare","internalType":"address"},{"type":"address","name":"_navaOracle","internalType":"address"},{"type":"address","name":"_masonry","internalType":"address"},{"type":"uint256","name":"_startTime","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isInitialized","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"masonry","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"masonryAllocateSeigniorage","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"masonryGovernanceRecoverUnsupported","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"masonrySetLockUp","inputs":[{"type":"uint256","name":"_withdrawLockupEpochs","internalType":"uint256"},{"type":"uint256","name":"_rewardLockupEpochs","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"masonrySetOperator","inputs":[{"type":"address","name":"_operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxDebtRatioPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxDiscountRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxExpansionTiers","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxPremiumRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupplyContractionPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupplyExpansionPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintingFactorForPayingDebt","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nava","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"navaOracle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"navaPriceCeiling","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"navaPriceOne","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nbond","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextEpochPoint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nshare","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"operator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"premiumPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"premiumThreshold","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"previousEpochNavaPrice","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeemBonds","inputs":[{"type":"uint256","name":"_bondAmount","internalType":"uint256"},{"type":"uint256","name":"targetPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"seigniorageExpansionFloorPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"seigniorageSaved","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBondDepletionFloorPercent","inputs":[{"type":"uint256","name":"_bondDepletionFloorPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBootstrap","inputs":[{"type":"uint256","name":"_bootstrapEpochs","internalType":"uint256"},{"type":"uint256","name":"_bootstrapSupplyExpansionPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDiscountPercent","inputs":[{"type":"uint256","name":"_discountPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setExtraFunds","inputs":[{"type":"address","name":"_daoFund","internalType":"address"},{"type":"uint256","name":"_daoFundSharedPercent","internalType":"uint256"},{"type":"address","name":"_devFund","internalType":"address"},{"type":"uint256","name":"_devFundSharedPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMasonry","inputs":[{"type":"address","name":"_masonry","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxDebtRatioPercent","inputs":[{"type":"uint256","name":"_maxDebtRatioPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxDiscountRate","inputs":[{"type":"uint256","name":"_maxDiscountRate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setMaxExpansionTiersEntry","inputs":[{"type":"uint8","name":"_index","internalType":"uint8"},{"type":"uint256","name":"_value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxPremiumRate","inputs":[{"type":"uint256","name":"_maxPremiumRate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxSupplyContractionPercent","inputs":[{"type":"uint256","name":"_maxSupplyContractionPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxSupplyExpansionPercents","inputs":[{"type":"uint256","name":"_maxSupplyExpansionPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMintingFactorForPayingDebt","inputs":[{"type":"uint256","name":"_mintingFactorForPayingDebt","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNavaOracle","inputs":[{"type":"address","name":"_navaOracle","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNavaPriceCeiling","inputs":[{"type":"uint256","name":"_navaPriceCeiling","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOperator","inputs":[{"type":"address","name":"_operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPremiumPercent","inputs":[{"type":"uint256","name":"_premiumPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPremiumThreshold","inputs":[{"type":"uint256","name":"_premiumThreshold","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setSupplyTiersEntry","inputs":[{"type":"uint8","name":"_index","internalType":"uint8"},{"type":"uint256","name":"_value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"supplyTiers","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]}]
              

Contract Creation Code

0x6001805460ff60a01b191681556000600381905560045560a060405273b9f9993f0d4a63344d9571387e18f659b6ae5447608090815262000044916005919062000059565b503480156200005257600080fd5b50620000e4565b828054828255906000526020600020908101928215620000b1579160200282015b82811115620000b157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200007a565b50620000bf929150620000c3565b5090565b5b80821115620000bf5780546001600160a01b0319168155600101620000c4565b61466a80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106104285760003560e01c806382cad8381161022b578063b4d1d79511610130578063ce54e2f6116100b8578063d98f249511610087578063d98f2495146109b6578063da3ed419146109be578063e90b2454146109c6578063f14698de146109ce578063fcb6f008146109d657610428565b8063ce54e2f614610930578063cecce38e1461094d578063d4b149441461096a578063d5d3b26c1461099057610428565b8063c4873ac3116100ff578063c4873ac314610908578063c5967c2614610910578063c8412d0214610918578063c8b158a914610920578063c8f987f31461092857610428565b8063b4d1d795146108a1578063b8a878f9146108a9578063bcc81f19146108b1578063be266d54146108eb57610428565b806395b6ef0c116101b3578063a0487eea11610182578063a0487eea14610831578063a204452b1461084e578063a245af001461086b578063ac17fb3114610873578063b3ab15fb1461087b57610428565b806395b6ef0c146107a357806398b762a1146107ef578063998200251461080c5780639ee37d831461082957610428565b8063900cf0cf116101fa578063900cf0cf1461071457806391bbfed51461071c578063940e60641461073f57806394f6456814610765578063951357d41461076d57610428565b806382cad838146106ca578063874106cc146106e75780638c664db6146106ef5780638d934f741461070c57610428565b806354f04a11116103315780635b88f3c1116102b957806372c054f91161028857806372c054f914610687578063734f70961461068f57806378e97925146106b25780637c7e17e8146106ba57806381d11eaf146106c257610428565b80635b88f3c11461062b57806362ac58e41461063357806363f96cf41461065957806365f142311461066157610428565b8063591663e111610300578063591663e1146105ee57806359bf5d391461060b5780635a0fc79c146106135780635b4c3e321461061b5780635b7561791461062357610428565b806354f04a11146105b357806355dd80a0146105d657806355ebdeef146105de578063570ca735146105e657610428565b806329ef1919116103b457806340af7ba51161038357806340af7ba5146105175780634390d2a814610534578063499f3f19146105585780634ee7ec371461057557806354575af41461057d57610428565b806329ef1919146104f75780632e9c7b65146104ff578063392e53cd146105075780634013a08e1461050f57610428565b80630db7eb0b116103fb5780630db7eb0b1461048b578063118ebbf914610493578063154ec2db146104b6578063158ef93e146104d357806322f832cd146104ef57610428565b806303be7e761461042d57806304e5c7b1146104475780630b5bcec7146104665780630cf6017514610483575b600080fd5b6104356109de565b60408051918252519081900360200190f35b6104646004803603602081101561045d57600080fd5b50356109e4565b005b6104646004803603602081101561047c57600080fd5b5035610ab3565b610435610b4f565b610435610c01565b610464600480360360408110156104a957600080fd5b5080359060200135610ca3565b610464600480360360208110156104cc57600080fd5b5035611300565b6104db6113a5565b604080519115158252519081900360200190f35b6104356113b5565b6104356113bb565b6104356113c1565b6104db6113c7565b6104356113d8565b6104646004803603602081101561052d57600080fd5b50356113de565b61053c611483565b604080516001600160a01b039092168252519081900360200190f35b6104646004803603602081101561056e57600080fd5b5035611492565b61053c61152f565b6104646004803603606081101561059357600080fd5b506001600160a01b0381358116916020810135916040909101351661153e565b610464600480360360408110156105c957600080fd5b5080359060200135611683565b61053c611dc2565b610435611dd1565b61053c611dd7565b6104646004803603602081101561060457600080fd5b5035611de6565b610435611e88565b610435611e8e565b610435611e94565b610464611e9a565b61043561254c565b6104646004803603602081101561064957600080fd5b50356001600160a01b0316612552565b61053c612604565b6104646004803603602081101561067757600080fd5b50356001600160a01b0316612613565b61043561267e565b610464600480360360408110156106a557600080fd5b508035906020013561273e565b6104356127f7565b6104356127fd565b61043561293d565b61053c600480360360208110156106e057600080fd5b5035612943565b61043561296a565b6104646004803603602081101561070557600080fd5b5035612970565b61053c612a12565b610435612a21565b6104646004803603604081101561073257600080fd5b5080359060200135612a27565b6104db6004803603604081101561075557600080fd5b5060ff8135169060200135612b1f565b61053c612c3b565b6104646004803603606081101561078357600080fd5b506001600160a01b03813581169160208101359160409091013516612c4a565b610464600480360360c08110156107b957600080fd5b506001600160a01b0381358116916020810135821691604082013581169160608101358216916080820135169060a00135612d0d565b6104646004803603602081101561080557600080fd5b5035612fae565b6104356004803603602081101561082257600080fd5b5035612ffc565b61043561301a565b6104356004803603602081101561084757600080fd5b50356130f7565b6104646004803603602081101561086457600080fd5b5035613104565b61053c613152565b610435613161565b6104646004803603602081101561089157600080fd5b50356001600160a01b03166131c3565b61043561322e565b610435613234565b610464600480360360808110156108c757600080fd5b506001600160a01b038135811691602081013591604082013516906060013561323a565b6104646004803603602081101561090157600080fd5b50356133cf565b610435613465565b61043561346b565b610435613495565b61043561349b565b6104356135a2565b6104646004803603602081101561094657600080fd5b50356135a8565b6104646004803603602081101561096357600080fd5b5035613662565b6104db6004803603604081101561098057600080fd5b5060ff8135169060200135613703565b610464600480360360208110156109a657600080fd5b50356001600160a01b03166137fd565b610435613868565b61043561386e565b610435613874565b61043561387a565b610435613880565b60215481565b6001546001600160a01b03163314610a2d5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600c54811015610a6e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061439d602a913960400191505060405180910390fd5b6096811115610aae5760405162461bcd60e51b81526004018080602001828103825260248152602001806143c76024913960400191505060405180910390fd5b601b55565b6001546001600160a01b03163314610afc5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600a8110158015610b0f57506103e88111155b610b4a5760405162461bcd60e51b81526004018080602001828103825260288152602001806144b06028913960400191505060405180910390fd5b601055565b600080610b5a61301a565b9050600b548111610bfd57601a54610b7657600b549150610bfd565b6000610b9f82610b99670de0b6b3a7640000600b5461388690919063ffffffff16565b906138e6565b90506000610bca612710610b99601a54610bc4600b548761394d90919063ffffffff16565b90613886565b600b54909150610bda90826139aa565b93506000601854118015610bef575060185484115b15610bfa5760185493505b50505b5090565b600080610c0c61301a565b9050600c54811115610bfd576000610c366064610b99601b54600b5461388690919063ffffffff16565b9050808210610c98576000610c62612710610b99601c54610bc4600b548861394d90919063ffffffff16565b600b54909150610c7290826139aa565b93506000601954118015610c87575060195484115b15610c925760195493505b50610c9e565b600b5492505b505090565b610cab613a04565b15610ce75760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b610cef613a23565b15610d2b5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b600254421015610d7e576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610dc257600080fd5b505afa158015610dd6573d6000803e3d6000fd5b505050506040513d6020811015610dec57600080fd5b50516001600160a01b0316148015610e7a57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b0316145b8015610efc57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610ec557600080fd5b505afa158015610ed9573d6000803e3d6000fd5b505050506040513d6020811015610eef57600080fd5b50516001600160a01b0316145b8015610f7e57506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6020811015610f7157600080fd5b50516001600160a01b0316145b610fcf576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b6000821161100e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061436f602e913960400191505060405180910390fd5b600061101861301a565b905081811461106e576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a204e415641207072696365206d6f766564000000000000604482015290519081900360640190fd5b600c5481116110ae5760405162461bcd60e51b81526004018080602001828103825260328152602001806144d86032913960400191505060405180910390fd5b60006110b8610c01565b90506000811161110f576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b6000611127670de0b6b3a7640000610b998785613886565b600654604080516370a0823160e01b8152306004820152905192935083926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561117757600080fd5b505afa15801561118b573d6000803e3d6000fd5b505050506040513d60208110156111a157600080fd5b505110156111e05760405162461bcd60e51b81526004018080602001828103825260258152602001806144116025913960400191505060405180910390fd5b6111f86111ef600d5483613a42565b600d549061394d565b600d556007546040805163079cc67960e41b81523360048201526024810188905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b505060065461127e92506001600160a01b031690503383613a58565b611286613aaa565b6040805182815260208101879052815133927f51e0d16595cabc591e64da08e45bb223577e5b9a39cd947b4ddc3472b2dd8878928290030190a25050436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055505050565b6001546001600160a01b031633146113495760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b614e208111156113a0576040805162461bcd60e51b815260206004820152601d60248201527f5f646973636f756e7450657263656e74206973206f7665722032303025000000604482015290519081900360640190fd5b601a55565b600154600160a01b900460ff1681565b60125481565b601a5481565b60195481565b600154600160a01b900460ff165b90565b601d5481565b6001546001600160a01b031633146114275760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b614e2081111561147e576040805162461bcd60e51b815260206004820152601c60248201527f5f7072656d69756d50657263656e74206973206f766572203230302500000000604482015290519081900360640190fd5b601c55565b6020546001600160a01b031681565b6001546001600160a01b031633146114db5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b61271081101580156114ef5750614e208111155b61152a5760405162461bcd60e51b81526004018080602001828103825260298152602001806144876029913960400191505060405180910390fd5b601d55565b6007546001600160a01b031681565b6001546001600160a01b031633146115875760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6006546001600160a01b03848116911614156115d3576040805162461bcd60e51b815260206004808301919091526024820152636e61766160e01b604482015290519081900360640190fd5b6007546001600160a01b038481169116141561161f576040805162461bcd60e51b81526020600480830191909152602482015263189bdb9960e21b604482015290519081900360640190fd5b6008546001600160a01b038481169116141561166a576040805162461bcd60e51b8152602060048201526005602482015264736861726560d81b604482015290519081900360640190fd5b61167e6001600160a01b0384168284613a58565b505050565b61168b613a04565b156116c75760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b6116cf613a23565b1561170b5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b60025442101561175e576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156117a257600080fd5b505afa1580156117b6573d6000803e3d6000fd5b505050506040513d60208110156117cc57600080fd5b50516001600160a01b031614801561185a57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561182357600080fd5b505afa158015611837573d6000803e3d6000fd5b505050506040513d602081101561184d57600080fd5b50516001600160a01b0316145b80156118dc57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156118a557600080fd5b505afa1580156118b9573d6000803e3d6000fd5b505050506040513d60208110156118cf57600080fd5b50516001600160a01b0316145b801561195e57506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561192757600080fd5b505afa15801561193b573d6000803e3d6000fd5b505050506040513d602081101561195157600080fd5b50516001600160a01b0316145b6119af576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b600082116119ee5760405162461bcd60e51b81526004018080602001828103825260308152602001806144576030913960400191505060405180910390fd5b60006119f861301a565b9050818114611a4e576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a204e415641207072696365206d6f766564000000000000604482015290519081900360640190fd5b600b548110611a8e5760405162461bcd60e51b81526004018080602001828103825260328152602001806144d86032913960400191505060405180910390fd5b600454831115611acf5760405162461bcd60e51b815260040180806020018281038252602a8152602001806145dd602a913960400191505060405180910390fd5b6000611ad9610b4f565b905060008111611b30576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b6000611b48670de0b6b3a7640000610b998785613886565b90506000611b546127fd565b90506000611bdc83600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611baa57600080fd5b505afa158015611bbe573d6000803e3d6000fd5b505050506040513d6020811015611bd457600080fd5b5051906139aa565b9050611bf9612710610b996014548561388690919063ffffffff16565b811115611c43576040805162461bcd60e51b81526020600482015260136024820152726f766572206d6178206465627420726174696f60681b604482015290519081900360640190fd5b6006546040805163079cc67960e41b8152336004820152602481018a905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b158015611c9657600080fd5b505af1158015611caa573d6000803e3d6000fd5b5050600754604080516340c10f1960e01b81523360048201526024810188905290516001600160a01b0390921693506340c10f1992506044808201926020929091908290030181600087803b158015611d0257600080fd5b505af1158015611d16573d6000803e3d6000fd5b505050506040513d6020811015611d2c57600080fd5b5050600454611d3b908861394d565b600455611d46613aaa565b6040805188815260208101859052815133927f73017f1b70789e2e66759eeb3c7ec11f59e6eedb55d921cfaec5410dd42a4799928290030190a25050436000908152602081815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050505050565b6008546001600160a01b031681565b601f5481565b6001546001600160a01b031681565b6001546001600160a01b03163314611e2f5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6103e88110158015611e4357506127108111155b611e83576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601455565b600d5490565b600d5481565b60175481565b611ea2613a04565b15611ede5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b611ee6613a23565b15611f225760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b600254421015611f75576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b611f7d61346b565b421015611fd1576040805162461bcd60e51b815260206004820152601860248201527f54726561737572793a206e6f74206f70656e6564207965740000000000000000604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561201557600080fd5b505afa158015612029573d6000803e3d6000fd5b505050506040513d602081101561203f57600080fd5b50516001600160a01b03161480156120cd57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d60208110156120c057600080fd5b50516001600160a01b0316145b801561214f57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561211857600080fd5b505afa15801561212c573d6000803e3d6000fd5b505050506040513d602081101561214257600080fd5b50516001600160a01b0316145b80156121d157506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561219a57600080fd5b505afa1580156121ae573d6000803e3d6000fd5b505050506040513d60208110156121c457600080fd5b50516001600160a01b0316145b612222576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b61222a613aaa565b61223261301a565b601755600d5460009061224d906122476127fd565b9061394d565b905060155460035410156122835761227e612279612710610b996016548561388690919063ffffffff16565b613b0e565b6124d0565b600c5460175411156124d057600754604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156122d457600080fd5b505afa1580156122e8573d6000803e3d6000fd5b505050506040513d60208110156122fe57600080fd5b5051600b546017549192506000916123159161394d565b9050600080600061232f655af3107a4000610bc488613e4e565b90508084111561233d578093505b612358612710610b996011548861388690919063ffffffff16565b600d541061237d57612376670de0b6b3a7640000610b998887613886565b91506123e9565b6000612395670de0b6b3a7640000610b998988613886565b90506123b2612710610b996012548461388690919063ffffffff16565b92506123be818461394d565b601d54909450156123e7576123e4612710610b99601d548761388690919063ffffffff16565b93505b505b81156123f8576123f882613b0e565b82156124ca57600d5461240b90846139aa565b600d55600654604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b15801561246257600080fd5b505af1158015612476573d6000803e3d6000fd5b505050506040513d602081101561248c57600080fd5b5050604080514281526020810185905281517ff705142bf09f04297640495ddf7c59b7fd6f51894c5aea9602d631cf05f0efc2929181900390910190a15b50505050505b506003546124df9060016139aa565b600355600c546124ed61301a565b1161250b57612506612710610b99601354610bc46127fd565b61250e565b60005b600455436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600b5481565b6001546001600160a01b0316331461259b5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6009546040805163b3ab15fb60e01b81526001600160a01b0384811660048301529151919092169163b3ab15fb91602480830192600092919082900301818387803b1580156125e957600080fd5b505af11580156125fd573d6000803e3d6000fd5b5050505050565b6009546001600160a01b031681565b6001546001600160a01b0316331461265c5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60008061268961301a565b9050600c54811115610bfd57600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156126e057600080fd5b505afa1580156126f4573d6000803e3d6000fd5b505050506040513d602081101561270a57600080fd5b505190506000612718610c01565b90508015610bfa5761273681610b9984670de0b6b3a7640000613886565b935050505090565b6001546001600160a01b031633146127875760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60095460408051632ffaaa0960e01b8152600481018590526024810184905290516001600160a01b0390921691632ffaaa099160448082019260009290919082900301818387803b1580156127db57600080fd5b505af11580156127ef573d6000803e3d6000fd5b505050505050565b60025481565b600654604080516318160ddd60e01b815290516000926001600160a01b031691839183916318160ddd916004808301926020929190829003018186803b15801561284657600080fd5b505afa15801561285a573d6000803e3d6000fd5b505050506040513d602081101561287057600080fd5b505190506000805b60055460ff8216101561293257612928846001600160a01b03166370a0823160058460ff16815481106128a757fe5b60009182526020918290200154604080516001600160e01b031960e086901b1681526001600160a01b0390921660048301525160248083019392829003018186803b1580156128f557600080fd5b505afa158015612909573d6000803e3d6000fd5b505050506040513d602081101561291f57600080fd5b505183906139aa565b9150600101612878565b50612736828261394d565b60115481565b6005818154811061295057fe5b6000918252602090912001546001600160a01b0316905081565b60165481565b6001546001600160a01b031633146129b95760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6101f481101580156129cd57506127108111155b612a0d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601155565b601e546001600160a01b031681565b60035481565b6001546001600160a01b03163314612a705760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6078821115612ac6576040805162461bcd60e51b815260206004820152601e60248201527f5f626f6f74737472617045706f6368733a206f7574206f662072616e67650000604482015290519081900360640190fd5b60648110158015612ad957506103e88111155b612b145760405162461bcd60e51b815260040180806020018281038252602e815260200180614607602e913960400191505060405180910390fd5b601591909155601655565b6001546000906001600160a01b03163314612b6b5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60068360ff1610612bad5760405162461bcd60e51b815260040180806020018281038252602981526020018061450a6029913960400191505060405180910390fd5b60ff831615612bdf57600e6001840360ff1681548110612bc957fe5b90600052602060002001548211612bdf57600080fd5b60058360ff161015612c1457600e8360010160ff1681548110612bfe57fe5b90600052602060002001548210612c1457600080fd5b81600e8460ff1681548110612c2557fe5b6000918252602090912001555060015b92915050565b600a546001600160a01b031681565b6001546001600160a01b03163314612c935760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60095460408051631515d6bd60e21b81526001600160a01b038681166004830152602482018690528481166044830152915191909216916354575af491606480830192600092919082900301818387803b158015612cf057600080fd5b505af1158015612d04573d6000803e3d6000fd5b50505050505050565b600154600160a01b900460ff1615612d6c576040805162461bcd60e51b815260206004820152601d60248201527f54726561737572793a20616c726561647920696e697469616c697a6564000000604482015290519081900360640190fd5b600680546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600880548216878416179055600a80548216868416179055600980549091169184169190911790556002819055670de0b6b3a7640000600b819055612de790606490610b99906065613886565b600c556040805160c081018252600081526969e10de76676d080000060208201526a01a784379d99db42000000918101919091526a034f086f3b33b68400000060608201526a069e10de76676d0800000060808201526a108b2a2c2802909400000060a0820152612e5c90600e90600661428c565b506040805160c08101825261012c815260fa602082015260c89181019190915260966060820152607d6080820152606460a0820152612e9f90600f9060066142e2565b50610190601055612710601155610dac601281905561012c6013819055601491909155606e601b55611b58601c908155601555601655600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015612f2057600080fd5b505afa158015612f34573d6000803e3d6000fd5b505050506040513d6020811015612f4a57600080fd5b5051600d55600180546001600160a01b031960ff60a01b19909116600160a01b1716339081179091556040805143815290517f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce799181900360200190a2505050505050565b6001546001600160a01b03163314612ff75760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b601855565b600e818154811061300957fe5b600091825260209091200154905081565b600a5460065460408051633ddac95360e01b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691633ddac95391604480820192602092909190829003018186803b15801561307c57600080fd5b505afa9250505080156130a157506040513d602081101561309c57600080fd5b505160015b6130dc5760405162461bcd60e51b81526004018080602001828103825260368152602001806143396036913960400191505060405180910390fd5b71ffffffffffffffffffffffffffffffffffff1690506113d5565b600f818154811061300957fe5b6001546001600160a01b0316331461314d5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b601955565b6006546001600160a01b031681565b600a5460065460408051630d01142560e31b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691636808a12891604480820192602092909190829003018186803b15801561307c57600080fd5b6001546001600160a01b0316331461320c5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61546081565b60185481565b6001546001600160a01b031633146132835760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6001600160a01b0384166132c7576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b610bb883111561330d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b6001600160a01b038216613351576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b6103e8811115613397576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601e80546001600160a01b03199081166001600160a01b0396871617909155601f939093556020805490931691909316179055602155565b6001546001600160a01b031633146134185760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600954604080516397ffe1d760e01b81526004810184905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b1580156125e957600080fd5b600c5481565b600061349061348761546060035461388690919063ffffffff16565b600254906139aa565b905090565b601c5481565b6000806134a661301a565b9050600b548111610bfd5760006134bb6127fd565b905060006134da612710610b996014548561388690919063ffffffff16565b90506000600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561352c57600080fd5b505afa158015613540573d6000803e3d6000fd5b505050506040513d602081101561355657600080fd5b505190508082111561359b57600061356e838361394d565b90506000613588670de0b6b3a7640000610b998489613886565b905061359660045482613a42565b965050505b5050505090565b601b5481565b6001546001600160a01b031633146135f15760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600b54811015801561361d57506136196064610b996078600b5461388690919063ffffffff16565b8111155b61365d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b600c55565b6001546001600160a01b031633146136ab5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b606481101580156136be57506105dc8111155b6136fe576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601355565b6001546000906001600160a01b0316331461374f5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60068360ff16106137915760405162461bcd60e51b815260040180806020018281038252602981526020018061450a6029913960400191505060405180910390fd5b600a82101580156137a457506103e88211155b6137ec576040805162461bcd60e51b81526020600482015260146024820152735f76616c75653a206f7574206f662072616e676560601b604482015290519081900360640190fd5b81600f8460ff1681548110612c2557fe5b6001546001600160a01b031633146138465760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60105481565b60145481565b60135481565b60155481565b60045481565b60008261389557506000612c35565b828202828482816138a257fe5b04146138df5760405162461bcd60e51b81526004018080602001828103825260218152602001806144366021913960400191505060405180910390fd5b9392505050565b600080821161393c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161394557fe5b049392505050565b6000828211156139a4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156138df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b6000818310613a5157816138df565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261167e908490613eab565b600a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613afa57600080fd5b505af1925050508015613b0b575060015b50565b600654604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b158015613b6257600080fd5b505af1158015613b76573d6000803e3d6000fd5b505050506040513d6020811015613b8c57600080fd5b5050601f5460009015613c7757613bb4612710610b99601f548561388690919063ffffffff16565b600654601e546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b158015613c0f57600080fd5b505af1158015613c23573d6000803e3d6000fd5b505050506040513d6020811015613c3957600080fd5b5050604080514281526020810183905281517fcb3f34aaa3445b461e6da5492dc89e5c257a59fa598131f3b6bbc97a3638e409929181900390910190a15b60215460009015613d5d57613c9d612710610b996021548661388690919063ffffffff16565b600654602080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101869052905194955092169263a9059cbb9260448082019392918290030181600087803b158015613cf557600080fd5b505af1158015613d09573d6000803e3d6000fd5b505050506040513d6020811015613d1f57600080fd5b5050604080514281526020810183905281517fdc8b715b18523e58b7fd0da53259dfa91efd91df4a854d94b136e3333a3b9395929181900390910190a15b613d6b81612247858561394d565b600954600654919450613d8c916001600160a01b0390811691166000613f5c565b600954600654613da9916001600160a01b03918216911685613f5c565b600954604080516397ffe1d760e01b81526004810186905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b158015613df657600080fd5b505af1158015613e0a573d6000803e3d6000fd5b5050604080514281526020810187905281517fa72fa2f263b243b0f0e1fec5f3d49d33de573d15929b6b730c6b8ab3838c1c4d9450908190039091019150a1505050565b600060055b600e8160ff1681548110613e6357fe5b90600052602060002001548310613e9857600f8160ff1681548110613e8457fe5b600091825260209091200154601055613ea1565b60001901613e53565b5050601054919050565b6060613f00826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661406f9092919063ffffffff16565b80519091501561167e57808060200190516020811015613f1f57600080fd5b505161167e5760405162461bcd60e51b815260040180806020018281038252602a815260200180614557602a913960400191505060405180910390fd5b801580613fe2575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015613fb457600080fd5b505afa158015613fc8573d6000803e3d6000fd5b505050506040513d6020811015613fde57600080fd5b5051155b61401d5760405162461bcd60e51b81526004018080602001828103825260368152602001806145a76036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261167e908490613eab565b606061407e8484600085614086565b949350505050565b6060824710156140c75760405162461bcd60e51b81526004018080602001828103825260268152602001806143eb6026913960400191505060405180910390fd5b6140d0856141e2565b614121576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106141605780518252601f199092019160209182019101614141565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146141c2576040519150601f19603f3d011682016040523d82523d6000602084013e6141c7565b606091505b50915091506141d78282866141e8565b979650505050505050565b3b151590565b606083156141f75750816138df565b8251156142075782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614251578181015183820152602001614239565b50505050905090810190601f16801561427e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b8280548282559060005260206000209081019282156142d6579160200282015b828111156142d657825182906affffffffffffffffffffff169055916020019190600101906142ac565b50610bfd929150614323565b8280548282559060005260206000209081019282156142d6579160200282015b828111156142d6578251829061ffff16905591602001919060010190614302565b5b80821115610bfd576000815560010161432456fe54726561737572793a206661696c656420746f20636f6e73756c74204e4156412070726963652066726f6d20746865206f7261636c6554726561737572793a2063616e6e6f742072656465656d20626f6e64732077697468207a65726f20616d6f756e745f7072656d69756d5468726573686f6c642065786365656473206e61766150726963654365696c696e675f7072656d69756d5468726573686f6c6420697320686967686572207468616e20312e35416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c54726561737572793a20747265617375727920686173206e6f206d6f726520627564676574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572793a2063616e6e6f7420707572636861736520626f6e64732077697468207a65726f20616d6f756e745f6d696e74696e67466163746f72466f72506179696e67446562743a206f7574206f662072616e67655f6d6178537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e676554726561737572793a206e6176615072696365206e6f7420656c696769626c6520666f7220626f6e64207075726368617365496e6465782068617320746f206265206c6f776572207468616e20636f756e74206f6620746965727354726561737572793a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756e6374696f6e5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636554726561737572793a206e6f7420656e6f75676820626f6e64206c65667420746f2070757263686173655f626f6f747374726170537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e6765a2646970667358221220199e53a0cbad8afb3a918ce88e445173850b4f41ccea6966fa6e5f3e4fbf8e7064736f6c634300060c0033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106104285760003560e01c806382cad8381161022b578063b4d1d79511610130578063ce54e2f6116100b8578063d98f249511610087578063d98f2495146109b6578063da3ed419146109be578063e90b2454146109c6578063f14698de146109ce578063fcb6f008146109d657610428565b8063ce54e2f614610930578063cecce38e1461094d578063d4b149441461096a578063d5d3b26c1461099057610428565b8063c4873ac3116100ff578063c4873ac314610908578063c5967c2614610910578063c8412d0214610918578063c8b158a914610920578063c8f987f31461092857610428565b8063b4d1d795146108a1578063b8a878f9146108a9578063bcc81f19146108b1578063be266d54146108eb57610428565b806395b6ef0c116101b3578063a0487eea11610182578063a0487eea14610831578063a204452b1461084e578063a245af001461086b578063ac17fb3114610873578063b3ab15fb1461087b57610428565b806395b6ef0c146107a357806398b762a1146107ef578063998200251461080c5780639ee37d831461082957610428565b8063900cf0cf116101fa578063900cf0cf1461071457806391bbfed51461071c578063940e60641461073f57806394f6456814610765578063951357d41461076d57610428565b806382cad838146106ca578063874106cc146106e75780638c664db6146106ef5780638d934f741461070c57610428565b806354f04a11116103315780635b88f3c1116102b957806372c054f91161028857806372c054f914610687578063734f70961461068f57806378e97925146106b25780637c7e17e8146106ba57806381d11eaf146106c257610428565b80635b88f3c11461062b57806362ac58e41461063357806363f96cf41461065957806365f142311461066157610428565b8063591663e111610300578063591663e1146105ee57806359bf5d391461060b5780635a0fc79c146106135780635b4c3e321461061b5780635b7561791461062357610428565b806354f04a11146105b357806355dd80a0146105d657806355ebdeef146105de578063570ca735146105e657610428565b806329ef1919116103b457806340af7ba51161038357806340af7ba5146105175780634390d2a814610534578063499f3f19146105585780634ee7ec371461057557806354575af41461057d57610428565b806329ef1919146104f75780632e9c7b65146104ff578063392e53cd146105075780634013a08e1461050f57610428565b80630db7eb0b116103fb5780630db7eb0b1461048b578063118ebbf914610493578063154ec2db146104b6578063158ef93e146104d357806322f832cd146104ef57610428565b806303be7e761461042d57806304e5c7b1146104475780630b5bcec7146104665780630cf6017514610483575b600080fd5b6104356109de565b60408051918252519081900360200190f35b6104646004803603602081101561045d57600080fd5b50356109e4565b005b6104646004803603602081101561047c57600080fd5b5035610ab3565b610435610b4f565b610435610c01565b610464600480360360408110156104a957600080fd5b5080359060200135610ca3565b610464600480360360208110156104cc57600080fd5b5035611300565b6104db6113a5565b604080519115158252519081900360200190f35b6104356113b5565b6104356113bb565b6104356113c1565b6104db6113c7565b6104356113d8565b6104646004803603602081101561052d57600080fd5b50356113de565b61053c611483565b604080516001600160a01b039092168252519081900360200190f35b6104646004803603602081101561056e57600080fd5b5035611492565b61053c61152f565b6104646004803603606081101561059357600080fd5b506001600160a01b0381358116916020810135916040909101351661153e565b610464600480360360408110156105c957600080fd5b5080359060200135611683565b61053c611dc2565b610435611dd1565b61053c611dd7565b6104646004803603602081101561060457600080fd5b5035611de6565b610435611e88565b610435611e8e565b610435611e94565b610464611e9a565b61043561254c565b6104646004803603602081101561064957600080fd5b50356001600160a01b0316612552565b61053c612604565b6104646004803603602081101561067757600080fd5b50356001600160a01b0316612613565b61043561267e565b610464600480360360408110156106a557600080fd5b508035906020013561273e565b6104356127f7565b6104356127fd565b61043561293d565b61053c600480360360208110156106e057600080fd5b5035612943565b61043561296a565b6104646004803603602081101561070557600080fd5b5035612970565b61053c612a12565b610435612a21565b6104646004803603604081101561073257600080fd5b5080359060200135612a27565b6104db6004803603604081101561075557600080fd5b5060ff8135169060200135612b1f565b61053c612c3b565b6104646004803603606081101561078357600080fd5b506001600160a01b03813581169160208101359160409091013516612c4a565b610464600480360360c08110156107b957600080fd5b506001600160a01b0381358116916020810135821691604082013581169160608101358216916080820135169060a00135612d0d565b6104646004803603602081101561080557600080fd5b5035612fae565b6104356004803603602081101561082257600080fd5b5035612ffc565b61043561301a565b6104356004803603602081101561084757600080fd5b50356130f7565b6104646004803603602081101561086457600080fd5b5035613104565b61053c613152565b610435613161565b6104646004803603602081101561089157600080fd5b50356001600160a01b03166131c3565b61043561322e565b610435613234565b610464600480360360808110156108c757600080fd5b506001600160a01b038135811691602081013591604082013516906060013561323a565b6104646004803603602081101561090157600080fd5b50356133cf565b610435613465565b61043561346b565b610435613495565b61043561349b565b6104356135a2565b6104646004803603602081101561094657600080fd5b50356135a8565b6104646004803603602081101561096357600080fd5b5035613662565b6104db6004803603604081101561098057600080fd5b5060ff8135169060200135613703565b610464600480360360208110156109a657600080fd5b50356001600160a01b03166137fd565b610435613868565b61043561386e565b610435613874565b61043561387a565b610435613880565b60215481565b6001546001600160a01b03163314610a2d5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600c54811015610a6e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061439d602a913960400191505060405180910390fd5b6096811115610aae5760405162461bcd60e51b81526004018080602001828103825260248152602001806143c76024913960400191505060405180910390fd5b601b55565b6001546001600160a01b03163314610afc5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600a8110158015610b0f57506103e88111155b610b4a5760405162461bcd60e51b81526004018080602001828103825260288152602001806144b06028913960400191505060405180910390fd5b601055565b600080610b5a61301a565b9050600b548111610bfd57601a54610b7657600b549150610bfd565b6000610b9f82610b99670de0b6b3a7640000600b5461388690919063ffffffff16565b906138e6565b90506000610bca612710610b99601a54610bc4600b548761394d90919063ffffffff16565b90613886565b600b54909150610bda90826139aa565b93506000601854118015610bef575060185484115b15610bfa5760185493505b50505b5090565b600080610c0c61301a565b9050600c54811115610bfd576000610c366064610b99601b54600b5461388690919063ffffffff16565b9050808210610c98576000610c62612710610b99601c54610bc4600b548861394d90919063ffffffff16565b600b54909150610c7290826139aa565b93506000601954118015610c87575060195484115b15610c925760195493505b50610c9e565b600b5492505b505090565b610cab613a04565b15610ce75760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b610cef613a23565b15610d2b5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b600254421015610d7e576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610dc257600080fd5b505afa158015610dd6573d6000803e3d6000fd5b505050506040513d6020811015610dec57600080fd5b50516001600160a01b0316148015610e7a57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b0316145b8015610efc57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610ec557600080fd5b505afa158015610ed9573d6000803e3d6000fd5b505050506040513d6020811015610eef57600080fd5b50516001600160a01b0316145b8015610f7e57506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6020811015610f7157600080fd5b50516001600160a01b0316145b610fcf576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b6000821161100e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061436f602e913960400191505060405180910390fd5b600061101861301a565b905081811461106e576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a204e415641207072696365206d6f766564000000000000604482015290519081900360640190fd5b600c5481116110ae5760405162461bcd60e51b81526004018080602001828103825260328152602001806144d86032913960400191505060405180910390fd5b60006110b8610c01565b90506000811161110f576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b6000611127670de0b6b3a7640000610b998785613886565b600654604080516370a0823160e01b8152306004820152905192935083926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561117757600080fd5b505afa15801561118b573d6000803e3d6000fd5b505050506040513d60208110156111a157600080fd5b505110156111e05760405162461bcd60e51b81526004018080602001828103825260258152602001806144116025913960400191505060405180910390fd5b6111f86111ef600d5483613a42565b600d549061394d565b600d556007546040805163079cc67960e41b81523360048201526024810188905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b505060065461127e92506001600160a01b031690503383613a58565b611286613aaa565b6040805182815260208101879052815133927f51e0d16595cabc591e64da08e45bb223577e5b9a39cd947b4ddc3472b2dd8878928290030190a25050436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055505050565b6001546001600160a01b031633146113495760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b614e208111156113a0576040805162461bcd60e51b815260206004820152601d60248201527f5f646973636f756e7450657263656e74206973206f7665722032303025000000604482015290519081900360640190fd5b601a55565b600154600160a01b900460ff1681565b60125481565b601a5481565b60195481565b600154600160a01b900460ff165b90565b601d5481565b6001546001600160a01b031633146114275760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b614e2081111561147e576040805162461bcd60e51b815260206004820152601c60248201527f5f7072656d69756d50657263656e74206973206f766572203230302500000000604482015290519081900360640190fd5b601c55565b6020546001600160a01b031681565b6001546001600160a01b031633146114db5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b61271081101580156114ef5750614e208111155b61152a5760405162461bcd60e51b81526004018080602001828103825260298152602001806144876029913960400191505060405180910390fd5b601d55565b6007546001600160a01b031681565b6001546001600160a01b031633146115875760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6006546001600160a01b03848116911614156115d3576040805162461bcd60e51b815260206004808301919091526024820152636e61766160e01b604482015290519081900360640190fd5b6007546001600160a01b038481169116141561161f576040805162461bcd60e51b81526020600480830191909152602482015263189bdb9960e21b604482015290519081900360640190fd5b6008546001600160a01b038481169116141561166a576040805162461bcd60e51b8152602060048201526005602482015264736861726560d81b604482015290519081900360640190fd5b61167e6001600160a01b0384168284613a58565b505050565b61168b613a04565b156116c75760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b6116cf613a23565b1561170b5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b60025442101561175e576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156117a257600080fd5b505afa1580156117b6573d6000803e3d6000fd5b505050506040513d60208110156117cc57600080fd5b50516001600160a01b031614801561185a57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561182357600080fd5b505afa158015611837573d6000803e3d6000fd5b505050506040513d602081101561184d57600080fd5b50516001600160a01b0316145b80156118dc57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156118a557600080fd5b505afa1580156118b9573d6000803e3d6000fd5b505050506040513d60208110156118cf57600080fd5b50516001600160a01b0316145b801561195e57506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561192757600080fd5b505afa15801561193b573d6000803e3d6000fd5b505050506040513d602081101561195157600080fd5b50516001600160a01b0316145b6119af576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b600082116119ee5760405162461bcd60e51b81526004018080602001828103825260308152602001806144576030913960400191505060405180910390fd5b60006119f861301a565b9050818114611a4e576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a204e415641207072696365206d6f766564000000000000604482015290519081900360640190fd5b600b548110611a8e5760405162461bcd60e51b81526004018080602001828103825260328152602001806144d86032913960400191505060405180910390fd5b600454831115611acf5760405162461bcd60e51b815260040180806020018281038252602a8152602001806145dd602a913960400191505060405180910390fd5b6000611ad9610b4f565b905060008111611b30576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b6000611b48670de0b6b3a7640000610b998785613886565b90506000611b546127fd565b90506000611bdc83600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611baa57600080fd5b505afa158015611bbe573d6000803e3d6000fd5b505050506040513d6020811015611bd457600080fd5b5051906139aa565b9050611bf9612710610b996014548561388690919063ffffffff16565b811115611c43576040805162461bcd60e51b81526020600482015260136024820152726f766572206d6178206465627420726174696f60681b604482015290519081900360640190fd5b6006546040805163079cc67960e41b8152336004820152602481018a905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b158015611c9657600080fd5b505af1158015611caa573d6000803e3d6000fd5b5050600754604080516340c10f1960e01b81523360048201526024810188905290516001600160a01b0390921693506340c10f1992506044808201926020929091908290030181600087803b158015611d0257600080fd5b505af1158015611d16573d6000803e3d6000fd5b505050506040513d6020811015611d2c57600080fd5b5050600454611d3b908861394d565b600455611d46613aaa565b6040805188815260208101859052815133927f73017f1b70789e2e66759eeb3c7ec11f59e6eedb55d921cfaec5410dd42a4799928290030190a25050436000908152602081815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050505050565b6008546001600160a01b031681565b601f5481565b6001546001600160a01b031681565b6001546001600160a01b03163314611e2f5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6103e88110158015611e4357506127108111155b611e83576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601455565b600d5490565b600d5481565b60175481565b611ea2613a04565b15611ede5760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b611ee6613a23565b15611f225760405162461bcd60e51b81526004018080602001828103825260268152602001806145816026913960400191505060405180910390fd5b600254421015611f75576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b611f7d61346b565b421015611fd1576040805162461bcd60e51b815260206004820152601860248201527f54726561737572793a206e6f74206f70656e6564207965740000000000000000604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561201557600080fd5b505afa158015612029573d6000803e3d6000fd5b505050506040513d602081101561203f57600080fd5b50516001600160a01b03161480156120cd57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d60208110156120c057600080fd5b50516001600160a01b0316145b801561214f57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561211857600080fd5b505afa15801561212c573d6000803e3d6000fd5b505050506040513d602081101561214257600080fd5b50516001600160a01b0316145b80156121d157506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561219a57600080fd5b505afa1580156121ae573d6000803e3d6000fd5b505050506040513d60208110156121c457600080fd5b50516001600160a01b0316145b612222576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b61222a613aaa565b61223261301a565b601755600d5460009061224d906122476127fd565b9061394d565b905060155460035410156122835761227e612279612710610b996016548561388690919063ffffffff16565b613b0e565b6124d0565b600c5460175411156124d057600754604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156122d457600080fd5b505afa1580156122e8573d6000803e3d6000fd5b505050506040513d60208110156122fe57600080fd5b5051600b546017549192506000916123159161394d565b9050600080600061232f655af3107a4000610bc488613e4e565b90508084111561233d578093505b612358612710610b996011548861388690919063ffffffff16565b600d541061237d57612376670de0b6b3a7640000610b998887613886565b91506123e9565b6000612395670de0b6b3a7640000610b998988613886565b90506123b2612710610b996012548461388690919063ffffffff16565b92506123be818461394d565b601d54909450156123e7576123e4612710610b99601d548761388690919063ffffffff16565b93505b505b81156123f8576123f882613b0e565b82156124ca57600d5461240b90846139aa565b600d55600654604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b15801561246257600080fd5b505af1158015612476573d6000803e3d6000fd5b505050506040513d602081101561248c57600080fd5b5050604080514281526020810185905281517ff705142bf09f04297640495ddf7c59b7fd6f51894c5aea9602d631cf05f0efc2929181900390910190a15b50505050505b506003546124df9060016139aa565b600355600c546124ed61301a565b1161250b57612506612710610b99601354610bc46127fd565b61250e565b60005b600455436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600b5481565b6001546001600160a01b0316331461259b5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6009546040805163b3ab15fb60e01b81526001600160a01b0384811660048301529151919092169163b3ab15fb91602480830192600092919082900301818387803b1580156125e957600080fd5b505af11580156125fd573d6000803e3d6000fd5b5050505050565b6009546001600160a01b031681565b6001546001600160a01b0316331461265c5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60008061268961301a565b9050600c54811115610bfd57600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156126e057600080fd5b505afa1580156126f4573d6000803e3d6000fd5b505050506040513d602081101561270a57600080fd5b505190506000612718610c01565b90508015610bfa5761273681610b9984670de0b6b3a7640000613886565b935050505090565b6001546001600160a01b031633146127875760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60095460408051632ffaaa0960e01b8152600481018590526024810184905290516001600160a01b0390921691632ffaaa099160448082019260009290919082900301818387803b1580156127db57600080fd5b505af11580156127ef573d6000803e3d6000fd5b505050505050565b60025481565b600654604080516318160ddd60e01b815290516000926001600160a01b031691839183916318160ddd916004808301926020929190829003018186803b15801561284657600080fd5b505afa15801561285a573d6000803e3d6000fd5b505050506040513d602081101561287057600080fd5b505190506000805b60055460ff8216101561293257612928846001600160a01b03166370a0823160058460ff16815481106128a757fe5b60009182526020918290200154604080516001600160e01b031960e086901b1681526001600160a01b0390921660048301525160248083019392829003018186803b1580156128f557600080fd5b505afa158015612909573d6000803e3d6000fd5b505050506040513d602081101561291f57600080fd5b505183906139aa565b9150600101612878565b50612736828261394d565b60115481565b6005818154811061295057fe5b6000918252602090912001546001600160a01b0316905081565b60165481565b6001546001600160a01b031633146129b95760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6101f481101580156129cd57506127108111155b612a0d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601155565b601e546001600160a01b031681565b60035481565b6001546001600160a01b03163314612a705760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6078821115612ac6576040805162461bcd60e51b815260206004820152601e60248201527f5f626f6f74737472617045706f6368733a206f7574206f662072616e67650000604482015290519081900360640190fd5b60648110158015612ad957506103e88111155b612b145760405162461bcd60e51b815260040180806020018281038252602e815260200180614607602e913960400191505060405180910390fd5b601591909155601655565b6001546000906001600160a01b03163314612b6b5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60068360ff1610612bad5760405162461bcd60e51b815260040180806020018281038252602981526020018061450a6029913960400191505060405180910390fd5b60ff831615612bdf57600e6001840360ff1681548110612bc957fe5b90600052602060002001548211612bdf57600080fd5b60058360ff161015612c1457600e8360010160ff1681548110612bfe57fe5b90600052602060002001548210612c1457600080fd5b81600e8460ff1681548110612c2557fe5b6000918252602090912001555060015b92915050565b600a546001600160a01b031681565b6001546001600160a01b03163314612c935760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60095460408051631515d6bd60e21b81526001600160a01b038681166004830152602482018690528481166044830152915191909216916354575af491606480830192600092919082900301818387803b158015612cf057600080fd5b505af1158015612d04573d6000803e3d6000fd5b50505050505050565b600154600160a01b900460ff1615612d6c576040805162461bcd60e51b815260206004820152601d60248201527f54726561737572793a20616c726561647920696e697469616c697a6564000000604482015290519081900360640190fd5b600680546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600880548216878416179055600a80548216868416179055600980549091169184169190911790556002819055670de0b6b3a7640000600b819055612de790606490610b99906065613886565b600c556040805160c081018252600081526969e10de76676d080000060208201526a01a784379d99db42000000918101919091526a034f086f3b33b68400000060608201526a069e10de76676d0800000060808201526a108b2a2c2802909400000060a0820152612e5c90600e90600661428c565b506040805160c08101825261012c815260fa602082015260c89181019190915260966060820152607d6080820152606460a0820152612e9f90600f9060066142e2565b50610190601055612710601155610dac601281905561012c6013819055601491909155606e601b55611b58601c908155601555601655600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015612f2057600080fd5b505afa158015612f34573d6000803e3d6000fd5b505050506040513d6020811015612f4a57600080fd5b5051600d55600180546001600160a01b031960ff60a01b19909116600160a01b1716339081179091556040805143815290517f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce799181900360200190a2505050505050565b6001546001600160a01b03163314612ff75760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b601855565b600e818154811061300957fe5b600091825260209091200154905081565b600a5460065460408051633ddac95360e01b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691633ddac95391604480820192602092909190829003018186803b15801561307c57600080fd5b505afa9250505080156130a157506040513d602081101561309c57600080fd5b505160015b6130dc5760405162461bcd60e51b81526004018080602001828103825260368152602001806143396036913960400191505060405180910390fd5b71ffffffffffffffffffffffffffffffffffff1690506113d5565b600f818154811061300957fe5b6001546001600160a01b0316331461314d5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b601955565b6006546001600160a01b031681565b600a5460065460408051630d01142560e31b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691636808a12891604480820192602092909190829003018186803b15801561307c57600080fd5b6001546001600160a01b0316331461320c5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61546081565b60185481565b6001546001600160a01b031633146132835760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b6001600160a01b0384166132c7576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b610bb883111561330d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b6001600160a01b038216613351576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b6103e8811115613397576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601e80546001600160a01b03199081166001600160a01b0396871617909155601f939093556020805490931691909316179055602155565b6001546001600160a01b031633146134185760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600954604080516397ffe1d760e01b81526004810184905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b1580156125e957600080fd5b600c5481565b600061349061348761546060035461388690919063ffffffff16565b600254906139aa565b905090565b601c5481565b6000806134a661301a565b9050600b548111610bfd5760006134bb6127fd565b905060006134da612710610b996014548561388690919063ffffffff16565b90506000600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561352c57600080fd5b505afa158015613540573d6000803e3d6000fd5b505050506040513d602081101561355657600080fd5b505190508082111561359b57600061356e838361394d565b90506000613588670de0b6b3a7640000610b998489613886565b905061359660045482613a42565b965050505b5050505090565b601b5481565b6001546001600160a01b031633146135f15760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600b54811015801561361d57506136196064610b996078600b5461388690919063ffffffff16565b8111155b61365d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b600c55565b6001546001600160a01b031633146136ab5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b606481101580156136be57506105dc8111155b6136fe576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601355565b6001546000906001600160a01b0316331461374f5760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b60068360ff16106137915760405162461bcd60e51b815260040180806020018281038252602981526020018061450a6029913960400191505060405180910390fd5b600a82101580156137a457506103e88211155b6137ec576040805162461bcd60e51b81526020600482015260146024820152735f76616c75653a206f7574206f662072616e676560601b604482015290519081900360640190fd5b81600f8460ff1681548110612c2557fe5b6001546001600160a01b031633146138465760405162461bcd60e51b81526004018080602001828103825260248152602001806145336024913960400191505060405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60105481565b60145481565b60135481565b60155481565b60045481565b60008261389557506000612c35565b828202828482816138a257fe5b04146138df5760405162461bcd60e51b81526004018080602001828103825260218152602001806144366021913960400191505060405180910390fd5b9392505050565b600080821161393c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161394557fe5b049392505050565b6000828211156139a4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156138df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b6000818310613a5157816138df565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261167e908490613eab565b600a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613afa57600080fd5b505af1925050508015613b0b575060015b50565b600654604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b158015613b6257600080fd5b505af1158015613b76573d6000803e3d6000fd5b505050506040513d6020811015613b8c57600080fd5b5050601f5460009015613c7757613bb4612710610b99601f548561388690919063ffffffff16565b600654601e546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b158015613c0f57600080fd5b505af1158015613c23573d6000803e3d6000fd5b505050506040513d6020811015613c3957600080fd5b5050604080514281526020810183905281517fcb3f34aaa3445b461e6da5492dc89e5c257a59fa598131f3b6bbc97a3638e409929181900390910190a15b60215460009015613d5d57613c9d612710610b996021548661388690919063ffffffff16565b600654602080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101869052905194955092169263a9059cbb9260448082019392918290030181600087803b158015613cf557600080fd5b505af1158015613d09573d6000803e3d6000fd5b505050506040513d6020811015613d1f57600080fd5b5050604080514281526020810183905281517fdc8b715b18523e58b7fd0da53259dfa91efd91df4a854d94b136e3333a3b9395929181900390910190a15b613d6b81612247858561394d565b600954600654919450613d8c916001600160a01b0390811691166000613f5c565b600954600654613da9916001600160a01b03918216911685613f5c565b600954604080516397ffe1d760e01b81526004810186905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b158015613df657600080fd5b505af1158015613e0a573d6000803e3d6000fd5b5050604080514281526020810187905281517fa72fa2f263b243b0f0e1fec5f3d49d33de573d15929b6b730c6b8ab3838c1c4d9450908190039091019150a1505050565b600060055b600e8160ff1681548110613e6357fe5b90600052602060002001548310613e9857600f8160ff1681548110613e8457fe5b600091825260209091200154601055613ea1565b60001901613e53565b5050601054919050565b6060613f00826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661406f9092919063ffffffff16565b80519091501561167e57808060200190516020811015613f1f57600080fd5b505161167e5760405162461bcd60e51b815260040180806020018281038252602a815260200180614557602a913960400191505060405180910390fd5b801580613fe2575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015613fb457600080fd5b505afa158015613fc8573d6000803e3d6000fd5b505050506040513d6020811015613fde57600080fd5b5051155b61401d5760405162461bcd60e51b81526004018080602001828103825260368152602001806145a76036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261167e908490613eab565b606061407e8484600085614086565b949350505050565b6060824710156140c75760405162461bcd60e51b81526004018080602001828103825260268152602001806143eb6026913960400191505060405180910390fd5b6140d0856141e2565b614121576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106141605780518252601f199092019160209182019101614141565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146141c2576040519150601f19603f3d011682016040523d82523d6000602084013e6141c7565b606091505b50915091506141d78282866141e8565b979650505050505050565b3b151590565b606083156141f75750816138df565b8251156142075782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614251578181015183820152602001614239565b50505050905090810190601f16801561427e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b8280548282559060005260206000209081019282156142d6579160200282015b828111156142d657825182906affffffffffffffffffffff169055916020019190600101906142ac565b50610bfd929150614323565b8280548282559060005260206000209081019282156142d6579160200282015b828111156142d6578251829061ffff16905591602001919060010190614302565b5b80821115610bfd576000815560010161432456fe54726561737572793a206661696c656420746f20636f6e73756c74204e4156412070726963652066726f6d20746865206f7261636c6554726561737572793a2063616e6e6f742072656465656d20626f6e64732077697468207a65726f20616d6f756e745f7072656d69756d5468726573686f6c642065786365656473206e61766150726963654365696c696e675f7072656d69756d5468726573686f6c6420697320686967686572207468616e20312e35416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c54726561737572793a20747265617375727920686173206e6f206d6f726520627564676574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572793a2063616e6e6f7420707572636861736520626f6e64732077697468207a65726f20616d6f756e745f6d696e74696e67466163746f72466f72506179696e67446562743a206f7574206f662072616e67655f6d6178537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e676554726561737572793a206e6176615072696365206e6f7420656c696769626c6520666f7220626f6e64207075726368617365496e6465782068617320746f206265206c6f776572207468616e20636f756e74206f6620746965727354726561737572793a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756e6374696f6e5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636554726561737572793a206e6f7420656e6f75676820626f6e64206c65667420746f2070757263686173655f626f6f747374726170537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e6765a2646970667358221220199e53a0cbad8afb3a918ce88e445173850b4f41ccea6966fa6e5f3e4fbf8e7064736f6c634300060c0033