ETH Price: $2,074.41 (-1.26%)

Contract

0x479603DE0a8B6D2f4D4eaA1058Eea0d7Ac9E218d
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Deposit197523802024-04-28 7:39:11685 days ago1714289951
0x479603DE...7Ac9E218d
0 ETH
Pool Info197523802024-04-28 7:39:11685 days ago1714289951
0x479603DE...7Ac9E218d
0 ETH
Pool Info197523802024-04-28 7:39:11685 days ago1714289951
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197521372024-04-28 6:50:11685 days ago1714287011
0x479603DE...7Ac9E218d
0 ETH
Pool Info197521372024-04-28 6:50:11685 days ago1714287011
0x479603DE...7Ac9E218d
0 ETH
Pool Info197508962024-04-28 2:40:47685 days ago1714272047
0x479603DE...7Ac9E218d
0 ETH
Withdraw197508962024-04-28 2:40:47685 days ago1714272047
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197508962024-04-28 2:40:47685 days ago1714272047
0x479603DE...7Ac9E218d
0 ETH
Pool Info197508962024-04-28 2:40:47685 days ago1714272047
0x479603DE...7Ac9E218d
0 ETH
Withdraw197508382024-04-28 2:28:59685 days ago1714271339
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197508382024-04-28 2:28:59685 days ago1714271339
0x479603DE...7Ac9E218d
0 ETH
Pool Info197508382024-04-28 2:28:59685 days ago1714271339
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197508332024-04-28 2:27:59685 days ago1714271279
0x479603DE...7Ac9E218d
0 ETH
Pool Info197508332024-04-28 2:27:59685 days ago1714271279
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197507592024-04-28 2:13:11685 days ago1714270391
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197507592024-04-28 2:13:11685 days ago1714270391
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197507592024-04-28 2:13:11685 days ago1714270391
0x479603DE...7Ac9E218d
0 ETH
Pool Info197507592024-04-28 2:13:11685 days ago1714270391
0x479603DE...7Ac9E218d
0 ETH
Withdraw197491312024-04-27 20:44:35685 days ago1714250675
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197491312024-04-27 20:44:35685 days ago1714250675
0x479603DE...7Ac9E218d
0 ETH
Pool Info197491312024-04-27 20:44:35685 days ago1714250675
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197486282024-04-27 19:02:47685 days ago1714244567
0x479603DE...7Ac9E218d
0 ETH
Reward Claimed197486282024-04-27 19:02:47685 days ago1714244567
0x479603DE...7Ac9E218d
0 ETH
Pool Info197486282024-04-27 19:02:47685 days ago1714244567
0x479603DE...7Ac9E218d
0 ETH
Pool Info197486142024-04-27 18:59:59685 days ago1714244399
0x479603DE...7Ac9E218d
0 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PendleBoosterMainchain

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 20 : PendleBoosterMainchain.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "./PendleBoosterBaseUpg.sol";

contract PendleBoosterMainchain is PendleBoosterBaseUpg {
    using TransferHelper for address;

    function initialize() public initializer {
        __PendleBoosterBaseUpg_init();
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 3 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

library AddressLib {
    address public constant PLATFORM_TOKEN_ADDRESS =
        0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf;

    function isPlatformToken(address addr) internal pure returns (bool) {
        return addr == PLATFORM_TOKEN_ADDRESS;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./AddressLib.sol";

library TransferHelper {

    using AddressLib for address;

    function safeTransferToken(
        address token,
        address to,
        uint value
    ) internal {
        if (token.isPlatformToken()) {
            safeTransferETH(to, value);
        } else {
            safeTransfer(IERC20(token), to, value);
        }
    }

    function safeTransferETH(
        address to,
        uint value
    ) internal {
        (bool success, ) = address(to).call{value: value}("");
        require(success, "TransferHelper: Sending ETH failed");
    }

    function balanceOf(address token, address addr) internal view returns (uint) {
        if (token.isPlatformToken()) {
            return addr.balance;
        } else {
            return IERC20(token).balanceOf(addr);
        }
    }

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

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

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "./IRewards.sol";

interface IBaseRewardPool is IRewards {
    function setParams(
        uint256 _pid,
        address _stakingToken,
        address _rewardToken
    ) external;

    function totalSupply() external view returns (uint256);

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

    function stake(uint256) external;

    function stakeAll() external;

    function stakeFor(address, uint256) external;

    function withdraw(uint256) external;

    function withdrawAll() external;

    function donate(address, uint256) external payable;

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

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

    function getRewardTokens() external view returns (address[] memory);

    function getRewardTokensLength() external view returns (uint256);

    function getReward(address) external;

    function withdrawFor(address _account, uint256 _amount) external;

    event BoosterUpdated(address _booster);
    event RewardTokenAdded(address indexed _rewardToken);
    event Staked(address indexed _user, uint256 _amount);
    event Withdrawn(address indexed _user, uint256 _amount);
    event EmergencyWithdrawn(address indexed _user, uint256 _amount);
    event RewardPaid(
        address indexed _user,
        address indexed _rewardToken,
        uint256 _reward
    );
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IDepositToken {
    function mint(address _to, uint256 _amount) external;

    function burn(address _from, uint256 _amount) external;
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IEqbMinter {
    function mint(address _to, uint256 _amount) external returns (uint256);

    event Minted(address indexed _to, uint256 _amount);
    event MintedAmountUpdated(uint256 _amount);
    event AccessUpdated(address _operator, bool _access);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IPendleBooster {
    function poolLength() external view returns (uint256);

    function poolInfo(
        uint256
    ) external view returns (address, address, address, bool);

    function deposit(uint256 _pid, uint256 _amount, bool _stake) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

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

    event Deposited(
        address indexed _user,
        uint256 indexed _poolid,
        uint256 _amount
    );
    event Withdrawn(
        address indexed _user,
        uint256 indexed _poolid,
        uint256 _amount
    );
    event RewardClaimed(
        uint256 _pid,
        address indexed _rewardToken,
        uint256 _amount
    );
    event EarmarkIncentiveSent(
        uint256 _pid,
        address indexed _caller,
        address indexed _token,
        uint256 _amount
    );
    event TreasurySent(uint256 _pid, address indexed _token, uint256 _amount);
    event EqbRewardsSent(
        address indexed _to,
        uint256 _eqbAmount,
        uint256 _xEqbAmount
    );
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IPendleDepositor {
    function deposit(uint256, bool) external;

    event Deposited(address indexed _user, uint256 _amount);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IPendleProxy {
    function isValidMarket(address _market) external view returns (bool);

    function withdraw(address _market, address _to, uint256 _amount) external;

    function claimRewards(
        address _market
    ) external returns (address[] memory, uint256[] memory);

    function claimRewardsManually(
        address _market,
        uint256[] memory _amounts
    ) external returns (address[] memory rewardTokens);

    // --- Events ---
    event BoosterUpdated(address _booster);

    event Withdrawn(address _market, address _to, uint256 _amount);

    event RewardsClaimed(
        address _market,
        address[] _rewardTokens,
        uint256[] _rewardAmounts
    );
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IRewards {
    function queueNewRewards(address, uint256) external payable;

    event RewardAdded(address indexed _rewardToken, uint256 _reward);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IXEqbToken {
    function convert(uint256 amount) external;

    function convertTo(uint256 amount, address to) external;

    /********************************************/
    /****************** EVENTS ******************/
    /********************************************/

    event Convert(address indexed from, address to, uint256 amount);
    event UpdateRedeemSettings(
        uint256 minRedeemRatio,
        uint256 maxRedeemRatio,
        uint256 minRedeemDuration,
        uint256 maxRedeemDuration
    );
    event SetTransferWhitelist(address account, bool add);
    event Redeem(
        address indexed userAddress,
        uint256 xEqbAmount,
        uint256 eqbAmount,
        uint256 duration
    );
    event FinalizeRedeem(
        address indexed userAddress,
        address indexed receiverAddress,
        uint256 xEqbAmount,
        uint256 eqbAmount
    );
    event CancelRedeem(address indexed userAddress, uint256 xEqbAmount);
    event Lock(
        address indexed _userAddress,
        uint256 _xEqbAmount,
        uint256 _eqbAmount,
        uint256 _weeks
    );
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import "./Interfaces/IXEqbToken.sol";
import "@shared/lib-contracts-v0.8/contracts/Dependencies/TransferHelper.sol";
import "./Interfaces/IPendleBooster.sol";
import "./Interfaces/IPendleProxy.sol";
import "./Interfaces/IDepositToken.sol";
import "./Interfaces/IPendleDepositor.sol";
import "./Interfaces/IEqbMinter.sol";
import "./Interfaces/IBaseRewardPool.sol";

abstract contract PendleBoosterBaseUpg is IPendleBooster, OwnableUpgradeable {
    using SafeERC20 for IERC20;
    using TransferHelper for address;

    address public pendle;

    address public pendleProxy;
    address public eqbMinter;
    address public eqb;
    address public xEqb;
    address public vlEqb;
    address public treasury;
    address public ePendleRewardReceiver; // ePendle rewards receiver
    address public ePendleRewardPool; // ePendle rewards pool
    address public contributor;

    uint256 public constant DENOMINATOR = 10000;
    uint256 public constant MaxFees = 3500;
    uint256 public vlEqbIncentive; // incentive to eqb lockers
    uint256 public ePendleIncentive; //incentive to pendle stakers
    uint256 public platformFee; // possible fee to build treasury
    uint256 public earmarkIncentive; // incentive to earmark caller

    uint256 public farmEqbShare;
    uint256 public teamEqbShare;

    bool public isShutdown;

    struct PoolInfo {
        address market;
        address token;
        address rewardPool;
        bool shutdown;
    }

    // index(pid) -> pool
    PoolInfo[] public override poolInfo;

    bool public earmarkOnOperation;

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    function __PendleBoosterBaseUpg_init() internal onlyInitializing {
        __PendleBoosterBaseUpg_init_unchained();
    }

    function __PendleBoosterBaseUpg_init_unchained() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    /// SETTER SECTION ///

    function setParams(
        address _pendle,
        address _pendleProxy,
        address _eqbMinter,
        address _eqb,
        address _xEqb,
        address _vlEqb,
        address _ePendleRewardReceiver,
        address _ePendleRewardPool,
        address _treasury
    ) external onlyOwner {
        require(pendleProxy == address(0), "params has already been set");

        require(_pendle != address(0), "invalid _pendle!");
        require(_pendleProxy != address(0), "invalid _pendleProxy!");
        require(_eqbMinter != address(0), "invalid _eqbMinter!");
        require(_eqb != address(0), "invalid _eqb!");
        require(_xEqb != address(0), "invalid _xEqb!");
        require(_vlEqb != address(0), "invalid _vlEqb!");
        require(
            _ePendleRewardReceiver != address(0),
            "invalid _ePendleRewardReceiver!"
        );
        require(
            _ePendleRewardPool != address(0),
            "invalid _ePendleRewardPool!"
        );
        require(_treasury != address(0), "invalid _treasury!");

        isShutdown = false;

        pendle = _pendle;

        pendleProxy = _pendleProxy;
        eqbMinter = _eqbMinter;
        eqb = _eqb;
        xEqb = _xEqb;
        vlEqb = _vlEqb;

        ePendleRewardReceiver = _ePendleRewardReceiver;
        ePendleRewardPool = _ePendleRewardPool;

        treasury = _treasury;

        vlEqbIncentive = 500;
        ePendleIncentive = 1500;
        platformFee = 250;
        earmarkIncentive = 50;

        farmEqbShare = 2500;
        teamEqbShare = 5000;

        earmarkOnOperation = true;
    }

    function setVlEqb(address _vlEqb) external onlyOwner {
        require(_vlEqb != address(0), "invalid _vlEqb");
        vlEqb = _vlEqb;
    }

    function setFees(
        uint256 _vlEqbIncentive,
        uint256 _ePendleIncentive,
        uint256 _platformFee,
        uint256 _earmarkIncentive
    ) external onlyOwner {
        require(
            _ePendleIncentive +
                _vlEqbIncentive +
                _platformFee +
                _earmarkIncentive <=
                MaxFees,
            ">MaxFees"
        );

        //values must be within certain ranges
        require(
            _vlEqbIncentive >= 0 && _vlEqbIncentive <= 1000,
            "invalid _vlEqbIncentive"
        );
        require(
            _ePendleIncentive >= 800 && _ePendleIncentive <= 2000,
            "invalid _ePendleIncentive"
        );
        require(
            _platformFee >= 0 && _platformFee <= 500,
            "invalid _platformFee"
        );
        require(
            _earmarkIncentive >= 0 && _earmarkIncentive <= 100,
            "invalid _earmarkIncentive"
        );

        vlEqbIncentive = _vlEqbIncentive;
        ePendleIncentive = _ePendleIncentive;
        platformFee = _platformFee;
        earmarkIncentive = _earmarkIncentive;
    }

    function setFarmEqbShare(uint256 _farmEqbShare) external onlyOwner {
        require(_farmEqbShare <= DENOMINATOR, "invalid _farmEqbShare");
        farmEqbShare = _farmEqbShare;
    }

    function setTeamEqbShare(uint256 _teamEqbShare) external onlyOwner {
        require(_teamEqbShare <= DENOMINATOR, "invalid _teamEqbShare");
        teamEqbShare = _teamEqbShare;
    }

    function setTreasury(address _treasury) external onlyOwner {
        treasury = _treasury;
    }

    function setContributor(address _contributor) external onlyOwner {
        contributor = _contributor;
    }

    function setEarmarkOnOperation(
        bool _earmarkOnOperation
    ) external onlyOwner {
        earmarkOnOperation = _earmarkOnOperation;
    }

    /// END SETTER SECTION ///

    function poolLength() external view override returns (uint256) {
        return poolInfo.length;
    }

    // create a new pool
    function addPool(
        address _market,
        address _token,
        address _rewardPool
    ) external onlyOwner {
        require(!isShutdown, "!add");

        require(
            IPendleProxy(pendleProxy).isValidMarket(_market),
            "invalid _market"
        );

        // the next pool's pid
        uint256 pid = poolInfo.length;

        // config pendle rewards
        IBaseRewardPool(_rewardPool).setParams(pid, _token, pendle);

        // add the new pool
        poolInfo.push(
            PoolInfo({
                market: _market,
                token: _token,
                rewardPool: _rewardPool,
                shutdown: false
            })
        );
    }

    // shutdown pool
    function shutdownPool(uint256 _pid) public onlyOwner {
        PoolInfo storage pool = poolInfo[_pid];
        require(!pool.shutdown, "already shutdown!");

        pool.shutdown = true;
    }

    // shutdown this contract.
    // only allow withdrawals
    function shutdownSystem() external onlyOwner {
        isShutdown = true;

        for (uint256 i = 0; i < poolInfo.length; i++) {
            PoolInfo storage pool = poolInfo[i];
            if (pool.shutdown) {
                continue;
            }

            shutdownPool(i);
        }
    }

    // deposit market tokens and stake
    function deposit(
        uint256 _pid,
        uint256 _amount,
        bool _stake
    ) public override {
        require(!isShutdown, "shutdown");
        PoolInfo memory pool = poolInfo[_pid];
        require(pool.shutdown == false, "pool is closed");

        if (earmarkOnOperation) {
            _earmarkRewards(_pid, address(0), new uint256[](0));
        }

        // send to proxy
        address market = pool.market;
        IERC20(market).safeTransferFrom(msg.sender, pendleProxy, _amount);

        address token = pool.token;
        if (_stake) {
            // mint here and send to rewards on user behalf
            IDepositToken(token).mint(address(this), _amount);
            address rewardContract = pool.rewardPool;
            _approveTokenIfNeeded(token, rewardContract, _amount);
            IBaseRewardPool(rewardContract).stakeFor(msg.sender, _amount);
        } else {
            // add user balance directly
            IDepositToken(token).mint(msg.sender, _amount);
        }

        emit Deposited(msg.sender, _pid, _amount);
    }

    //deposit all market tokens and stake
    function depositAll(uint256 _pid, bool _stake) external {
        address market = poolInfo[_pid].market;
        uint256 balance = IERC20(market).balanceOf(msg.sender);
        deposit(_pid, balance, _stake);
    }

    // withdraw market tokens
    function _withdraw(
        uint256 _pid,
        uint256 _amount,
        address _from,
        address _to
    ) internal {
        PoolInfo memory pool = poolInfo[_pid];
        address market = pool.market;

        address token = pool.token;
        IDepositToken(token).burn(_from, _amount);

        if (earmarkOnOperation) {
            _earmarkRewards(_pid, address(0), new uint256[](0));
        }

        // return market tokens
        IPendleProxy(pendleProxy).withdraw(market, _to, _amount);

        emit Withdrawn(_to, _pid, _amount);
    }

    function withdraw(uint256 _pid, uint256 _amount) public override {
        _withdraw(_pid, _amount, msg.sender, msg.sender);
    }

    function withdrawAll(uint256 _pid) external {
        address token = poolInfo[_pid].token;
        uint256 userBal = IERC20(token).balanceOf(msg.sender);
        withdraw(_pid, userBal);
    }

    // disperse pendle and extra rewards to reward contracts
    function _earmarkRewards(
        uint256 _pid,
        address _caller,
        uint256[] memory _rewardAmounts
    ) internal {
        PoolInfo memory pool = poolInfo[_pid];
        address[] memory rewardTokens;
        if (_rewardAmounts.length > 0) {
            rewardTokens = IPendleProxy(pendleProxy).claimRewardsManually(
                pool.market,
                _rewardAmounts
            );
        } else {
            (rewardTokens, _rewardAmounts) = IPendleProxy(pendleProxy)
                .claimRewards(pool.market);
        }

        for (uint256 i = 0; i < rewardTokens.length; i++) {
            address rewardToken = rewardTokens[i];
            uint256 rewardAmount = _rewardAmounts[i];
            if (rewardToken == address(0) || rewardAmount == 0) {
                continue;
            }
            if (rewardToken.balanceOf(address(this)) < rewardAmount) {
                continue;
            }
            emit RewardClaimed(_pid, rewardToken, rewardAmount);

            uint256 vlEqbIncentiveAmount = (rewardAmount * vlEqbIncentive) /
                DENOMINATOR;
            uint256 ePendleIncentiveAmount = (rewardAmount * ePendleIncentive) /
                DENOMINATOR;

            uint256 earmarkIncentiveAmount = 0;
            if (_caller != address(0) && earmarkIncentive > 0) {
                earmarkIncentiveAmount =
                    (rewardAmount * earmarkIncentive) /
                    DENOMINATOR;

                // send incentives for calling
                rewardToken.safeTransferToken(_caller, earmarkIncentiveAmount);

                emit EarmarkIncentiveSent(
                    _pid,
                    _caller,
                    rewardToken,
                    earmarkIncentiveAmount
                );
            }

            // send treasury
            uint256 platform = 0;
            if (platformFee > 0) {
                platform = (rewardAmount * platformFee) / DENOMINATOR;
                rewardToken.safeTransferToken(treasury, platform);
                emit TreasurySent(_pid, rewardToken, platform);
            }

            // remove incentives from balance
            rewardAmount =
                rewardAmount -
                vlEqbIncentiveAmount -
                ePendleIncentiveAmount -
                earmarkIncentiveAmount -
                platform;

            // send lp provider reward contract
            _sendReward(pool.rewardPool, rewardToken, rewardAmount);

            // send to vlEqb
            if (vlEqbIncentiveAmount > 0) {
                rewardToken.safeTransferToken(vlEqb, vlEqbIncentiveAmount);
            }

            // send to ePendle reward contract
            if (ePendleIncentiveAmount > 0) {
                rewardToken.safeTransferToken(
                    ePendleRewardReceiver,
                    ePendleIncentiveAmount
                );
            }
        }
    }

    function earmarkRewards(uint256 _pid) external {
        require(!isShutdown, "shutdown");
        PoolInfo memory pool = poolInfo[_pid];
        require(pool.shutdown == false, "pool is closed");

        _earmarkRewards(_pid, msg.sender, new uint256[](0));
    }

    function earmarkRewardsManually(
        uint256 _pid,
        uint256[] memory _amounts
    ) external onlyOwner {
        _earmarkRewards(_pid, address(0), _amounts);
    }

    // callback from reward contract when pendle is received.
    function rewardClaimed(
        uint256 _pid,
        address _account,
        address _token,
        uint256 _amount
    ) external override {
        PoolInfo memory pool = poolInfo[_pid];
        require(
            msg.sender == pool.rewardPool || msg.sender == ePendleRewardPool,
            "!auth"
        );

        if (_token != pendle || isShutdown) {
            return;
        }

        // mint eqb
        _mintEqbRewards(_account, _amount, farmEqbShare);

        if (contributor == address(0)) {
            return;
        }
        uint256 contributorAmount = _getContributorAmount(pool, _amount);
        if (contributorAmount > 0) {
            _mintEqbRewards(contributor, contributorAmount, teamEqbShare);
        }
    }

    function _mintEqbRewards(
        address _to,
        uint256 _amount,
        uint256 _share
    ) internal {
        // mint eqb
        uint256 mintAmount = IEqbMinter(eqbMinter).mint(address(this), _amount);
        uint256 eqbAmount = (mintAmount * _share) / DENOMINATOR;
        IERC20(eqb).safeTransfer(_to, eqbAmount);

        uint256 xEqbAmount = mintAmount - eqbAmount;
        _approveTokenIfNeeded(eqb, xEqb, xEqbAmount);
        IXEqbToken(xEqb).convertTo(xEqbAmount, _to);

        emit EqbRewardsSent(_to, eqbAmount, xEqbAmount);
    }

    function _sendReward(
        address _rewardPool,
        address _rewardToken,
        uint256 _rewardAmount
    ) internal {
        if (_rewardAmount == 0) {
            return;
        }
        if (AddressLib.isPlatformToken(_rewardToken)) {
            IRewards(_rewardPool).queueNewRewards{value: _rewardAmount}(
                _rewardToken,
                _rewardAmount
            );
        } else {
            _approveTokenIfNeeded(_rewardToken, _rewardPool, _rewardAmount);
            IRewards(_rewardPool).queueNewRewards(_rewardToken, _rewardAmount);
        }
    }

    function _getContributorAmount(
        PoolInfo memory _pool,
        uint256 _amount
    ) internal view returns (uint256) {
        address market = _pool.market;
        uint256 share = (IERC20(market).balanceOf(pendleProxy) * DENOMINATOR) /
            IERC20(market).totalSupply();
        uint256 percent;
        if (share <= 1000) {
            // [0%, 10%], 0.00%
            percent = 0;
        } else if (share <= 2000) {
            // (10%, 20%], 12.30%
            percent = 1230;
        } else if (share <= 3000) {
            // (20%, 30%], 24.40%
            percent = 2440;
        } else {
            // (30%, 100%], 36.60%
            percent = 3660;
        }
        return (_amount * percent) / DENOMINATOR;
    }

    function _approveTokenIfNeeded(
        address _token,
        address _to,
        uint256 _amount
    ) internal {
        if (IERC20(_token).allowance(address(this), _to) < _amount) {
            IERC20(_token).safeApprove(_to, 0);
            IERC20(_token).safeApprove(_to, type(uint256).max);
        }
    }

    receive() external payable {}

    uint256[100] private __gap;
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_poolid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"_caller","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EarmarkIncentiveSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_eqbAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_xEqbAmount","type":"uint256"}],"name":"EqbRewardsSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TreasurySent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_poolid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_rewardPool","type":"address"}],"name":"addPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_stake","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"bool","name":"_stake","type":"bool"}],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ePendleIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ePendleRewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ePendleRewardReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earmarkIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earmarkOnOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"earmarkRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"earmarkRewardsManually","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eqb","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eqbMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmEqbShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isShutdown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendleProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"rewardPool","type":"address"},{"internalType":"bool","name":"shutdown","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rewardClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contributor","type":"address"}],"name":"setContributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_earmarkOnOperation","type":"bool"}],"name":"setEarmarkOnOperation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_farmEqbShare","type":"uint256"}],"name":"setFarmEqbShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vlEqbIncentive","type":"uint256"},{"internalType":"uint256","name":"_ePendleIncentive","type":"uint256"},{"internalType":"uint256","name":"_platformFee","type":"uint256"},{"internalType":"uint256","name":"_earmarkIncentive","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendle","type":"address"},{"internalType":"address","name":"_pendleProxy","type":"address"},{"internalType":"address","name":"_eqbMinter","type":"address"},{"internalType":"address","name":"_eqb","type":"address"},{"internalType":"address","name":"_xEqb","type":"address"},{"internalType":"address","name":"_vlEqb","type":"address"},{"internalType":"address","name":"_ePendleRewardReceiver","type":"address"},{"internalType":"address","name":"_ePendleRewardPool","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"name":"setParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_teamEqbShare","type":"uint256"}],"name":"setTeamEqbShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vlEqb","type":"address"}],"name":"setVlEqb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"shutdownPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shutdownSystem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"teamEqbShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vlEqb","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vlEqbIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xEqb","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61385a80620000f46000396000f3fe6080604052600436106102eb5760003560e01c8063747947cc11610184578063b4a049ee116100d6578063e2ef68241161008a578063fb06a59b11610064578063fb06a59b1461080f578063fd21730014610825578063fd9d339c1461083b57600080fd5b8063e2ef6824146107af578063f0f44260146107cf578063f2fde38b146107ef57600080fd5b8063bf86d690116100bb578063bf86d69014610755578063cb34494e1461076f578063cc956f3f1461078f57600080fd5b8063b4a049ee14610715578063ba80d7871461073557600080fd5b806393d484b011610138578063984a496811610112578063984a4968146106b5578063a2c530da146106d5578063aba65098146106f557600080fd5b806393d484b014610655578063958e2d3114610675578063983103e01461069557600080fd5b80638adfa64f116101695780638adfa64f146106015780638da5cb5b14610621578063918f86741461063f57600080fd5b8063747947cc146105cc5780638129fc1c146105ec57600080fd5b80634e8b0f131161023d57806360cafe84116101f15780636fcba377116101cb5780636fcba37714610581578063715018a6146105a15780637303df9a146105b657600080fd5b806360cafe841461052157806361d027b314610541578063646fcdd21461056157600080fd5b806355d4c2441161022257806355d4c244146104c15780635baa3108146104e157806360759fce1461050157600080fd5b80634e8b0f13146104955780634f7d3b81146104ab57600080fd5b80632c1f1c6d1161029f5780633a088cd2116102795780633a088cd21461043f57806343a0d06614610455578063441a3e701461047557600080fd5b80632c1f1c6d146103e85780632dd056831461040a578063354af9191461042a57600080fd5b80631526fe27116102d05780631526fe271461034557806321e2e21d1461039a57806326232a2e146103d257600080fd5b8063081e3eda146102f7578063092a4c761461031b57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b506076545b6040519081526020015b60405180910390f35b34801561032757600080fd5b506077546103359060ff1681565b6040519015158152602001610312565b34801561035157600080fd5b506103656103603660046131a4565b61085b565b60405161031294939291906001600160a01b039485168152928416602084015292166040820152901515606082015260800190565b3480156103a657600080fd5b506067546103ba906001600160a01b031681565b6040516001600160a01b039091168152602001610312565b3480156103de57600080fd5b5061030860715481565b3480156103f457600080fd5b506104086104033660046131d2565b6108aa565b005b34801561041657600080fd5b506104086104253660046131ef565b6108d4565b34801561043657600080fd5b50610408610a32565b34801561044b57600080fd5b5061030860725481565b34801561046157600080fd5b50610408610470366004613245565b610ab6565b34801561048157600080fd5b5061040861049036600461327e565b610dab565b3480156104a157600080fd5b5061030860705481565b3480156104b757600080fd5b5061030860735481565b3480156104cd57600080fd5b50606d546103ba906001600160a01b031681565b3480156104ed57600080fd5b50606c546103ba906001600160a01b031681565b34801561050d57600080fd5b5061040861051c3660046132a0565b610dbb565b34801561052d57600080fd5b5061040861053c3660046131a4565b610e5a565b34801561054d57600080fd5b50606b546103ba906001600160a01b031681565b34801561056d57600080fd5b506068546103ba906001600160a01b031681565b34801561058d57600080fd5b5061040861059c3660046132d0565b610f18565b3480156105ad57600080fd5b506104086110fa565b3480156105c257600080fd5b50610308610dac81565b3480156105d857600080fd5b506104086105e7366004613302565b61110e565b3480156105f857600080fd5b5061040861154e565b34801561060d57600080fd5b5061040861061c3660046131a4565b61166d565b34801561062d57600080fd5b506033546001600160a01b03166103ba565b34801561064b57600080fd5b5061030861271081565b34801561066157600080fd5b506069546103ba906001600160a01b031681565b34801561068157600080fd5b506104086106903660046131a4565b6116cc565b3480156106a157600080fd5b50606a546103ba906001600160a01b031681565b3480156106c157600080fd5b506104086106d0366004613429565b611772565b3480156106e157600080fd5b506065546103ba906001600160a01b031681565b34801561070157600080fd5b506104086107103660046134cb565b611786565b34801561072157600080fd5b506104086107303660046131a4565b611a55565b34801561074157600080fd5b50606e546103ba906001600160a01b031681565b34801561076157600080fd5b506075546103359060ff1681565b34801561077b57600080fd5b5061040861078a3660046131d2565b611ab4565b34801561079b57600080fd5b506104086107aa3660046131a4565b611b34565b3480156107bb57600080fd5b506104086107ca36600461350b565b611c3b565b3480156107db57600080fd5b506104086107ea3660046131d2565b611c56565b3480156107fb57600080fd5b5061040861080a3660046131d2565b611c80565b34801561081b57600080fd5b5061030860745481565b34801561083157600080fd5b50610308606f5481565b34801561084757600080fd5b506066546103ba906001600160a01b031681565b6076818154811061086b57600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0391821693509181169190811690600160a01b900460ff1684565b6108b2611d0d565b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000607685815481106108e9576108e9613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b039081168452600182015481169484019490945260020154928316908201819052600160a01b90920460ff1615156060820152915033148061095c5750606d546001600160a01b031633145b6109ad5760405162461bcd60e51b815260206004820152600560248201527f216175746800000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6065546001600160a01b0384811691161415806109cc575060755460ff165b156109d75750610a2c565b6109e48483607354611d67565b606e546001600160a01b03166109fa5750610a2c565b6000610a068284611f09565b90508015610a2957606e54607454610a29916001600160a01b0316908390611d67565b50505b50505050565b610a3a611d0d565b6075805460ff1916600117905560005b607654811015610ab357600060768281548110610a6957610a69613528565b906000526020600020906003020190508060020160149054906101000a900460ff1615610a965750610aa1565b610a9f82610e5a565b505b80610aab81613554565b915050610a4a565b50565b60755460ff1615610af45760405162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b60448201526064016109a4565b600060768481548110610b0957610b09613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161580156060830152909150610bb15760405162461bcd60e51b815260206004820152600e60248201527f706f6f6c20697320636c6f73656400000000000000000000000000000000000060448201526064016109a4565b60775460ff1615610bf357610bf3846000805b604051908082528060200260200182016040528015610bed578160200160208202803683370190505b5061205d565b8051606654610c11906001600160a01b0380841691339116876124e1565b60208201518315610d0b576040516340c10f1960e01b8152306004820152602481018690526001600160a01b038216906340c10f1990604401600060405180830381600087803b158015610c6457600080fd5b505af1158015610c78573d6000803e3d6000fd5b505050506040830151610c8c828288612592565b6040517f2ee40908000000000000000000000000000000000000000000000000000000008152336004820152602481018790526001600160a01b03821690632ee4090890604401600060405180830381600087803b158015610ced57600080fd5b505af1158015610d01573d6000803e3d6000fd5b5050505050610d6c565b6040516340c10f1960e01b8152336004820152602481018690526001600160a01b038216906340c10f1990604401600060405180830381600087803b158015610d5357600080fd5b505af1158015610d67573d6000803e3d6000fd5b505050505b604051858152869033907f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca9060200160405180910390a3505050505050565b610db782823333612636565b5050565b600060768381548110610dd057610dd0613528565b60009182526020822060039190910201546040516370a0823160e01b81523360048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015610e29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4d919061356d565b9050610a2c848285610ab6565b610e62611d0d565b600060768281548110610e7757610e77613528565b906000526020600020906003020190508060020160149054906101000a900460ff1615610ee65760405162461bcd60e51b815260206004820152601160248201527f616c72656164792073687574646f776e2100000000000000000000000000000060448201526064016109a4565b60020180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17905550565b610f20611d0d565b610dac8183610f2f8787613586565b610f399190613586565b610f439190613586565b1115610f915760405162461bcd60e51b815260206004820152600860248201527f3e4d61784665657300000000000000000000000000000000000000000000000060448201526064016109a4565b6103e8841115610fe35760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205f766c457162496e63656e7469766500000000000000000060448201526064016109a4565b6103208310158015610ff757506107d08311155b6110435760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964205f6550656e646c65496e63656e746976650000000000000060448201526064016109a4565b6101f48211156110955760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964205f706c6174666f726d46656500000000000000000000000060448201526064016109a4565b60648111156110e65760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964205f6561726d61726b496e63656e746976650000000000000060448201526064016109a4565b606f93909355607091909155607155607255565b611102611d0d565b61110c6000612808565b565b611116611d0d565b6066546001600160a01b03161561116f5760405162461bcd60e51b815260206004820152601b60248201527f706172616d732068617320616c7265616479206265656e20736574000000000060448201526064016109a4565b6001600160a01b0389166111c55760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964205f70656e646c65210000000000000000000000000000000060448201526064016109a4565b6001600160a01b03881661121b5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f70656e646c6550726f787921000000000000000000000060448201526064016109a4565b6001600160a01b0387166112715760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964205f6571624d696e746572210000000000000000000000000060448201526064016109a4565b6001600160a01b0386166112c75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964205f657162210000000000000000000000000000000000000060448201526064016109a4565b6001600160a01b03851661131d5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f784571622100000000000000000000000000000000000060448201526064016109a4565b6001600160a01b0384166113735760405162461bcd60e51b815260206004820152600f60248201527f696e76616c6964205f766c45716221000000000000000000000000000000000060448201526064016109a4565b6001600160a01b0383166113c95760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964205f6550656e646c655265776172645265636569766572210060448201526064016109a4565b6001600160a01b03821661141f5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964205f6550656e646c65526577617264506f6f6c21000000000060448201526064016109a4565b6001600160a01b0381166114755760405162461bcd60e51b815260206004820152601260248201527f696e76616c6964205f747265617375727921000000000000000000000000000060448201526064016109a4565b6075805460ff19908116909155606580546001600160a01b03199081166001600160a01b039c8d16179091556066805482169a8c169a909a17909955606780548a16988b1698909817909755606880548916968a169690961790955560698054881694891694909417909355606a8054871692881692909217909155606c80548616918716919091179055606d80548516918616919091179055606b805490931693169290921790556101f4606f556105dc60705560fa60715560326072556109c4607355611388607455607780549091166001179055565b600054610100900460ff161580801561156e5750600054600160ff909116105b806115885750303b158015611588575060005460ff166001145b6115fa5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109a4565b6000805460ff19166001179055801561161d576000805461ff0019166101001790555b61162561285a565b8015610ab3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b611675611d0d565b6127108111156116c75760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f7465616d4571625368617265000000000000000000000060448201526064016109a4565b607455565b6000607682815481106116e1576116e1613528565b60009182526020822060039190910201600101546040516370a0823160e01b81523360048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa15801561173d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611761919061356d565b905061176d8382610dab565b505050565b61177a611d0d565b610db78260008361205d565b61178e611d0d565b60755460ff16156117e35760405162461bcd60e51b81526004016109a49060208082526004908201527f2161646400000000000000000000000000000000000000000000000000000000604082015260600190565b6066546040517f58e6309f0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906358e6309f90602401602060405180830381865afa158015611846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186a9190613599565b6118b65760405162461bcd60e51b815260206004820152600f60248201527f696e76616c6964205f6d61726b6574000000000000000000000000000000000060448201526064016109a4565b6076546065546040517ff376d798000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03858116602483015291821660448201529083169063f376d79890606401600060405180830381600087803b15801561192857600080fd5b505af115801561193c573d6000803e3d6000fd5b5050604080516080810182526001600160a01b03978816815295871660208701908152948716908601908152600060608701818152607680546001810182559252965160039091027fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed481018054928a166001600160a01b031993841617905595517fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed587018054918a1691909216179055517fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed6909401805495511515600160a01b027fffffffffffffffffffffff000000000000000000000000000000000000000000909616949096169390931793909317909355505050565b611a5d611d0d565b612710811115611aaf5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f6661726d4571625368617265000000000000000000000060448201526064016109a4565b607355565b611abc611d0d565b6001600160a01b038116611b125760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f766c45716200000000000000000000000000000000000060448201526064016109a4565b606a80546001600160a01b0319166001600160a01b0392909216919091179055565b60755460ff1615611b725760405162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b60448201526064016109a4565b600060768281548110611b8757611b87613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161580156060830152909150611c2f5760405162461bcd60e51b815260206004820152600e60248201527f706f6f6c20697320636c6f73656400000000000000000000000000000000000060448201526064016109a4565b610db782336000610bc4565b611c43611d0d565b6077805460ff1916911515919091179055565b611c5e611d0d565b606b80546001600160a01b0319166001600160a01b0392909216919091179055565b611c88611d0d565b6001600160a01b038116611d045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a4565b610ab381612808565b6033546001600160a01b0316331461110c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a4565b6067546040516340c10f1960e01b8152306004820152602481018490526000916001600160a01b0316906340c10f19906044016020604051808303816000875af1158015611db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddd919061356d565b90506000612710611dee84846135b6565b611df891906135cd565b606854909150611e12906001600160a01b031686836128cd565b6000611e1e82846135ef565b606854606954919250611e3e916001600160a01b03918216911683612592565b6069546040517f5a1d34dc000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03888116602483015290911690635a1d34dc90604401600060405180830381600087803b158015611ea557600080fd5b505af1158015611eb9573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b038a1693507f73e52f1e16a2ca14e6073adf347cbfb544c812b1c1c91161c8d631929c1ed0bd92500160405180910390a2505050505050565b600080836000015190506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f77919061356d565b6066546040516370a0823160e01b81526001600160a01b039182166004820152612710918516906370a0823190602401602060405180830381865afa158015611fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe8919061356d565b611ff291906135b6565b611ffc91906135cd565b905060006103e882116120115750600061203a565b6107d0821161202357506104ce61203a565b610bb88211612035575061098861203a565b50610e4c5b61271061204782876135b6565b61205191906135cd565b93505050505b92915050565b60006076848154811061207257612072613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161515606080830191909152835191925090156121725760665482516040517f81e11bd00000000000000000000000000000000000000000000000000000000081526001600160a01b03909216916381e11bd091612124918790600401613602565b6000604051808303816000875af1158015612143573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261216b91908101906136c8565b9050612205565b60665482516040517fef5cfb8c0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291169063ef5cfb8c906024016000604051808303816000875af11580156121d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122009190810190613705565b935090505b60005b8151811015610a2957600082828151811061222557612225613528565b60200260200101519050600085838151811061224357612243613528565b6020026020010151905060006001600160a01b0316826001600160a01b0316148061226c575080155b156122785750506124cf565b8061228c6001600160a01b038416306128fd565b10156122995750506124cf565b60408051898152602081018390526001600160a01b038416917f24b5efa61dd1cfc659205a97fb8ed868f3cb8c81922bab2b96423e5de1de2cb7910160405180910390a26000612710606f54836122f091906135b6565b6122fa91906135cd565b905060006127106070548461230f91906135b6565b61231991906135cd565b905060006001600160a01b038a161580159061233757506000607254115b156123c4576127106072548561234d91906135b6565b61235791906135cd565b905061236d6001600160a01b0386168b836129a5565b846001600160a01b03168a6001600160a01b03167feb61b3077d80c52baa13c8662f84cf95a6a0deacbaa6328777f483de4e5152528d846040516123bb929190918252602082015260400190565b60405180910390a35b6071546000901561244c57612710607154866123e091906135b6565b6123ea91906135cd565b606b54909150612407906001600160a01b038881169116836129a5565b604080518d8152602081018390526001600160a01b038816917f824a097e8d4e9580223eddbe4bf5cfd647cc4d997b60a0371177169fd3302c2d910160405180910390a25b80828461245987896135ef565b61246391906135ef565b61246d91906135ef565b61247791906135ef565b9450612488896040015187876129de565b83156124a857606a546124a8906001600160a01b038881169116866129a5565b82156124c857606c546124c8906001600160a01b038881169116856129a5565b5050505050505b806124d981613554565b915050612208565b6040516001600160a01b0380851660248301528316604482015260648101829052610a2c9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612aea565b604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015282919085169063dd62ed3e90604401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612605919061356d565b101561176d576126206001600160a01b038416836000612bcf565b61176d6001600160a01b03841683600019612bcf565b60006076858154811061264b5761264b613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b039081168085526001830154821695850186905260029092015480821685850152600160a01b900460ff161515606085015291517f9dc29fac0000000000000000000000000000000000000000000000000000000081529187166004830152602482018890529193509091908190639dc29fac90604401600060405180830381600087803b15801561270357600080fd5b505af1158015612717573d6000803e3d6000fd5b505060775460ff1615915061273490505761273487600080610bc4565b6066546040517fd9caed120000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528681166024830152604482018990529091169063d9caed1290606401600060405180830381600087803b1580156127a357600080fd5b505af11580156127b7573d6000803e3d6000fd5b5050505086846001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6886040516127f791815260200190565b60405180910390a350505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166128c55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c612d04565b6040516001600160a01b03831660248201526044810182905261176d90849063a9059cbb60e01b9060640161252e565b600073efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361293457506001600160a01b03811631612057565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa15801561297a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299e919061356d565b9050612057565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b038416036129d35761176d8282612d77565b61176d838383612e40565b806000036129eb57505050565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b03831603612a78576040516304d0c2c560e01b81526001600160a01b038381166004830152602482018390528416906304d0c2c59083906044016000604051808303818588803b158015612a5a57600080fd5b505af1158015612a6e573d6000803e3d6000fd5b5050505050505050565b612a83828483612592565b6040516304d0c2c560e01b81526001600160a01b038381166004830152602482018390528416906304d0c2c590604401600060405180830381600087803b158015612acd57600080fd5b505af1158015612ae1573d6000803e3d6000fd5b50505050505050565b6000612b3f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612f969092919063ffffffff16565b80519091501561176d5780806020019051810190612b5d9190613599565b61176d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109a4565b801580612c495750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c47919061356d565b155b612cbb5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016109a4565b6040516001600160a01b03831660248201526044810182905261176d9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161252e565b600054610100900460ff16612d6f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c612faf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612dc4576040519150601f19603f3d011682016040523d82523d6000602084013e612dc9565b606091505b505090508061176d5760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657248656c7065723a2053656e64696e6720455448206661696c60448201527f656400000000000000000000000000000000000000000000000000000000000060648201526084016109a4565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790529151600092839290871691612eb191906137d5565b6000604051808303816000865af19150503d8060008114612eee576040519150601f19603f3d011682016040523d82523d6000602084013e612ef3565b606091505b5091509150818015612f1d575080511580612f1d575080806020019051810190612f1d9190613599565b612f8f5760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016109a4565b5050505050565b6060612fa58484600085613023565b90505b9392505050565b600054610100900460ff1661301a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c33612808565b60608247101561309b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109a4565b6001600160a01b0385163b6130f25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a4565b600080866001600160a01b0316858760405161310e91906137d5565b60006040518083038185875af1925050503d806000811461314b576040519150601f19603f3d011682016040523d82523d6000602084013e613150565b606091505b509150915061316082828661316b565b979650505050505050565b6060831561317a575081612fa8565b82511561318a5782518084602001fd5b8160405162461bcd60e51b81526004016109a491906137f1565b6000602082840312156131b657600080fd5b5035919050565b6001600160a01b0381168114610ab357600080fd5b6000602082840312156131e457600080fd5b8135612fa8816131bd565b6000806000806080858703121561320557600080fd5b843593506020850135613217816131bd565b92506040850135613227816131bd565b9396929550929360600135925050565b8015158114610ab357600080fd5b60008060006060848603121561325a57600080fd5b8335925060208401359150604084013561327381613237565b809150509250925092565b6000806040838503121561329157600080fd5b50508035926020909101359150565b600080604083850312156132b357600080fd5b8235915060208301356132c581613237565b809150509250929050565b600080600080608085870312156132e657600080fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060008060006101208a8c03121561332157600080fd5b893561332c816131bd565b985060208a013561333c816131bd565b975060408a013561334c816131bd565b965060608a013561335c816131bd565b955060808a013561336c816131bd565b945060a08a013561337c816131bd565b935060c08a013561338c816131bd565b925060e08a013561339c816131bd565b91506101008a01356133ad816131bd565b809150509295985092959850929598565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156133fd576133fd6133be565b604052919050565b600067ffffffffffffffff82111561341f5761341f6133be565b5060051b60200190565b6000806040838503121561343c57600080fd5b8235915060208084013567ffffffffffffffff81111561345b57600080fd5b8401601f8101861361346c57600080fd5b803561347f61347a82613405565b6133d4565b81815260059190911b8201830190838101908883111561349e57600080fd5b928401925b828410156134bc578335825292840192908401906134a3565b80955050505050509250929050565b6000806000606084860312156134e057600080fd5b83356134eb816131bd565b925060208401356134fb816131bd565b91506040840135613273816131bd565b60006020828403121561351d57600080fd5b8135612fa881613237565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016135665761356661353e565b5060010190565b60006020828403121561357f57600080fd5b5051919050565b808201808211156120575761205761353e565b6000602082840312156135ab57600080fd5b8151612fa881613237565b80820281158282048414176120575761205761353e565b6000826135ea57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156120575761205761353e565b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561364c57845183529383019391830191600101613630565b5090979650505050505050565b600082601f83011261366a57600080fd5b8151602061367a61347a83613405565b82815260059290921b8401810191818101908684111561369957600080fd5b8286015b848110156136bd5780516136b0816131bd565b835291830191830161369d565b509695505050505050565b6000602082840312156136da57600080fd5b815167ffffffffffffffff8111156136f157600080fd5b6136fd84828501613659565b949350505050565b6000806040838503121561371857600080fd5b825167ffffffffffffffff8082111561373057600080fd5b61373c86838701613659565b935060209150818501518181111561375357600080fd5b85019050601f8101861361376657600080fd5b805161377461347a82613405565b81815260059190911b8201830190838101908883111561379357600080fd5b928401925b828410156134bc57835182529284019290840190613798565b60005b838110156137cc5781810151838201526020016137b4565b50506000910152565b600082516137e78184602087016137b1565b9190910192915050565b60208152600082518060208401526138108160408501602087016137b1565b601f01601f1916919091016040019291505056fea2646970667358221220996d61fd594742033c1c4bd455a8a8b3ff07835058cfec13361d0abb5adbbf9564736f6c63430008110033

Deployed Bytecode

0x6080604052600436106102eb5760003560e01c8063747947cc11610184578063b4a049ee116100d6578063e2ef68241161008a578063fb06a59b11610064578063fb06a59b1461080f578063fd21730014610825578063fd9d339c1461083b57600080fd5b8063e2ef6824146107af578063f0f44260146107cf578063f2fde38b146107ef57600080fd5b8063bf86d690116100bb578063bf86d69014610755578063cb34494e1461076f578063cc956f3f1461078f57600080fd5b8063b4a049ee14610715578063ba80d7871461073557600080fd5b806393d484b011610138578063984a496811610112578063984a4968146106b5578063a2c530da146106d5578063aba65098146106f557600080fd5b806393d484b014610655578063958e2d3114610675578063983103e01461069557600080fd5b80638adfa64f116101695780638adfa64f146106015780638da5cb5b14610621578063918f86741461063f57600080fd5b8063747947cc146105cc5780638129fc1c146105ec57600080fd5b80634e8b0f131161023d57806360cafe84116101f15780636fcba377116101cb5780636fcba37714610581578063715018a6146105a15780637303df9a146105b657600080fd5b806360cafe841461052157806361d027b314610541578063646fcdd21461056157600080fd5b806355d4c2441161022257806355d4c244146104c15780635baa3108146104e157806360759fce1461050157600080fd5b80634e8b0f13146104955780634f7d3b81146104ab57600080fd5b80632c1f1c6d1161029f5780633a088cd2116102795780633a088cd21461043f57806343a0d06614610455578063441a3e701461047557600080fd5b80632c1f1c6d146103e85780632dd056831461040a578063354af9191461042a57600080fd5b80631526fe27116102d05780631526fe271461034557806321e2e21d1461039a57806326232a2e146103d257600080fd5b8063081e3eda146102f7578063092a4c761461031b57600080fd5b366102f257005b600080fd5b34801561030357600080fd5b506076545b6040519081526020015b60405180910390f35b34801561032757600080fd5b506077546103359060ff1681565b6040519015158152602001610312565b34801561035157600080fd5b506103656103603660046131a4565b61085b565b60405161031294939291906001600160a01b039485168152928416602084015292166040820152901515606082015260800190565b3480156103a657600080fd5b506067546103ba906001600160a01b031681565b6040516001600160a01b039091168152602001610312565b3480156103de57600080fd5b5061030860715481565b3480156103f457600080fd5b506104086104033660046131d2565b6108aa565b005b34801561041657600080fd5b506104086104253660046131ef565b6108d4565b34801561043657600080fd5b50610408610a32565b34801561044b57600080fd5b5061030860725481565b34801561046157600080fd5b50610408610470366004613245565b610ab6565b34801561048157600080fd5b5061040861049036600461327e565b610dab565b3480156104a157600080fd5b5061030860705481565b3480156104b757600080fd5b5061030860735481565b3480156104cd57600080fd5b50606d546103ba906001600160a01b031681565b3480156104ed57600080fd5b50606c546103ba906001600160a01b031681565b34801561050d57600080fd5b5061040861051c3660046132a0565b610dbb565b34801561052d57600080fd5b5061040861053c3660046131a4565b610e5a565b34801561054d57600080fd5b50606b546103ba906001600160a01b031681565b34801561056d57600080fd5b506068546103ba906001600160a01b031681565b34801561058d57600080fd5b5061040861059c3660046132d0565b610f18565b3480156105ad57600080fd5b506104086110fa565b3480156105c257600080fd5b50610308610dac81565b3480156105d857600080fd5b506104086105e7366004613302565b61110e565b3480156105f857600080fd5b5061040861154e565b34801561060d57600080fd5b5061040861061c3660046131a4565b61166d565b34801561062d57600080fd5b506033546001600160a01b03166103ba565b34801561064b57600080fd5b5061030861271081565b34801561066157600080fd5b506069546103ba906001600160a01b031681565b34801561068157600080fd5b506104086106903660046131a4565b6116cc565b3480156106a157600080fd5b50606a546103ba906001600160a01b031681565b3480156106c157600080fd5b506104086106d0366004613429565b611772565b3480156106e157600080fd5b506065546103ba906001600160a01b031681565b34801561070157600080fd5b506104086107103660046134cb565b611786565b34801561072157600080fd5b506104086107303660046131a4565b611a55565b34801561074157600080fd5b50606e546103ba906001600160a01b031681565b34801561076157600080fd5b506075546103359060ff1681565b34801561077b57600080fd5b5061040861078a3660046131d2565b611ab4565b34801561079b57600080fd5b506104086107aa3660046131a4565b611b34565b3480156107bb57600080fd5b506104086107ca36600461350b565b611c3b565b3480156107db57600080fd5b506104086107ea3660046131d2565b611c56565b3480156107fb57600080fd5b5061040861080a3660046131d2565b611c80565b34801561081b57600080fd5b5061030860745481565b34801561083157600080fd5b50610308606f5481565b34801561084757600080fd5b506066546103ba906001600160a01b031681565b6076818154811061086b57600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0391821693509181169190811690600160a01b900460ff1684565b6108b2611d0d565b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000607685815481106108e9576108e9613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b039081168452600182015481169484019490945260020154928316908201819052600160a01b90920460ff1615156060820152915033148061095c5750606d546001600160a01b031633145b6109ad5760405162461bcd60e51b815260206004820152600560248201527f216175746800000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6065546001600160a01b0384811691161415806109cc575060755460ff165b156109d75750610a2c565b6109e48483607354611d67565b606e546001600160a01b03166109fa5750610a2c565b6000610a068284611f09565b90508015610a2957606e54607454610a29916001600160a01b0316908390611d67565b50505b50505050565b610a3a611d0d565b6075805460ff1916600117905560005b607654811015610ab357600060768281548110610a6957610a69613528565b906000526020600020906003020190508060020160149054906101000a900460ff1615610a965750610aa1565b610a9f82610e5a565b505b80610aab81613554565b915050610a4a565b50565b60755460ff1615610af45760405162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b60448201526064016109a4565b600060768481548110610b0957610b09613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161580156060830152909150610bb15760405162461bcd60e51b815260206004820152600e60248201527f706f6f6c20697320636c6f73656400000000000000000000000000000000000060448201526064016109a4565b60775460ff1615610bf357610bf3846000805b604051908082528060200260200182016040528015610bed578160200160208202803683370190505b5061205d565b8051606654610c11906001600160a01b0380841691339116876124e1565b60208201518315610d0b576040516340c10f1960e01b8152306004820152602481018690526001600160a01b038216906340c10f1990604401600060405180830381600087803b158015610c6457600080fd5b505af1158015610c78573d6000803e3d6000fd5b505050506040830151610c8c828288612592565b6040517f2ee40908000000000000000000000000000000000000000000000000000000008152336004820152602481018790526001600160a01b03821690632ee4090890604401600060405180830381600087803b158015610ced57600080fd5b505af1158015610d01573d6000803e3d6000fd5b5050505050610d6c565b6040516340c10f1960e01b8152336004820152602481018690526001600160a01b038216906340c10f1990604401600060405180830381600087803b158015610d5357600080fd5b505af1158015610d67573d6000803e3d6000fd5b505050505b604051858152869033907f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca9060200160405180910390a3505050505050565b610db782823333612636565b5050565b600060768381548110610dd057610dd0613528565b60009182526020822060039190910201546040516370a0823160e01b81523360048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015610e29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4d919061356d565b9050610a2c848285610ab6565b610e62611d0d565b600060768281548110610e7757610e77613528565b906000526020600020906003020190508060020160149054906101000a900460ff1615610ee65760405162461bcd60e51b815260206004820152601160248201527f616c72656164792073687574646f776e2100000000000000000000000000000060448201526064016109a4565b60020180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17905550565b610f20611d0d565b610dac8183610f2f8787613586565b610f399190613586565b610f439190613586565b1115610f915760405162461bcd60e51b815260206004820152600860248201527f3e4d61784665657300000000000000000000000000000000000000000000000060448201526064016109a4565b6103e8841115610fe35760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205f766c457162496e63656e7469766500000000000000000060448201526064016109a4565b6103208310158015610ff757506107d08311155b6110435760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964205f6550656e646c65496e63656e746976650000000000000060448201526064016109a4565b6101f48211156110955760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964205f706c6174666f726d46656500000000000000000000000060448201526064016109a4565b60648111156110e65760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964205f6561726d61726b496e63656e746976650000000000000060448201526064016109a4565b606f93909355607091909155607155607255565b611102611d0d565b61110c6000612808565b565b611116611d0d565b6066546001600160a01b03161561116f5760405162461bcd60e51b815260206004820152601b60248201527f706172616d732068617320616c7265616479206265656e20736574000000000060448201526064016109a4565b6001600160a01b0389166111c55760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964205f70656e646c65210000000000000000000000000000000060448201526064016109a4565b6001600160a01b03881661121b5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f70656e646c6550726f787921000000000000000000000060448201526064016109a4565b6001600160a01b0387166112715760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964205f6571624d696e746572210000000000000000000000000060448201526064016109a4565b6001600160a01b0386166112c75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964205f657162210000000000000000000000000000000000000060448201526064016109a4565b6001600160a01b03851661131d5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f784571622100000000000000000000000000000000000060448201526064016109a4565b6001600160a01b0384166113735760405162461bcd60e51b815260206004820152600f60248201527f696e76616c6964205f766c45716221000000000000000000000000000000000060448201526064016109a4565b6001600160a01b0383166113c95760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964205f6550656e646c655265776172645265636569766572210060448201526064016109a4565b6001600160a01b03821661141f5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964205f6550656e646c65526577617264506f6f6c21000000000060448201526064016109a4565b6001600160a01b0381166114755760405162461bcd60e51b815260206004820152601260248201527f696e76616c6964205f747265617375727921000000000000000000000000000060448201526064016109a4565b6075805460ff19908116909155606580546001600160a01b03199081166001600160a01b039c8d16179091556066805482169a8c169a909a17909955606780548a16988b1698909817909755606880548916968a169690961790955560698054881694891694909417909355606a8054871692881692909217909155606c80548616918716919091179055606d80548516918616919091179055606b805490931693169290921790556101f4606f556105dc60705560fa60715560326072556109c4607355611388607455607780549091166001179055565b600054610100900460ff161580801561156e5750600054600160ff909116105b806115885750303b158015611588575060005460ff166001145b6115fa5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109a4565b6000805460ff19166001179055801561161d576000805461ff0019166101001790555b61162561285a565b8015610ab3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b611675611d0d565b6127108111156116c75760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f7465616d4571625368617265000000000000000000000060448201526064016109a4565b607455565b6000607682815481106116e1576116e1613528565b60009182526020822060039190910201600101546040516370a0823160e01b81523360048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa15801561173d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611761919061356d565b905061176d8382610dab565b505050565b61177a611d0d565b610db78260008361205d565b61178e611d0d565b60755460ff16156117e35760405162461bcd60e51b81526004016109a49060208082526004908201527f2161646400000000000000000000000000000000000000000000000000000000604082015260600190565b6066546040517f58e6309f0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906358e6309f90602401602060405180830381865afa158015611846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186a9190613599565b6118b65760405162461bcd60e51b815260206004820152600f60248201527f696e76616c6964205f6d61726b6574000000000000000000000000000000000060448201526064016109a4565b6076546065546040517ff376d798000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03858116602483015291821660448201529083169063f376d79890606401600060405180830381600087803b15801561192857600080fd5b505af115801561193c573d6000803e3d6000fd5b5050604080516080810182526001600160a01b03978816815295871660208701908152948716908601908152600060608701818152607680546001810182559252965160039091027fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed481018054928a166001600160a01b031993841617905595517fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed587018054918a1691909216179055517fb5732705f5241370a28908c2fe1303cb223f03b90d857fd0573f003f79fefed6909401805495511515600160a01b027fffffffffffffffffffffff000000000000000000000000000000000000000000909616949096169390931793909317909355505050565b611a5d611d0d565b612710811115611aaf5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f6661726d4571625368617265000000000000000000000060448201526064016109a4565b607355565b611abc611d0d565b6001600160a01b038116611b125760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f766c45716200000000000000000000000000000000000060448201526064016109a4565b606a80546001600160a01b0319166001600160a01b0392909216919091179055565b60755460ff1615611b725760405162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b60448201526064016109a4565b600060768281548110611b8757611b87613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161580156060830152909150611c2f5760405162461bcd60e51b815260206004820152600e60248201527f706f6f6c20697320636c6f73656400000000000000000000000000000000000060448201526064016109a4565b610db782336000610bc4565b611c43611d0d565b6077805460ff1916911515919091179055565b611c5e611d0d565b606b80546001600160a01b0319166001600160a01b0392909216919091179055565b611c88611d0d565b6001600160a01b038116611d045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a4565b610ab381612808565b6033546001600160a01b0316331461110c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a4565b6067546040516340c10f1960e01b8152306004820152602481018490526000916001600160a01b0316906340c10f19906044016020604051808303816000875af1158015611db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddd919061356d565b90506000612710611dee84846135b6565b611df891906135cd565b606854909150611e12906001600160a01b031686836128cd565b6000611e1e82846135ef565b606854606954919250611e3e916001600160a01b03918216911683612592565b6069546040517f5a1d34dc000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03888116602483015290911690635a1d34dc90604401600060405180830381600087803b158015611ea557600080fd5b505af1158015611eb9573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b038a1693507f73e52f1e16a2ca14e6073adf347cbfb544c812b1c1c91161c8d631929c1ed0bd92500160405180910390a2505050505050565b600080836000015190506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f77919061356d565b6066546040516370a0823160e01b81526001600160a01b039182166004820152612710918516906370a0823190602401602060405180830381865afa158015611fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe8919061356d565b611ff291906135b6565b611ffc91906135cd565b905060006103e882116120115750600061203a565b6107d0821161202357506104ce61203a565b610bb88211612035575061098861203a565b50610e4c5b61271061204782876135b6565b61205191906135cd565b93505050505b92915050565b60006076848154811061207257612072613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b03908116845260018201548116948401949094526002015492831690820152600160a01b90910460ff161515606080830191909152835191925090156121725760665482516040517f81e11bd00000000000000000000000000000000000000000000000000000000081526001600160a01b03909216916381e11bd091612124918790600401613602565b6000604051808303816000875af1158015612143573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261216b91908101906136c8565b9050612205565b60665482516040517fef5cfb8c0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291169063ef5cfb8c906024016000604051808303816000875af11580156121d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122009190810190613705565b935090505b60005b8151811015610a2957600082828151811061222557612225613528565b60200260200101519050600085838151811061224357612243613528565b6020026020010151905060006001600160a01b0316826001600160a01b0316148061226c575080155b156122785750506124cf565b8061228c6001600160a01b038416306128fd565b10156122995750506124cf565b60408051898152602081018390526001600160a01b038416917f24b5efa61dd1cfc659205a97fb8ed868f3cb8c81922bab2b96423e5de1de2cb7910160405180910390a26000612710606f54836122f091906135b6565b6122fa91906135cd565b905060006127106070548461230f91906135b6565b61231991906135cd565b905060006001600160a01b038a161580159061233757506000607254115b156123c4576127106072548561234d91906135b6565b61235791906135cd565b905061236d6001600160a01b0386168b836129a5565b846001600160a01b03168a6001600160a01b03167feb61b3077d80c52baa13c8662f84cf95a6a0deacbaa6328777f483de4e5152528d846040516123bb929190918252602082015260400190565b60405180910390a35b6071546000901561244c57612710607154866123e091906135b6565b6123ea91906135cd565b606b54909150612407906001600160a01b038881169116836129a5565b604080518d8152602081018390526001600160a01b038816917f824a097e8d4e9580223eddbe4bf5cfd647cc4d997b60a0371177169fd3302c2d910160405180910390a25b80828461245987896135ef565b61246391906135ef565b61246d91906135ef565b61247791906135ef565b9450612488896040015187876129de565b83156124a857606a546124a8906001600160a01b038881169116866129a5565b82156124c857606c546124c8906001600160a01b038881169116856129a5565b5050505050505b806124d981613554565b915050612208565b6040516001600160a01b0380851660248301528316604482015260648101829052610a2c9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612aea565b604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015282919085169063dd62ed3e90604401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612605919061356d565b101561176d576126206001600160a01b038416836000612bcf565b61176d6001600160a01b03841683600019612bcf565b60006076858154811061264b5761264b613528565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b039081168085526001830154821695850186905260029092015480821685850152600160a01b900460ff161515606085015291517f9dc29fac0000000000000000000000000000000000000000000000000000000081529187166004830152602482018890529193509091908190639dc29fac90604401600060405180830381600087803b15801561270357600080fd5b505af1158015612717573d6000803e3d6000fd5b505060775460ff1615915061273490505761273487600080610bc4565b6066546040517fd9caed120000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528681166024830152604482018990529091169063d9caed1290606401600060405180830381600087803b1580156127a357600080fd5b505af11580156127b7573d6000803e3d6000fd5b5050505086846001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6886040516127f791815260200190565b60405180910390a350505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166128c55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c612d04565b6040516001600160a01b03831660248201526044810182905261176d90849063a9059cbb60e01b9060640161252e565b600073efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361293457506001600160a01b03811631612057565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa15801561297a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299e919061356d565b9050612057565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b038416036129d35761176d8282612d77565b61176d838383612e40565b806000036129eb57505050565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b03831603612a78576040516304d0c2c560e01b81526001600160a01b038381166004830152602482018390528416906304d0c2c59083906044016000604051808303818588803b158015612a5a57600080fd5b505af1158015612a6e573d6000803e3d6000fd5b5050505050505050565b612a83828483612592565b6040516304d0c2c560e01b81526001600160a01b038381166004830152602482018390528416906304d0c2c590604401600060405180830381600087803b158015612acd57600080fd5b505af1158015612ae1573d6000803e3d6000fd5b50505050505050565b6000612b3f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612f969092919063ffffffff16565b80519091501561176d5780806020019051810190612b5d9190613599565b61176d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109a4565b801580612c495750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c47919061356d565b155b612cbb5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016109a4565b6040516001600160a01b03831660248201526044810182905261176d9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161252e565b600054610100900460ff16612d6f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c612faf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612dc4576040519150601f19603f3d011682016040523d82523d6000602084013e612dc9565b606091505b505090508061176d5760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657248656c7065723a2053656e64696e6720455448206661696c60448201527f656400000000000000000000000000000000000000000000000000000000000060648201526084016109a4565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790529151600092839290871691612eb191906137d5565b6000604051808303816000865af19150503d8060008114612eee576040519150601f19603f3d011682016040523d82523d6000602084013e612ef3565b606091505b5091509150818015612f1d575080511580612f1d575080806020019051810190612f1d9190613599565b612f8f5760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016109a4565b5050505050565b6060612fa58484600085613023565b90505b9392505050565b600054610100900460ff1661301a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a4565b61110c33612808565b60608247101561309b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109a4565b6001600160a01b0385163b6130f25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a4565b600080866001600160a01b0316858760405161310e91906137d5565b60006040518083038185875af1925050503d806000811461314b576040519150601f19603f3d011682016040523d82523d6000602084013e613150565b606091505b509150915061316082828661316b565b979650505050505050565b6060831561317a575081612fa8565b82511561318a5782518084602001fd5b8160405162461bcd60e51b81526004016109a491906137f1565b6000602082840312156131b657600080fd5b5035919050565b6001600160a01b0381168114610ab357600080fd5b6000602082840312156131e457600080fd5b8135612fa8816131bd565b6000806000806080858703121561320557600080fd5b843593506020850135613217816131bd565b92506040850135613227816131bd565b9396929550929360600135925050565b8015158114610ab357600080fd5b60008060006060848603121561325a57600080fd5b8335925060208401359150604084013561327381613237565b809150509250925092565b6000806040838503121561329157600080fd5b50508035926020909101359150565b600080604083850312156132b357600080fd5b8235915060208301356132c581613237565b809150509250929050565b600080600080608085870312156132e657600080fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060008060006101208a8c03121561332157600080fd5b893561332c816131bd565b985060208a013561333c816131bd565b975060408a013561334c816131bd565b965060608a013561335c816131bd565b955060808a013561336c816131bd565b945060a08a013561337c816131bd565b935060c08a013561338c816131bd565b925060e08a013561339c816131bd565b91506101008a01356133ad816131bd565b809150509295985092959850929598565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156133fd576133fd6133be565b604052919050565b600067ffffffffffffffff82111561341f5761341f6133be565b5060051b60200190565b6000806040838503121561343c57600080fd5b8235915060208084013567ffffffffffffffff81111561345b57600080fd5b8401601f8101861361346c57600080fd5b803561347f61347a82613405565b6133d4565b81815260059190911b8201830190838101908883111561349e57600080fd5b928401925b828410156134bc578335825292840192908401906134a3565b80955050505050509250929050565b6000806000606084860312156134e057600080fd5b83356134eb816131bd565b925060208401356134fb816131bd565b91506040840135613273816131bd565b60006020828403121561351d57600080fd5b8135612fa881613237565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016135665761356661353e565b5060010190565b60006020828403121561357f57600080fd5b5051919050565b808201808211156120575761205761353e565b6000602082840312156135ab57600080fd5b8151612fa881613237565b80820281158282048414176120575761205761353e565b6000826135ea57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156120575761205761353e565b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561364c57845183529383019391830191600101613630565b5090979650505050505050565b600082601f83011261366a57600080fd5b8151602061367a61347a83613405565b82815260059290921b8401810191818101908684111561369957600080fd5b8286015b848110156136bd5780516136b0816131bd565b835291830191830161369d565b509695505050505050565b6000602082840312156136da57600080fd5b815167ffffffffffffffff8111156136f157600080fd5b6136fd84828501613659565b949350505050565b6000806040838503121561371857600080fd5b825167ffffffffffffffff8082111561373057600080fd5b61373c86838701613659565b935060209150818501518181111561375357600080fd5b85019050601f8101861361376657600080fd5b805161377461347a82613405565b81815260059190911b8201830190838101908883111561379357600080fd5b928401925b828410156134bc57835182529284019290840190613798565b60005b838110156137cc5781810151838201526020016137b4565b50506000910152565b600082516137e78184602087016137b1565b9190910192915050565b60208152600082518060208401526138108160408501602087016137b1565b601f01601f1916919091016040019291505056fea2646970667358221220996d61fd594742033c1c4bd455a8a8b3ff07835058cfec13361d0abb5adbbf9564736f6c63430008110033

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

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