ETH Price: $4,453.02 (-4.69%)

Contract

0x23445c63FeEf8D85956dc0f19aDe87606D0e19A9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

Transaction Hash
Method
Block
From
To
Stake235310002025-10-08 5:38:2344 mins ago1759901903IN
Onyx Protocol: Staking
0 ETH0.000023430.13532095
Stake235309492025-10-08 5:27:5954 mins ago1759901279IN
Onyx Protocol: Staking
0 ETH0.000039450.2527586
Withdraw235309342025-10-08 5:24:5957 mins ago1759901099IN
Onyx Protocol: Staking
0 ETH0.000040250.23968977
Stake235308902025-10-08 5:16:111 hr ago1759900571IN
Onyx Protocol: Staking
0 ETH0.000192321.14203156
Stake235308442025-10-08 5:06:351 hr ago1759899995IN
Onyx Protocol: Staking
0 ETH0.000039160.22616096
Stake235307922025-10-08 4:56:111 hr ago1759899371IN
Onyx Protocol: Staking
0 ETH0.000022570.13033964
Stake235306842025-10-08 4:34:231 hr ago1759898063IN
Onyx Protocol: Staking
0 ETH0.000006550.13141996
Stake235306842025-10-08 4:34:231 hr ago1759898063IN
Onyx Protocol: Staking
0 ETH0.000020420.13141996
Stake235306842025-10-08 4:34:231 hr ago1759898063IN
Onyx Protocol: Staking
0 ETH0.000040050.23131996
Withdraw235306832025-10-08 4:34:111 hr ago1759898051IN
Onyx Protocol: Staking
0 ETH0.000246471.63409044
Stake235306812025-10-08 4:33:471 hr ago1759898027IN
Onyx Protocol: Staking
0 ETH0.000040790.23557261
Stake235306792025-10-08 4:33:231 hr ago1759898003IN
Onyx Protocol: Staking
0 ETH0.000040620.23788444
Stake235306612025-10-08 4:29:471 hr ago1759897787IN
Onyx Protocol: Staking
0 ETH0.000045110.26414968
Stake235306312025-10-08 4:23:471 hr ago1759897427IN
Onyx Protocol: Staking
0 ETH0.000066260.38265222
Withdraw235306032025-10-08 4:17:592 hrs ago1759897079IN
Onyx Protocol: Staking
0 ETH0.000073420.43720502
Stake235305942025-10-08 4:16:112 hrs ago1759896971IN
Onyx Protocol: Staking
0 ETH0.000070490.45164987
Stake235305702025-10-08 4:11:232 hrs ago1759896683IN
Onyx Protocol: Staking
0 ETH0.000266751.70913236
Withdraw235305462025-10-08 4:06:232 hrs ago1759896383IN
Onyx Protocol: Staking
0 ETH0.000030510.20231842
Withdraw235305432025-10-08 4:05:472 hrs ago1759896347IN
Onyx Protocol: Staking
0 ETH0.000034830.20743263
Stake235305412025-10-08 4:05:232 hrs ago1759896323IN
Onyx Protocol: Staking
0 ETH0.000040090.23150515
Stake235305362025-10-08 4:04:232 hrs ago1759896263IN
Onyx Protocol: Staking
0 ETH0.000040250.21814027
Stake235305352025-10-08 4:04:112 hrs ago1759896251IN
Onyx Protocol: Staking
0 ETH0.000028440.18165553
Stake235304862025-10-08 3:54:232 hrs ago1759895663IN
Onyx Protocol: Staking
0 ETH0.000037310.23902785
Withdraw235304092025-10-08 3:38:592 hrs ago1759894739IN
Onyx Protocol: Staking
0 ETH0.000210941.25605359
Stake235304012025-10-08 3:37:232 hrs ago1759894643IN
Onyx Protocol: Staking
0 ETH0.000063680.36766541
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer219041482025-02-22 20:06:11227 days ago1740254771
Onyx Protocol: Staking
0.00180817 ETH
Transfer218464252025-02-14 18:16:11235 days ago1739556971
Onyx Protocol: Staking
0.00071837 ETH
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:
CHNStaking

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2022-03-30
*/

// File: @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol


// OpenZeppelin Contracts (last updated v4.5.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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol


// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;


/**
 * @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.
 *
 * 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 initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

// File: @openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;


/**
 * @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;
}

// File: @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol


// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;



/**
 * @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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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: @openzeppelin/contracts/utils/math/SafeMath.sol


// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.5.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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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);

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

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

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;



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

    /**
     * @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");
        }
    }
}

// File: CHNStaking.sol



pragma solidity ^0.8.3;





contract CHNStaking is OwnableUpgradeable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    // Info of each user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 pendingTokenReward;
    }
    // Info of each pool.
    struct PoolInfo {
        IERC20 stakeToken;
        uint256 allocPoint;
        uint256 lastRewardBlock;
        uint256 accCHNPerShare;
        uint256 totalAmountStake;
    }

    event Add(address indexed stakToken, uint256 indexed allocPoint);
    event Set(uint256 indexed pid, uint256 indexed allocPoint);
    event Stake(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, uint256 reward);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event ClaimRewardFromVault(address indexed userAddress, uint256 indexed pid);
    
    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);
    
    IERC20 public rewardToken;
    uint256 public rewardPerBlock;
    PoolInfo[] public poolInfo;
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    mapping(address => bool) public poolTokens;
    uint256 public totalAllocPoint = 0;
    uint256 public startBlock;
    uint256 public bonusEndBlock;
    uint256 public BONUS_MULTIPLIER;
    address public rewardVault;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (uint256 => mapping (address => mapping (uint32 => Checkpoint))) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (uint256 => mapping (address => uint32)) public numCheckpoints;

    modifier validatePoolByPid(uint256 _pid) {
        require(_pid < poolInfo.length, "Pool does not exist");
        _;
    }

    function initialize(
        IERC20 _rewardToken,
        uint256 _rewardPerBlock,
        uint256 _startBlock,
        uint256 _bonusEndBlock,
        uint256 _multiplier,
        address _rewardVault
    ) public initializer {
        require(_rewardVault != address(0) && address(_rewardToken) != address(0), "Zero address validation");
        require(_startBlock < _bonusEndBlock, "Start block lower than bonus end block");
        require(_rewardPerBlock < _rewardToken.totalSupply(), "Reward per block bigger than reward token total supply");
        require(BONUS_MULTIPLIER < 100, "Bonus multipler bigger than 100x reward bonus");
        __Ownable_init();
        rewardToken = _rewardToken;
        rewardPerBlock = _rewardPerBlock;
        startBlock = _startBlock;
        bonusEndBlock = _bonusEndBlock;
        BONUS_MULTIPLIER = _multiplier;
        rewardVault = _rewardVault;
    }

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

    function getStakingAmount(uint256 pid, address user) public view returns (uint256) {
        UserInfo memory info = userInfo[pid][user];
        return info.amount;
    }

    // Add a new stake to the pool. Can only be called by the Timelock and DAO.
    // XXX DO NOT add the same stake token more than once. Rewards will be messed up if you do.
    // This function can be only called by Timelock and DAO with voting power
    function add(
        uint256 _allocPoint,
        IERC20 _stakeToken
    ) public onlyOwner {
        require(!poolTokens[address(_stakeToken)], "Stake token already exist");
        massUpdatePools();
        uint256 lastRewardBlock =
            block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolTokens[address(_stakeToken)] = true;
        poolInfo.push(
            PoolInfo({
                stakeToken: _stakeToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accCHNPerShare: 0,
                totalAmountStake: 0
            })
        );
        emit Add(address(_stakeToken), _allocPoint);
    }

    // Update the given pool's XCN allocation point. Can only be called by the Timelock and DAO.
    // This function can be only called by Timelock and DAO with voting power
    function set(
        uint256 _pid,
        uint256 _allocPoint
    ) public onlyOwner validatePoolByPid(_pid) {
        massUpdatePools();
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
        emit Set(_pid, _allocPoint);
    }

    // Update reward per block by the Timelock and DAO
    function setRewardPerblock(uint256 speed)
        public
        onlyOwner {
            rewardPerBlock = speed;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
        public
        view
        returns (uint256)
    {
        require(_from >= startBlock, "from block number bigger than start block");
        if (_to <= bonusEndBlock) {
            return _to.sub(_from).mul(BONUS_MULTIPLIER);
        } else if (_from >= bonusEndBlock) {
            return _to.sub(_from);
        } else {
            return
                bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER).add(
                    _to.sub(bonusEndBlock)
                );
        }
    }

    function pendingReward(uint256 _pid, address _user)
        external
        view
        validatePoolByPid(_pid)
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accCHNPerShare = pool.accCHNPerShare;
        uint256 supply = pool.totalAmountStake;
        if (block.number > pool.lastRewardBlock && supply != 0) {
            uint256 multiplier =
                getMultiplier(pool.lastRewardBlock, block.number);
            uint256 reward =
                multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(
                    totalAllocPoint
                );
            accCHNPerShare = accCHNPerShare.add(
                reward.mul(1e12).div(supply)
            );
        }
        return user.amount.mul(accCHNPerShare).div(1e12).add(user.pendingTokenReward).sub(user.rewardDebt);
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 supply = pool.totalAmountStake;
        if (supply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 reward =
            multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(
                totalAllocPoint
            );
        pool.accCHNPerShare = pool.accCHNPerShare.add(
            reward.mul(1e12).div(supply)
        );
        pool.lastRewardBlock = block.number;
    }

    function _moveDelegates(uint256 _pid, address dstRep, uint256 amount, bool stake) internal {
        if (amount > 0) {
            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[_pid][dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[_pid][dstRep][dstRepNum - 1].votes : 0;
                if (stake) {
                    uint256 dstRepNew = dstRepOld.add(amount);
                    _writeCheckpoint(_pid, dstRep, dstRepNum, dstRepOld, dstRepNew);
                } else {
                    uint256 dstRepNew = dstRepOld.sub(amount);
                    _writeCheckpoint(_pid, dstRep, dstRepNum, dstRepOld, dstRepNew);
                }
            }
        }
    }

    // Only support non-deflationary tokens staking
    function stake(uint256 _pid, uint256 _amount) public validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending =
                user.amount.mul(pool.accCHNPerShare).div(1e12).sub(
                    user.rewardDebt
                );
            user.pendingTokenReward = user.pendingTokenReward.add(pending);
        }
        pool.totalAmountStake = pool.totalAmountStake.add(_amount);
        pool.stakeToken.safeTransferFrom(
            address(msg.sender),
            address(this),
            _amount
        );
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accCHNPerShare).div(1e12);

        _moveDelegates(_pid, msg.sender, _amount, true);
        emit Stake(msg.sender, _pid, _amount);
    }

    function withdraw(uint256 _pid, uint256 _amount) public validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending =
            user.amount.mul(pool.accCHNPerShare).div(1e12).sub(
                user.rewardDebt
            );
        // pending = pending.add(user.pendingTokenReward);
        // pool.stakeToken.safeTransfer(address(msg.sender), pending);
        user.pendingTokenReward = user.pendingTokenReward + pending;
        user.amount = user.amount.sub(_amount);
        pool.totalAmountStake = pool.totalAmountStake.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accCHNPerShare).div(1e12);
        pool.stakeToken.safeTransfer(address(msg.sender), _amount);

        // Remove delegates from staking user
        _moveDelegates(_pid, msg.sender, _amount, false);
        emit Withdraw(msg.sender, _pid, _amount, 0);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 userAmount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        user.pendingTokenReward = 0;
        pool.totalAmountStake = pool.totalAmountStake.sub(userAmount);
        pool.stakeToken.safeTransfer(address(msg.sender), userAmount);
        // Remove delegates from staking user
        _moveDelegates(_pid, msg.sender, userAmount, false);
        emit EmergencyWithdraw(msg.sender, _pid, userAmount);
    }

    function claimRewardFromVault(address userAddress, uint256 pid) public validatePoolByPid(pid) returns (uint256) {
        require(msg.sender == rewardVault, "Ownable: only reward vault");
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][userAddress];
        updatePool(pid);
        uint256 pending =
            user.amount.mul(pool.accCHNPerShare).div(1e12).sub(
                user.rewardDebt
            );
        pending = pending + user.pendingTokenReward;
        user.pendingTokenReward = 0;
        user.rewardDebt = user.amount.mul(pool.accCHNPerShare).div(1e12);
        emit ClaimRewardFromVault(userAddress, pid);
        return pending;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(uint256 _pid, address account, uint blockNumber) public view returns (uint256) {
        require(blockNumber < block.number, "Comp::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[_pid][account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[_pid][account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[_pid][account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[_pid][account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[_pid][account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[_pid][account][lower].votes;
    }

    function _writeCheckpoint(uint256 _pid, address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) internal {
      uint32 blockNumber = safe32(block.number, "Comp::_writeCheckpoint: block number exceeds 32 bits");

      if (nCheckpoints > 0 && checkpoints[_pid][delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
          checkpoints[_pid][delegatee][nCheckpoints - 1].votes = newVotes;
      } else {
          checkpoints[_pid][delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
          numCheckpoints[_pid][delegatee] = nCheckpoints + 1;
      }

      emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }
    
    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakToken","type":"address"},{"indexed":true,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"}],"name":"ClaimRewardFromVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_stakeToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"claimRewardFromVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getStakingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"},{"internalType":"uint256","name":"_multiplier","type":"uint256"},{"internalType":"address","name":"_rewardVault","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"stakeToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accCHNPerShare","type":"uint256"},{"internalType":"uint256","name":"totalAmountStake","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"speed","type":"uint256"}],"name":"setRewardPerblock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"pendingTokenReward","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"}]

60806040526000606a5534801561001557600080fd5b50612320806100256000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a61161010457806398969e82116100a2578063c418441c11610071578063c418441c146104c5578063d82ada50146104d8578063f2fde38b1461051e578063f7c618c11461053157600080fd5b806398969e8214610413578063a6d6f4ed14610426578063a912616914610439578063b33494671461046c57600080fd5b80638ae39cac116100de5780638ae39cac146103915780638da5cb5b1461039a5780638dbb1e3a146103ab57806393f1a40b146103be57600080fd5b8063715018a61461036d5780637b0472f0146103755780638aa285501461038857600080fd5b8063441a3e701161017c578063525eef2f1161014b578063525eef2f146102e25780635312ea8e1461033f5780635df5f96f14610352578063630b5ba11461036557600080fd5b8063441a3e70146102a057806348cd4cb1146102b35780634bea3f03146102bc57806351eb05a6146102cf57600080fd5b80631ab06ee5116101b85780631ab06ee5146102445780631aed6553146102595780632b8bbbe8146102625780633a2c67771461027557600080fd5b8063081e3eda146101df5780631526fe27146101f657806317caf6f11461023b575b600080fd5b6067545b6040519081526020015b60405180910390f35b610209610204366004611e7a565b610544565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016101ed565b6101e3606a5481565b610257610252366004611e93565b61058f565b005b6101e3606c5481565b610257610270366004611eca565b610692565b606e54610288906001600160a01b031681565b6040516001600160a01b0390911681526020016101ed565b6102576102ae366004611e93565b6108b6565b6101e3606b5481565b6101e36102ca366004611efa565b610a60565b6102576102dd366004611e7a565b610bda565b6103236102f0366004611f26565b606f6020908152600093845260408085208252928452828420905282529020805460019091015463ffffffff9091169082565b6040805163ffffffff90931683526020830191909152016101ed565b61025761034d366004611e7a565b610cbf565b610257610360366004611f71565b610dad565b6102576110b9565b6102576110e0565b610257610383366004611e93565b611116565b6101e3606d5481565b6101e360665481565b6033546001600160a01b0316610288565b6101e36103b9366004611e93565b61126a565b6103f86103cc366004611eca565b606860209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101ed565b6101e3610421366004611eca565b61133d565b610257610434366004611e7a565b611465565b61045c610447366004611fcf565b60696020526000908152604090205460ff1681565b60405190151581526020016101ed565b6101e361047a366004611eca565b60009182526068602090815260408084206001600160a01b03939093168452918152918190208151606081018352815480825260018301549482019490945260029091015491015290565b6101e36104d3366004611fec565b611494565b6105096104e6366004611eca565b607060209081526000928352604080842090915290825290205463ffffffff1681565b60405163ffffffff90911681526020016101ed565b61025761052c366004611fcf565b61172e565b606554610288906001600160a01b031681565b6067818154811061055457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b6033546001600160a01b031633146105c25760405162461bcd60e51b81526004016105b990612024565b60405180910390fd5b606754829081106105e55760405162461bcd60e51b81526004016105b990612059565b6105ed6110b9565b6106308261062a6067868154811061060757610607612086565b906000526020600020906005020160010154606a546117c990919063ffffffff16565b906117d5565b606a81905550816067848154811061064a5761064a612086565b90600052602060002090600502016001018190555081837f545b620a3000f6303b158b321f06b4e95e28a27d70aecac8c6bdac4f48a9f6b360405160405180910390a3505050565b6033546001600160a01b031633146106bc5760405162461bcd60e51b81526004016105b990612024565b6001600160a01b03811660009081526069602052604090205460ff16156107255760405162461bcd60e51b815260206004820152601960248201527f5374616b6520746f6b656e20616c72656164792065786973740000000000000060448201526064016105b9565b61072d6110b9565b6000606b54431161074057606b54610742565b435b606a5490915061075290846117d5565b606a556001600160a01b0382811660008181526069602090815260408083208054600160ff199091168117909155815160a0810183528581529283018981528383018881526060850186815260808601878152606780549586018155885295517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae600590950294850180546001600160a01b03191691909a161790985590517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af830155517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b082015594517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b186015590517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b290940193909355915185927f2728c9d3205d667bbc0eefdfeda366261b4d021949630c047f3e5834b30611ab91a3505050565b606754829081106108d95760405162461bcd60e51b81526004016105b990612059565b6000606784815481106108ee576108ee612086565b60009182526020808320878452606882526040808520338652909252922080546005909202909201925084111561095c5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016105b9565b61096585610bda565b600061099f826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b906117ed565b906117c9565b90508082600201546109b191906120b2565b600283015581546109c290866117c9565b825560048301546109d390866117c9565b6004840155600383015482546109f39164e8d4a5100091610993916117e1565b60018301558254610a0e906001600160a01b031633876117f9565b610a1b8633876000611861565b6040805186815260006020820152879133917f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94910160405180910390a3505050505050565b60675460009082908110610a865760405162461bcd60e51b81526004016105b990612059565b606e546001600160a01b03163314610ae05760405162461bcd60e51b815260206004820152601a60248201527f4f776e61626c653a206f6e6c7920726577617264207661756c7400000000000060448201526064016105b9565b600060678481548110610af557610af5612086565b600091825260208083208784526068825260408085206001600160a01b038b168652909252922060059091029091019150610b2f85610bda565b6000610b5d826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b9050816002015481610b6f91906120b2565b6000600284015560038401548354919250610b959164e8d4a510009161099391906117e1565b600183015560405186906001600160a01b038916907f926f6d060d7b34315435a6af02d8d2f0382328cd5821183eadda8a4742258d4690600090a39695505050505050565b60675481908110610bfd5760405162461bcd60e51b81526004016105b990612059565b600060678381548110610c1257610c12612086565b9060005260206000209060050201905080600201544311610c3257505050565b600481015480610c485750436002909101555050565b6000610c5883600201544361126a565b90506000610c85606a546109938660010154610c7f606654876117e190919063ffffffff16565b906117e1565b9050610ca8610c9d846109938464e8d4a510006117e1565b6003860154906117d5565b6003850155505043600290920191909155505b5050565b60675481908110610ce25760405162461bcd60e51b81526004016105b990612059565b600060678381548110610cf757610cf7612086565b600091825260208083208684526068825260408085203386529092529083208054848255600182018590556002820194909455600592909202016004810154909350909190610d4690826117c9565b60048401558254610d61906001600160a01b031633836117f9565b610d6e8533836000611861565b604051818152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050505050565b600054610100900460ff16610dc85760005460ff1615610dcc565b303b155b610e2f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b9565b600054610100900460ff16158015610e51576000805461ffff19166101011790555b6001600160a01b03821615801590610e7157506001600160a01b03871615155b610ebd5760405162461bcd60e51b815260206004820152601760248201527f5a65726f20616464726573732076616c69646174696f6e00000000000000000060448201526064016105b9565b838510610f1b5760405162461bcd60e51b815260206004820152602660248201527f537461727420626c6f636b206c6f776572207468616e20626f6e757320656e6460448201526520626c6f636b60d01b60648201526084016105b9565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d91906120ca565b8610610fea5760405162461bcd60e51b815260206004820152603660248201527f5265776172642070657220626c6f636b20626967676572207468616e2072657760448201527561726420746f6b656e20746f74616c20737570706c7960501b60648201526084016105b9565b6064606d54106110525760405162461bcd60e51b815260206004820152602d60248201527f426f6e7573206d756c7469706c657220626967676572207468616e203130307860448201526c2072657761726420626f6e757360981b60648201526084016105b9565b61105a611946565b606580546001600160a01b03808a166001600160a01b0319928316179092556066889055606b879055606c869055606d859055606e80549285169290911691909117905580156110b0576000805461ff00191690555b50505050505050565b60675460005b81811015610cbb576110d081610bda565b6110d9816120e3565b90506110bf565b6033546001600160a01b0316331461110a5760405162461bcd60e51b81526004016105b990612024565b6111146000611975565b565b606754829081106111395760405162461bcd60e51b81526004016105b990612059565b60006067848154811061114e5761114e612086565b6000918252602080832087845260688252604080852033865290925292206005909102909101915061117f85610bda565b8054156111cd5760006111b4826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b60028301549091506111c690826117d5565b6002830155505b60048201546111dc90856117d5565b600483015581546111f8906001600160a01b03163330876119c7565b805461120490856117d5565b80825560038301546112219164e8d4a510009161099391906117e1565b81600101819055506112368533866001611861565b604051848152859033907f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b690602001610d9e565b6000606b548310156112d05760405162461bcd60e51b815260206004820152602960248201527f66726f6d20626c6f636b206e756d62657220626967676572207468616e20737460448201526861727420626c6f636b60b81b60648201526084016105b9565b606c5482116112f157606d546112ea90610c7f84866117c9565b9050611337565b606c548310611304576112ea82846117c9565b6112ea61131c606c54846117c990919063ffffffff16565b61062a606d54610c7f87606c546117c990919063ffffffff16565b92915050565b606754600090839081106113635760405162461bcd60e51b81526004016105b990612059565b60006067858154811061137857611378612086565b600091825260208083208884526068825260408085206001600160a01b038a16865290925292206003600590920290920190810154600482015460028301549294509091431180156113c957508015155b156114295760006113de85600201544361126a565b90506000611405606a546109938860010154610c7f606654876117e190919063ffffffff16565b905061142461141d846109938464e8d4a510006117e1565b85906117d5565b935050505b6114598360010154610999856002015461062a64e8d4a51000610993888a600001546117e190919063ffffffff16565b98975050505050505050565b6033546001600160a01b0316331461148f5760405162461bcd60e51b81526004016105b990612024565b606655565b60004382106114f55760405162461bcd60e51b815260206004820152602760248201527f436f6d703a3a6765745072696f72566f7465733a206e6f742079657420646574604482015266195c9b5a5b995960ca1b60648201526084016105b9565b60008481526070602090815260408083206001600160a01b038716845290915290205463ffffffff168061152d576000915050611727565b6000858152606f602090815260408083206001600160a01b03881684529091528120849161155c6001856120fe565b63ffffffff908116825260208201929092526040016000205416116115cf576000858152606f602090815260408083206001600160a01b03881684529091528120906115a96001846120fe565b63ffffffff1663ffffffff16815260200190815260200160002060010154915050611727565b6000858152606f602090815260408083206001600160a01b0388168452825280832083805290915290205463ffffffff16831015611611576000915050611727565b60008061161f6001846120fe565b90505b8163ffffffff168163ffffffff1611156116ee576000600261164484846120fe565b61164e9190612139565b61165890836120fe565b6000898152606f602090815260408083206001600160a01b038c168452825280832063ffffffff80861685529083529281902081518083019092528054909316808252600190930154918101919091529192508714156116c2576020015194506117279350505050565b805163ffffffff168711156116d9578193506116e7565b6116e46001836120fe565b92505b5050611622565b506000868152606f602090815260408083206001600160a01b0389168452825280832063ffffffff909416835292905220600101549150505b9392505050565b6033546001600160a01b031633146117585760405162461bcd60e51b81526004016105b990612024565b6001600160a01b0381166117bd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b9565b6117c681611975565b50565b6000611727828461215c565b600061172782846120b2565b60006117278284612173565b60006117278284612192565b6040516001600160a01b03831660248201526044810182905261185c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526119ff565b505050565b8115611940576001600160a01b038316156119405760008481526070602090815260408083206001600160a01b038716845290915281205463ffffffff1690816118ac5760006118f9565b6000868152606f602090815260408083206001600160a01b03891684529091528120906118da6001856120fe565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9050821561192257600061190d82866117d5565b905061191c8787858585611ad1565b5061193d565b600061192e82866117c9565b90506110b08787858585611ad1565b50505b50505050565b600054610100900460ff1661196d5760405162461bcd60e51b81526004016105b9906121a6565b611114611c99565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526119409085906323b872dd60e01b90608401611825565b6000611a54826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611cc99092919063ffffffff16565b80519091501561185c5780806020019051810190611a7291906121f1565b61185c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b9565b6000611af5436040518060600160405280603481526020016122b760349139611ce0565b905060008463ffffffff16118015611b5957506000868152606f602090815260408083206001600160a01b0389168452909152812063ffffffff831691611b3d6001886120fe565b63ffffffff908116825260208201929092526040016000205416145b15611bac576000868152606f602090815260408083206001600160a01b038916845290915281208391611b8d6001886120fe565b63ffffffff168152602081019190915260400160002060010155611c4d565b60408051808201825263ffffffff8381168252602080830186815260008b8152606f83528581206001600160a01b038c16825283528581208a851682529092529390209151825463ffffffff191691161781559051600191820155611c12908590612213565b60008781526070602090815260408083206001600160a01b038a1684529091529020805463ffffffff191663ffffffff929092169190911790555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a2505050505050565b600054610100900460ff16611cc05760405162461bcd60e51b81526004016105b9906121a6565b61111433611975565b6060611cd88484600085611d10565b949350505050565b6000816401000000008410611d085760405162461bcd60e51b81526004016105b99190612267565b509192915050565b606082471015611d715760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b9565b6001600160a01b0385163b611dc85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b9565b600080866001600160a01b03168587604051611de4919061229a565b60006040518083038185875af1925050503d8060008114611e21576040519150601f19603f3d011682016040523d82523d6000602084013e611e26565b606091505b5091509150611e36828286611e41565b979650505050505050565b60608315611e50575081611727565b825115611e605782518084602001fd5b8160405162461bcd60e51b81526004016105b99190612267565b600060208284031215611e8c57600080fd5b5035919050565b60008060408385031215611ea657600080fd5b50508035926020909101359150565b6001600160a01b03811681146117c657600080fd5b60008060408385031215611edd57600080fd5b823591506020830135611eef81611eb5565b809150509250929050565b60008060408385031215611f0d57600080fd5b8235611f1881611eb5565b946020939093013593505050565b600080600060608486031215611f3b57600080fd5b833592506020840135611f4d81611eb5565b9150604084013563ffffffff81168114611f6657600080fd5b809150509250925092565b60008060008060008060c08789031215611f8a57600080fd5b8635611f9581611eb5565b95506020870135945060408701359350606087013592506080870135915060a0870135611fc181611eb5565b809150509295509295509295565b600060208284031215611fe157600080fd5b813561172781611eb5565b60008060006060848603121561200157600080fd5b83359250602084013561201381611eb5565b929592945050506040919091013590565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260139082015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156120c5576120c561209c565b500190565b6000602082840312156120dc57600080fd5b5051919050565b60006000198214156120f7576120f761209c565b5060010190565b600063ffffffff8381169083168181101561211b5761211b61209c565b039392505050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061215057612150612123565b92169190910492915050565b60008282101561216e5761216e61209c565b500390565b600081600019048311821515161561218d5761218d61209c565b500290565b6000826121a1576121a1612123565b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561220357600080fd5b8151801515811461172757600080fd5b600063ffffffff8083168185168083038211156122325761223261209c565b01949350505050565b60005b8381101561225657818101518382015260200161223e565b838111156119405750506000910152565b602081526000825180602084015261228681604085016020870161223b565b601f01601f19169190910160400192915050565b600082516122ac81846020870161223b565b919091019291505056fe436f6d703a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220140472603efdbf4df863aa939776e18f31e9c45290876da4bc0519d8291be82564736f6c634300080c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a61161010457806398969e82116100a2578063c418441c11610071578063c418441c146104c5578063d82ada50146104d8578063f2fde38b1461051e578063f7c618c11461053157600080fd5b806398969e8214610413578063a6d6f4ed14610426578063a912616914610439578063b33494671461046c57600080fd5b80638ae39cac116100de5780638ae39cac146103915780638da5cb5b1461039a5780638dbb1e3a146103ab57806393f1a40b146103be57600080fd5b8063715018a61461036d5780637b0472f0146103755780638aa285501461038857600080fd5b8063441a3e701161017c578063525eef2f1161014b578063525eef2f146102e25780635312ea8e1461033f5780635df5f96f14610352578063630b5ba11461036557600080fd5b8063441a3e70146102a057806348cd4cb1146102b35780634bea3f03146102bc57806351eb05a6146102cf57600080fd5b80631ab06ee5116101b85780631ab06ee5146102445780631aed6553146102595780632b8bbbe8146102625780633a2c67771461027557600080fd5b8063081e3eda146101df5780631526fe27146101f657806317caf6f11461023b575b600080fd5b6067545b6040519081526020015b60405180910390f35b610209610204366004611e7a565b610544565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016101ed565b6101e3606a5481565b610257610252366004611e93565b61058f565b005b6101e3606c5481565b610257610270366004611eca565b610692565b606e54610288906001600160a01b031681565b6040516001600160a01b0390911681526020016101ed565b6102576102ae366004611e93565b6108b6565b6101e3606b5481565b6101e36102ca366004611efa565b610a60565b6102576102dd366004611e7a565b610bda565b6103236102f0366004611f26565b606f6020908152600093845260408085208252928452828420905282529020805460019091015463ffffffff9091169082565b6040805163ffffffff90931683526020830191909152016101ed565b61025761034d366004611e7a565b610cbf565b610257610360366004611f71565b610dad565b6102576110b9565b6102576110e0565b610257610383366004611e93565b611116565b6101e3606d5481565b6101e360665481565b6033546001600160a01b0316610288565b6101e36103b9366004611e93565b61126a565b6103f86103cc366004611eca565b606860209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101ed565b6101e3610421366004611eca565b61133d565b610257610434366004611e7a565b611465565b61045c610447366004611fcf565b60696020526000908152604090205460ff1681565b60405190151581526020016101ed565b6101e361047a366004611eca565b60009182526068602090815260408084206001600160a01b03939093168452918152918190208151606081018352815480825260018301549482019490945260029091015491015290565b6101e36104d3366004611fec565b611494565b6105096104e6366004611eca565b607060209081526000928352604080842090915290825290205463ffffffff1681565b60405163ffffffff90911681526020016101ed565b61025761052c366004611fcf565b61172e565b606554610288906001600160a01b031681565b6067818154811061055457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b6033546001600160a01b031633146105c25760405162461bcd60e51b81526004016105b990612024565b60405180910390fd5b606754829081106105e55760405162461bcd60e51b81526004016105b990612059565b6105ed6110b9565b6106308261062a6067868154811061060757610607612086565b906000526020600020906005020160010154606a546117c990919063ffffffff16565b906117d5565b606a81905550816067848154811061064a5761064a612086565b90600052602060002090600502016001018190555081837f545b620a3000f6303b158b321f06b4e95e28a27d70aecac8c6bdac4f48a9f6b360405160405180910390a3505050565b6033546001600160a01b031633146106bc5760405162461bcd60e51b81526004016105b990612024565b6001600160a01b03811660009081526069602052604090205460ff16156107255760405162461bcd60e51b815260206004820152601960248201527f5374616b6520746f6b656e20616c72656164792065786973740000000000000060448201526064016105b9565b61072d6110b9565b6000606b54431161074057606b54610742565b435b606a5490915061075290846117d5565b606a556001600160a01b0382811660008181526069602090815260408083208054600160ff199091168117909155815160a0810183528581529283018981528383018881526060850186815260808601878152606780549586018155885295517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae600590950294850180546001600160a01b03191691909a161790985590517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af830155517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b082015594517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b186015590517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b290940193909355915185927f2728c9d3205d667bbc0eefdfeda366261b4d021949630c047f3e5834b30611ab91a3505050565b606754829081106108d95760405162461bcd60e51b81526004016105b990612059565b6000606784815481106108ee576108ee612086565b60009182526020808320878452606882526040808520338652909252922080546005909202909201925084111561095c5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016105b9565b61096585610bda565b600061099f826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b906117ed565b906117c9565b90508082600201546109b191906120b2565b600283015581546109c290866117c9565b825560048301546109d390866117c9565b6004840155600383015482546109f39164e8d4a5100091610993916117e1565b60018301558254610a0e906001600160a01b031633876117f9565b610a1b8633876000611861565b6040805186815260006020820152879133917f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94910160405180910390a3505050505050565b60675460009082908110610a865760405162461bcd60e51b81526004016105b990612059565b606e546001600160a01b03163314610ae05760405162461bcd60e51b815260206004820152601a60248201527f4f776e61626c653a206f6e6c7920726577617264207661756c7400000000000060448201526064016105b9565b600060678481548110610af557610af5612086565b600091825260208083208784526068825260408085206001600160a01b038b168652909252922060059091029091019150610b2f85610bda565b6000610b5d826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b9050816002015481610b6f91906120b2565b6000600284015560038401548354919250610b959164e8d4a510009161099391906117e1565b600183015560405186906001600160a01b038916907f926f6d060d7b34315435a6af02d8d2f0382328cd5821183eadda8a4742258d4690600090a39695505050505050565b60675481908110610bfd5760405162461bcd60e51b81526004016105b990612059565b600060678381548110610c1257610c12612086565b9060005260206000209060050201905080600201544311610c3257505050565b600481015480610c485750436002909101555050565b6000610c5883600201544361126a565b90506000610c85606a546109938660010154610c7f606654876117e190919063ffffffff16565b906117e1565b9050610ca8610c9d846109938464e8d4a510006117e1565b6003860154906117d5565b6003850155505043600290920191909155505b5050565b60675481908110610ce25760405162461bcd60e51b81526004016105b990612059565b600060678381548110610cf757610cf7612086565b600091825260208083208684526068825260408085203386529092529083208054848255600182018590556002820194909455600592909202016004810154909350909190610d4690826117c9565b60048401558254610d61906001600160a01b031633836117f9565b610d6e8533836000611861565b604051818152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050505050565b600054610100900460ff16610dc85760005460ff1615610dcc565b303b155b610e2f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b9565b600054610100900460ff16158015610e51576000805461ffff19166101011790555b6001600160a01b03821615801590610e7157506001600160a01b03871615155b610ebd5760405162461bcd60e51b815260206004820152601760248201527f5a65726f20616464726573732076616c69646174696f6e00000000000000000060448201526064016105b9565b838510610f1b5760405162461bcd60e51b815260206004820152602660248201527f537461727420626c6f636b206c6f776572207468616e20626f6e757320656e6460448201526520626c6f636b60d01b60648201526084016105b9565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d91906120ca565b8610610fea5760405162461bcd60e51b815260206004820152603660248201527f5265776172642070657220626c6f636b20626967676572207468616e2072657760448201527561726420746f6b656e20746f74616c20737570706c7960501b60648201526084016105b9565b6064606d54106110525760405162461bcd60e51b815260206004820152602d60248201527f426f6e7573206d756c7469706c657220626967676572207468616e203130307860448201526c2072657761726420626f6e757360981b60648201526084016105b9565b61105a611946565b606580546001600160a01b03808a166001600160a01b0319928316179092556066889055606b879055606c869055606d859055606e80549285169290911691909117905580156110b0576000805461ff00191690555b50505050505050565b60675460005b81811015610cbb576110d081610bda565b6110d9816120e3565b90506110bf565b6033546001600160a01b0316331461110a5760405162461bcd60e51b81526004016105b990612024565b6111146000611975565b565b606754829081106111395760405162461bcd60e51b81526004016105b990612059565b60006067848154811061114e5761114e612086565b6000918252602080832087845260688252604080852033865290925292206005909102909101915061117f85610bda565b8054156111cd5760006111b4826001015461099964e8d4a51000610993876003015487600001546117e190919063ffffffff16565b60028301549091506111c690826117d5565b6002830155505b60048201546111dc90856117d5565b600483015581546111f8906001600160a01b03163330876119c7565b805461120490856117d5565b80825560038301546112219164e8d4a510009161099391906117e1565b81600101819055506112368533866001611861565b604051848152859033907f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b690602001610d9e565b6000606b548310156112d05760405162461bcd60e51b815260206004820152602960248201527f66726f6d20626c6f636b206e756d62657220626967676572207468616e20737460448201526861727420626c6f636b60b81b60648201526084016105b9565b606c5482116112f157606d546112ea90610c7f84866117c9565b9050611337565b606c548310611304576112ea82846117c9565b6112ea61131c606c54846117c990919063ffffffff16565b61062a606d54610c7f87606c546117c990919063ffffffff16565b92915050565b606754600090839081106113635760405162461bcd60e51b81526004016105b990612059565b60006067858154811061137857611378612086565b600091825260208083208884526068825260408085206001600160a01b038a16865290925292206003600590920290920190810154600482015460028301549294509091431180156113c957508015155b156114295760006113de85600201544361126a565b90506000611405606a546109938860010154610c7f606654876117e190919063ffffffff16565b905061142461141d846109938464e8d4a510006117e1565b85906117d5565b935050505b6114598360010154610999856002015461062a64e8d4a51000610993888a600001546117e190919063ffffffff16565b98975050505050505050565b6033546001600160a01b0316331461148f5760405162461bcd60e51b81526004016105b990612024565b606655565b60004382106114f55760405162461bcd60e51b815260206004820152602760248201527f436f6d703a3a6765745072696f72566f7465733a206e6f742079657420646574604482015266195c9b5a5b995960ca1b60648201526084016105b9565b60008481526070602090815260408083206001600160a01b038716845290915290205463ffffffff168061152d576000915050611727565b6000858152606f602090815260408083206001600160a01b03881684529091528120849161155c6001856120fe565b63ffffffff908116825260208201929092526040016000205416116115cf576000858152606f602090815260408083206001600160a01b03881684529091528120906115a96001846120fe565b63ffffffff1663ffffffff16815260200190815260200160002060010154915050611727565b6000858152606f602090815260408083206001600160a01b0388168452825280832083805290915290205463ffffffff16831015611611576000915050611727565b60008061161f6001846120fe565b90505b8163ffffffff168163ffffffff1611156116ee576000600261164484846120fe565b61164e9190612139565b61165890836120fe565b6000898152606f602090815260408083206001600160a01b038c168452825280832063ffffffff80861685529083529281902081518083019092528054909316808252600190930154918101919091529192508714156116c2576020015194506117279350505050565b805163ffffffff168711156116d9578193506116e7565b6116e46001836120fe565b92505b5050611622565b506000868152606f602090815260408083206001600160a01b0389168452825280832063ffffffff909416835292905220600101549150505b9392505050565b6033546001600160a01b031633146117585760405162461bcd60e51b81526004016105b990612024565b6001600160a01b0381166117bd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b9565b6117c681611975565b50565b6000611727828461215c565b600061172782846120b2565b60006117278284612173565b60006117278284612192565b6040516001600160a01b03831660248201526044810182905261185c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526119ff565b505050565b8115611940576001600160a01b038316156119405760008481526070602090815260408083206001600160a01b038716845290915281205463ffffffff1690816118ac5760006118f9565b6000868152606f602090815260408083206001600160a01b03891684529091528120906118da6001856120fe565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9050821561192257600061190d82866117d5565b905061191c8787858585611ad1565b5061193d565b600061192e82866117c9565b90506110b08787858585611ad1565b50505b50505050565b600054610100900460ff1661196d5760405162461bcd60e51b81526004016105b9906121a6565b611114611c99565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526119409085906323b872dd60e01b90608401611825565b6000611a54826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611cc99092919063ffffffff16565b80519091501561185c5780806020019051810190611a7291906121f1565b61185c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b9565b6000611af5436040518060600160405280603481526020016122b760349139611ce0565b905060008463ffffffff16118015611b5957506000868152606f602090815260408083206001600160a01b0389168452909152812063ffffffff831691611b3d6001886120fe565b63ffffffff908116825260208201929092526040016000205416145b15611bac576000868152606f602090815260408083206001600160a01b038916845290915281208391611b8d6001886120fe565b63ffffffff168152602081019190915260400160002060010155611c4d565b60408051808201825263ffffffff8381168252602080830186815260008b8152606f83528581206001600160a01b038c16825283528581208a851682529092529390209151825463ffffffff191691161781559051600191820155611c12908590612213565b60008781526070602090815260408083206001600160a01b038a1684529091529020805463ffffffff191663ffffffff929092169190911790555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a2505050505050565b600054610100900460ff16611cc05760405162461bcd60e51b81526004016105b9906121a6565b61111433611975565b6060611cd88484600085611d10565b949350505050565b6000816401000000008410611d085760405162461bcd60e51b81526004016105b99190612267565b509192915050565b606082471015611d715760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b9565b6001600160a01b0385163b611dc85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b9565b600080866001600160a01b03168587604051611de4919061229a565b60006040518083038185875af1925050503d8060008114611e21576040519150601f19603f3d011682016040523d82523d6000602084013e611e26565b606091505b5091509150611e36828286611e41565b979650505050505050565b60608315611e50575081611727565b825115611e605782518084602001fd5b8160405162461bcd60e51b81526004016105b99190612267565b600060208284031215611e8c57600080fd5b5035919050565b60008060408385031215611ea657600080fd5b50508035926020909101359150565b6001600160a01b03811681146117c657600080fd5b60008060408385031215611edd57600080fd5b823591506020830135611eef81611eb5565b809150509250929050565b60008060408385031215611f0d57600080fd5b8235611f1881611eb5565b946020939093013593505050565b600080600060608486031215611f3b57600080fd5b833592506020840135611f4d81611eb5565b9150604084013563ffffffff81168114611f6657600080fd5b809150509250925092565b60008060008060008060c08789031215611f8a57600080fd5b8635611f9581611eb5565b95506020870135945060408701359350606087013592506080870135915060a0870135611fc181611eb5565b809150509295509295509295565b600060208284031215611fe157600080fd5b813561172781611eb5565b60008060006060848603121561200157600080fd5b83359250602084013561201381611eb5565b929592945050506040919091013590565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260139082015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156120c5576120c561209c565b500190565b6000602082840312156120dc57600080fd5b5051919050565b60006000198214156120f7576120f761209c565b5060010190565b600063ffffffff8381169083168181101561211b5761211b61209c565b039392505050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061215057612150612123565b92169190910492915050565b60008282101561216e5761216e61209c565b500390565b600081600019048311821515161561218d5761218d61209c565b500290565b6000826121a1576121a1612123565b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561220357600080fd5b8151801515811461172757600080fd5b600063ffffffff8083168185168083038211156122325761223261209c565b01949350505050565b60005b8381101561225657818101518382015260200161223e565b838111156119405750506000910152565b602081526000825180602084015261228681604085016020870161223b565b601f01601f19169190910160400192915050565b600082516122ac81846020870161223b565b919091019291505056fe436f6d703a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220140472603efdbf4df863aa939776e18f31e9c45290876da4bc0519d8291be82564736f6c634300080c0033

Deployed Bytecode Sourcemap

37705:14627:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40835:95;40907:8;:15;40835:95;;;160:25:1;;;148:2;133:18;40835:95:0;;;;;;;;38966:26;;;;;;:::i;:::-;;:::i;:::-;;;;-1:-1:-1;;;;;673:32:1;;;655:51;;737:2;722:18;;715:34;;;;765:18;;;758:34;;;;823:2;808:18;;801:34;866:3;851:19;;844:35;642:3;627:19;38966:26:0;381:504:1;39119:34:0;;;;;;42327:354;;;;;;:::i;:::-;;:::i;:::-;;39192:28;;;;;;41376:766;;;;;;:::i;:::-;;:::i;39265:26::-;;;;;-1:-1:-1;;;;;39265:26:0;;;;;;-1:-1:-1;;;;;1794:32:1;;;1776:51;;1764:2;1749:18;39265:26:0;1630:203:1;47284:1056:0;;;;;;:::i;:::-;;:::i;39160:25::-;;;;;;49062:717;;;;;;:::i;:::-;;:::i;44782:748::-;;;;;;:::i;:::-;;:::i;39536:91::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2868:10:1;2856:23;;;2838:42;;2911:2;2896:18;;2889:34;;;;2811:18;39536:91:0;2666:263:1;48411:643:0;;;;;;:::i;:::-;;:::i;39909:918::-;;;;;;:::i;:::-;;:::i;44526:180::-;;;:::i;14122:103::-;;;:::i;46338:938::-;;;;;;:::i;:::-;;:::i;39227:31::-;;;;;;38930:29;;;;;;13471:87;13544:6;;-1:-1:-1;;;;;13544:6:0;13471:87;;42943:564;;;;;;:::i;:::-;;:::i;38999:64::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4163:25:1;;;4219:2;4204:18;;4197:34;;;;4247:18;;;4240:34;4151:2;4136:18;38999:64:0;3961:319:1;43515:928:0;;;;;;:::i;:::-;;:::i;42745:122::-;;;;;;:::i;:::-;;:::i;39070:42::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4710:14:1;;4703:22;4685:41;;4673:2;4658:18;39070:42:0;4545:187:1;40938:173:0;;;;;;:::i;:::-;41012:7;41055:13;;;:8;:13;;;;;;;;-1:-1:-1;;;;;41055:19:0;;;;;;;;;;;;;41032:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40938:173;50210:1269;;;;;;:::i;:::-;;:::i;39696:70::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5307:10:1;5295:23;;;5277:42;;5265:2;5250:18;39696:70:0;5133:192:1;14380:201:0;;;;;;:::i;:::-;;:::i;38898:25::-;;;;;-1:-1:-1;;;;;38898:25:0;;;38966:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;38966:26:0;;;;-1:-1:-1;38966:26:0;;;;;:::o;42327:354::-;13544:6;;-1:-1:-1;;;;;13544:6:0;11762:10;13691:23;13683:68;;;;-1:-1:-1;;;13683:68:0;;;;;;;:::i;:::-;;;;;;;;;39842:8:::1;:15:::0;42435:4;;39835:22;::::1;39827:54;;;;-1:-1:-1::0;;;39827:54:0::1;;;;;;;:::i;:::-;42452:17:::2;:15;:17::i;:::-;42498:87;42563:11;42498:46;42518:8;42527:4;42518:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;;42498:15;;:19;;:46;;;;:::i;:::-;:50:::0;::::2;:87::i;:::-;42480:15;:105;;;;42624:11;42596:8;42605:4;42596:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;:39;;;;42661:11;42655:4;42651:22;;;;;;;;;;13762:1:::1;42327:354:::0;;:::o;41376:766::-;13544:6;;-1:-1:-1;;;;;13544:6:0;11762:10;13691:23;13683:68;;;;-1:-1:-1;;;13683:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;41492:32:0;::::1;;::::0;;;:10:::1;:32;::::0;;;;;::::1;;41491:33;41483:71;;;::::0;-1:-1:-1;;;41483:71:0;;6596:2:1;41483:71:0::1;::::0;::::1;6578:21:1::0;6635:2;6615:18;;;6608:30;6674:27;6654:18;;;6647:55;6719:18;;41483:71:0::1;6394:349:1::0;41483:71:0::1;41565:17;:15;:17::i;:::-;41593:23;41647:10;;41632:12;:25;:53;;41675:10;;41632:53;;;41660:12;41632:53;41714:15;::::0;41593:92;;-1:-1:-1;41714:32:0::1;::::0;41734:11;41714:19:::1;:32::i;:::-;41696:15;:50:::0;-1:-1:-1;;;;;41757:32:0;;::::1;;::::0;;;:10:::1;:32;::::0;;;;;;;:39;;41792:4:::1;-1:-1:-1::0;;41757:39:0;;::::1;::::0;::::1;::::0;;;41835:234;;::::1;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;41807:8:::1;:273:::0;;;;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;41807:273:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42096:38;;41835:234;;42096:38:::1;::::0;::::1;41472:670;41376:766:::0;;:::o;47284:1056::-;39842:8;:15;47358:4;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;47375:21:::1;47399:8;47408:4;47399:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;47448;;;:8:::1;:14:::0;;;;;;47463:10:::1;47448:26:::0;;;;;;;47493:11;;47399:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;47493:22:0;-1:-1:-1;47493:22:0::1;47485:53;;;::::0;-1:-1:-1;;;47485:53:0;;6950:2:1;47485:53:0::1;::::0;::::1;6932:21:1::0;6989:2;6969:18;;;6962:30;-1:-1:-1;;;7008:18:1;;;7001:48;7066:18;;47485:53:0::1;6748:342:1::0;47485:53:0::1;47549:16;47560:4;47549:10;:16::i;:::-;47576:15;47607:99;47676:4;:15;;;47607:46;47648:4;47607:36;47623:4;:19;;;47607:4;:11;;;:15;;:36;;;;:::i;:::-;:40:::0;::::1;:46::i;:::-;:50:::0;::::1;:99::i;:::-;47576:130;;47901:7;47875:4;:23;;;:33;;;;:::i;:::-;47849:23;::::0;::::1;:59:::0;47933:11;;:24:::1;::::0;47949:7;47933:15:::1;:24::i;:::-;47919:38:::0;;47992:21:::1;::::0;::::1;::::0;:34:::1;::::0;48018:7;47992:25:::1;:34::i;:::-;47968:21;::::0;::::1;:58:::0;48071:19:::1;::::0;::::1;::::0;48055:11;;:46:::1;::::0;48096:4:::1;::::0;48055:36:::1;::::0;:15:::1;:36::i;:46::-;48037:15;::::0;::::1;:64:::0;48112:15;;:58:::1;::::0;-1:-1:-1;;;;;48112:15:0::1;48149:10;48162:7:::0;48112:28:::1;:58::i;:::-;48230:48;48245:4;48251:10;48263:7;48272:5;48230:14;:48::i;:::-;48294:38;::::0;;7542:25:1;;;48330:1:0::1;7598:2:1::0;7583:18;;7576:34;48315:4:0;;48303:10:::1;::::0;48294:38:::1;::::0;7515:18:1;48294:38:0::1;;;;;;;47364:976;;;47284:1056:::0;;;:::o;49062:717::-;39842:8;:15;49165:7;;49151:3;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;49207:11:::1;::::0;-1:-1:-1;;;;;49207:11:0::1;49193:10;:25;49185:64;;;::::0;-1:-1:-1;;;49185:64:0;;7823:2:1;49185:64:0::1;::::0;::::1;7805:21:1::0;7862:2;7842:18;;;7835:30;7901:28;7881:18;;;7874:56;7947:18;;49185:64:0::1;7621:350:1::0;49185:64:0::1;49260:21;49284:8;49293:3;49284:13;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;49332;;;:8:::1;:13:::0;;;;;;-1:-1:-1;;;;;49332:26:0;::::1;::::0;;;;;;;49284:13:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;49369:15:0::1;49341:3:::0;49369:10:::1;:15::i;:::-;49395;49426:99;49495:4;:15;;;49426:46;49467:4;49426:36;49442:4;:19;;;49426:4;:11;;;:15;;:36;;;;:::i;:99::-;49395:130;;49556:4;:23;;;49546:7;:33;;;;:::i;:::-;49616:1;49590:23;::::0;::::1;:27:::0;49662:19:::1;::::0;::::1;::::0;49646:11;;49536:43;;-1:-1:-1;49646:46:0::1;::::0;49687:4:::1;::::0;49646:36:::1;::::0;:11;:15:::1;:36::i;:46::-;49628:15;::::0;::::1;:64:::0;49708:38:::1;::::0;49742:3;;-1:-1:-1;;;;;49708:38:0;::::1;::::0;::::1;::::0;;;::::1;49764:7:::0;49062:717;-1:-1:-1;;;;;;49062:717:0:o;44782:748::-;39842:8;:15;44841:4;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;44858:21:::1;44882:8;44891:4;44882:14;;;;;;;;:::i;:::-;;;;;;;;;;;44858:38;;44927:4;:20;;;44911:12;:36;44907:75;;44964:7;44782:748:::0;;:::o;44907:75::-:1;45009:21;::::0;::::1;::::0;45045:11;45041:100:::1;;-1:-1:-1::0;45096:12:0::1;45073:20;::::0;;::::1;:35:::0;44782:748;;:::o;45041:100::-:1;45151:18;45172:49;45186:4;:20;;;45208:12;45172:13;:49::i;:::-;45151:70;;45232:14;45262:104;45336:15;;45262:51;45297:4;:15;;;45262:30;45277:14;;45262:10;:14;;:30;;;;:::i;:::-;:34:::0;::::1;:51::i;:104::-;45232:134:::0;-1:-1:-1;45399:77:0::1;45437:28;45458:6:::0;45437:16:::1;45232:134:::0;45448:4:::1;45437:10;:16::i;:28::-;45399:19;::::0;::::1;::::0;;:23:::1;:77::i;:::-;45377:19;::::0;::::1;:99:::0;-1:-1:-1;;45510:12:0::1;45487:20;::::0;;::::1;:35:::0;;;;-1:-1:-1;39892:1:0::1;44782:748:::0;;:::o;48411:643::-;39842:8;:15;48477:4;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;48494:21:::1;48518:8;48527:4;48518:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;48567;;;:8:::1;:14:::0;;;;;;48582:10:::1;48567:26:::0;;;;;;;;48625:11;;48647:15;;;-1:-1:-1;48673:15:0;::::1;:19:::0;;;48703:23:::1;::::0;::::1;:27:::0;;;;48518:14:::1;::::0;;;::::1;;48765:21;::::0;::::1;::::0;48518:14;;-1:-1:-1;48567:26:0;;48625:11;48765:37:::1;::::0;48625:11;48765:25:::1;:37::i;:::-;48741:21;::::0;::::1;:61:::0;48813:15;;:61:::1;::::0;-1:-1:-1;;;;;48813:15:0::1;48850:10;48863::::0;48813:28:::1;:61::i;:::-;48932:51;48947:4;48953:10;48965;48977:5;48932:14;:51::i;:::-;48999:47;::::0;160:25:1;;;49029:4:0;;49017:10:::1;::::0;48999:47:::1;::::0;148:2:1;133:18;48999:47:0::1;;;;;;;;48483:571;;;48411:643:::0;;:::o;39909:918::-;9982:13;;;;;;;:48;;10018:12;;;;10017:13;9982:48;;;10785:4;1562:19;:23;9998:16;9974:107;;;;-1:-1:-1;;;9974:107:0;;8178:2:1;9974:107:0;;;8160:21:1;8217:2;8197:18;;;8190:30;8256:34;8236:18;;;8229:62;-1:-1:-1;;;8307:18:1;;;8300:44;8361:19;;9974:107:0;7976:410:1;9974:107:0;10094:19;10117:13;;;;;;10116:14;10141:101;;;;10176:13;:20;;-1:-1:-1;;10211:19:0;;;;;10141:101;-1:-1:-1;;;;;40162:26:0;::::1;::::0;;::::1;::::0;:65:::1;;-1:-1:-1::0;;;;;;40192:35:0;::::1;::::0;::::1;40162:65;40154:101;;;::::0;-1:-1:-1;;;40154:101:0;;8593:2:1;40154:101:0::1;::::0;::::1;8575:21:1::0;8632:2;8612:18;;;8605:30;8671:25;8651:18;;;8644:53;8714:18;;40154:101:0::1;8391:347:1::0;40154:101:0::1;40288:14;40274:11;:28;40266:79;;;::::0;-1:-1:-1;;;40266:79:0;;8945:2:1;40266:79:0::1;::::0;::::1;8927:21:1::0;8984:2;8964:18;;;8957:30;9023:34;9003:18;;;8996:62;-1:-1:-1;;;9074:18:1;;;9067:36;9120:19;;40266:79:0::1;8743:402:1::0;40266:79:0::1;40382:12;-1:-1:-1::0;;;;;40382:24:0::1;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;40364:15;:44;40356:111;;;::::0;-1:-1:-1;;;40356:111:0;;9541:2:1;40356:111:0::1;::::0;::::1;9523:21:1::0;9580:2;9560:18;;;9553:30;9619:34;9599:18;;;9592:62;-1:-1:-1;;;9670:18:1;;;9663:52;9732:19;;40356:111:0::1;9339:418:1::0;40356:111:0::1;40505:3;40486:16;;:22;40478:80;;;::::0;-1:-1:-1;;;40478:80:0;;9964:2:1;40478:80:0::1;::::0;::::1;9946:21:1::0;10003:2;9983:18;;;9976:30;10042:34;10022:18;;;10015:62;-1:-1:-1;;;10093:18:1;;;10086:43;10146:19;;40478:80:0::1;9762:409:1::0;40478:80:0::1;40569:16;:14;:16::i;:::-;40596:11;:26:::0;;-1:-1:-1;;;;;40596:26:0;;::::1;-1:-1:-1::0;;;;;;40596:26:0;;::::1;;::::0;;;40633:14:::1;:32:::0;;;40676:10:::1;:24:::0;;;40711:13:::1;:30:::0;;;40752:16:::1;:30:::0;;;40793:11:::1;:26:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;10268:68;;;;10319:5;10303:21;;-1:-1:-1;;10303:21:0;;;10268:68;9689:654;39909:918;;;;;;:::o;44526:180::-;44588:8;:15;44571:14;44614:85;44642:6;44636:3;:12;44614:85;;;44672:15;44683:3;44672:10;:15::i;:::-;44650:5;;;:::i;:::-;;;44614:85;;14122:103;13544:6;;-1:-1:-1;;;;;13544:6:0;11762:10;13691:23;13683:68;;;;-1:-1:-1;;;13683:68:0;;;;;;;:::i;:::-;14187:30:::1;14214:1;14187:18;:30::i;:::-;14122:103::o:0;46338:938::-;39842:8;:15;46409:4;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;46426:21:::1;46450:8;46459:4;46450:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;46499;;;:8:::1;:14:::0;;;;;;46514:10:::1;46499:26:::0;;;;;;;46450:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;46536:16:0::1;46508:4:::0;46536:10:::1;:16::i;:::-;46567:11:::0;;:15;46563:267:::1;;46599:15;46634:107;46707:4;:15;;;46634:46;46675:4;46634:36;46650:4;:19;;;46634:4;:11;;;:15;;:36;;;;:::i;:107::-;46782:23;::::0;::::1;::::0;46599:142;;-1:-1:-1;46782:36:0::1;::::0;46599:142;46782:27:::1;:36::i;:::-;46756:23;::::0;::::1;:62:::0;-1:-1:-1;46563:267:0::1;46864:21;::::0;::::1;::::0;:34:::1;::::0;46890:7;46864:25:::1;:34::i;:::-;46840:21;::::0;::::1;:58:::0;46909:15;;:127:::1;::::0;-1:-1:-1;;;;;46909:15:0::1;46964:10;46998:4;47018:7:::0;46909:32:::1;:127::i;:::-;47061:11:::0;;:24:::1;::::0;47077:7;47061:15:::1;:24::i;:::-;47047:38:::0;;;47130:19:::1;::::0;::::1;::::0;47114:46:::1;::::0;47155:4:::1;::::0;47114:36:::1;::::0;47047:38;47114:15:::1;:36::i;:46::-;47096:4;:15;;:64;;;;47173:47;47188:4;47194:10;47206:7;47215:4;47173:14;:47::i;:::-;47236:32;::::0;160:25:1;;;47254:4:0;;47242:10:::1;::::0;47236:32:::1;::::0;148:2:1;133:18;47236:32:0::1;14:177:1::0;42943:564:0;43042:7;43084:10;;43075:5;:19;;43067:73;;;;-1:-1:-1;;;43067:73:0;;10518:2:1;43067:73:0;;;10500:21:1;10557:2;10537:18;;;10530:30;10596:34;10576:18;;;10569:62;-1:-1:-1;;;10647:18:1;;;10640:39;10696:19;;43067:73:0;10316:405:1;43067:73:0;43162:13;;43155:3;:20;43151:349;;43218:16;;43199:36;;:14;:3;43207:5;43199:7;:14::i;:36::-;43192:43;;;;43151:349;43266:13;;43257:5;:22;43253:247;;43303:14;:3;43311:5;43303:7;:14::i;43253:247::-;43374:114;43447:22;43455:13;;43447:3;:7;;:22;;;;:::i;:::-;43374:46;43403:16;;43374:24;43392:5;43374:13;;:17;;:24;;;;:::i;43253:247::-;42943:564;;;;:::o;43515:928::-;39842:8;:15;43650:7;;43626:4;;39835:22;;39827:54;;;;-1:-1:-1;;;39827:54:0;;;;;;;:::i;:::-;43675:21:::1;43699:8;43708:4;43699:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;43748;;;:8:::1;:14:::0;;;;;;-1:-1:-1;;;;;43748:21:0;::::1;::::0;;;;;;;43805:19:::1;43699:14;::::0;;::::1;::::0;;::::1;43805:19:::0;;::::1;::::0;43852:21:::1;::::0;::::1;::::0;43903:20:::1;::::0;::::1;::::0;43699:14;;-1:-1:-1;43805:19:0;;43888:12:::1;:35;:50:::0;::::1;;;-1:-1:-1::0;43927:11:0;;::::1;43888:50;43884:443;;;43955:18;43993:49;44007:4;:20;;;44029:12;43993:13;:49::i;:::-;43955:87;;44057:14;44091:112;44169:15;;44091:51;44126:4;:15;;;44091:30;44106:14;;44091:10;:14;;:30;;;;:::i;:112::-;44057:146:::0;-1:-1:-1;44235:80:0::1;44272:28;44293:6:::0;44272:16:::1;44057:146:::0;44283:4:::1;44272:10;:16::i;:28::-;44235:14:::0;;:18:::1;:80::i;:::-;44218:97;;43940:387;;43884:443;44344:91;44419:4;:15;;;44344:70;44390:4;:23;;;44344:41;44380:4;44344:31;44360:14;44344:4;:11;;;:15;;:31;;;;:::i;:91::-;44337:98:::0;43515:928;-1:-1:-1;;;;;;;;43515:928:0:o;42745:122::-;13544:6;;-1:-1:-1;;;;;13544:6:0;11762:10;13691:23;13683:68;;;;-1:-1:-1;;;13683:68:0;;;;;;;:::i;:::-;42837:14:::1;:22:::0;42745:122::o;50210:1269::-;50303:7;50345:12;50331:11;:26;50323:78;;;;-1:-1:-1;;;50323:78:0;;10928:2:1;50323:78:0;;;10910:21:1;10967:2;10947:18;;;10940:30;11006:34;10986:18;;;10979:62;-1:-1:-1;;;11057:18:1;;;11050:37;11104:19;;50323:78:0;10726:403:1;50323:78:0;50414:19;50436:20;;;:14;:20;;;;;;;;-1:-1:-1;;;;;50436:29:0;;;;;;;;;;;;50480:17;50476:58;;50521:1;50514:8;;;;;50476:58;50594:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;50594:26:0;;;;;;;;;50652:11;;50621:16;50636:1;50621:12;:16;:::i;:::-;50594:44;;;;;;;;;;;;;;;-1:-1:-1;50594:44:0;:54;;:69;50590:159;;50687:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;50687:26:0;;;;;;;;;;50714:16;50729:1;50714:12;:16;:::i;:::-;50687:44;;;;;;;;;;;;;;;:50;;;50680:57;;;;;50590:159;50810:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;50810:26:0;;;;;;;;;:29;;;;;;;;:39;:29;:39;:53;-1:-1:-1;50806:94:0;;;50887:1;50880:8;;;;;50806:94;50912:12;;50954:16;50969:1;50954:12;:16;:::i;:::-;50939:31;;50981:434;50996:5;50988:13;;:5;:13;;;50981:434;;;51018:13;51060:1;51043:13;51051:5;51043;:13;:::i;:::-;51042:19;;;;:::i;:::-;51034:27;;:5;:27;:::i;:::-;51103:20;51126:17;;;:11;:17;;;;;;;;-1:-1:-1;;;;;51126:26:0;;;;;;;;;:34;;;;;;;;;;;;;51103:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;51018:43;;-1:-1:-1;51179:27:0;;51175:229;;;51234:8;;;;-1:-1:-1;51227:15:0;;-1:-1:-1;;;;51227:15:0;51175:229;51268:12;;:26;;;-1:-1:-1;51264:140:0;;;51323:6;51315:14;;51264:140;;;51378:10;51387:1;51378:6;:10;:::i;:::-;51370:18;;51264:140;51003:412;;50981:434;;;-1:-1:-1;51432:17:0;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;51432:26:0;;;;;;;;;:33;;;;;;;;;;:39;;;;-1:-1:-1;;50210:1269:0;;;;;;:::o;14380:201::-;13544:6;;-1:-1:-1;;;;;13544:6:0;11762:10;13691:23;13683:68;;;;-1:-1:-1;;;13683:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;14469:22:0;::::1;14461:73;;;::::0;-1:-1:-1;;;14461:73:0;;11890:2:1;14461:73:0::1;::::0;::::1;11872:21:1::0;11929:2;11909:18;;;11902:30;11968:34;11948:18;;;11941:62;-1:-1:-1;;;12019:18:1;;;12012:36;12065:19;;14461:73:0::1;11688:402:1::0;14461:73:0::1;14545:28;14564:8;14545:18;:28::i;:::-;14380:201:::0;:::o;18480:98::-;18538:7;18565:5;18569:1;18565;:5;:::i;18099:98::-;18157:7;18184:5;18188:1;18184;:5;:::i;18837:98::-;18895:7;18922:5;18926:1;18922;:5;:::i;19236:98::-;19294:7;19321:5;19325:1;19321;:5;:::i;34343:211::-;34487:58;;-1:-1:-1;;;;;12715:32:1;;34487:58:0;;;12697:51:1;12764:18;;;12757:34;;;34460:86:0;;34480:5;;-1:-1:-1;;;34510:23:0;12670:18:1;;34487:58:0;;;;-1:-1:-1;;34487:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;34487:58:0;-1:-1:-1;;;;;;34487:58:0;;;;;;;;;;34460:19;:86::i;:::-;34343:211;;;:::o;45538:739::-;45644:10;;45640:630;;-1:-1:-1;;;;;45675:20:0;;;45671:588;;45716:16;45735:20;;;:14;:20;;;;;;;;-1:-1:-1;;;;;45735:28:0;;;;;;;;;;;;;45802:13;:66;;45867:1;45802:66;;;45818:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;45818:25:0;;;;;;;;;;45844:13;45856:1;45844:9;:13;:::i;:::-;45818:40;;;;;;;;;;;;;;;:46;;;45802:66;45782:86;;45891:5;45887:357;;;45921:17;45941:21;:9;45955:6;45941:13;:21::i;:::-;45921:41;;45985:63;46002:4;46008:6;46016:9;46027;46038;45985:16;:63::i;:::-;45898:170;45887:357;;;46097:17;46117:21;:9;46131:6;46117:13;:21::i;:::-;46097:41;;46161:63;46178:4;46184:6;46192:9;46203;46214;46161:16;:63::i;45887:357::-;45697:562;;45671:588;45538:739;;;;:::o;13172:97::-;10585:13;;;;;;;10577:69;;;;-1:-1:-1;;;10577:69:0;;;;;;;:::i;:::-;13235:26:::1;:24;:26::i;14741:191::-:0;14834:6;;;-1:-1:-1;;;;;14851:17:0;;;-1:-1:-1;;;;;;14851:17:0;;;;;;;14884:40;;14834:6;;;14851:17;14834:6;;14884:40;;14815:16;;14884:40;14804:128;14741:191;:::o;34562:248::-;34733:68;;-1:-1:-1;;;;;13472:15:1;;;34733:68:0;;;13454:34:1;13524:15;;13504:18;;;13497:43;13556:18;;;13549:34;;;34706:96:0;;34726:5;;-1:-1:-1;;;34756:27:0;13389:18:1;;34733:68:0;13214:375:1;36916:716:0;37340:23;37366:69;37394:4;37366:69;;;;;;;;;;;;;;;;;37374:5;-1:-1:-1;;;;;37366:27:0;;;:69;;;;;:::i;:::-;37450:17;;37340:95;;-1:-1:-1;37450:21:0;37446:179;;37547:10;37536:30;;;;;;;;;;;;:::i;:::-;37528:85;;;;-1:-1:-1;;;37528:85:0;;14078:2:1;37528:85:0;;;14060:21:1;14117:2;14097:18;;;14090:30;14156:34;14136:18;;;14129:62;-1:-1:-1;;;14207:18:1;;;14200:40;14257:19;;37528:85:0;13876:406:1;51487:669:0;51621:18;51642:76;51649:12;51642:76;;;;;;;;;;;;;;;;;:6;:76::i;:::-;51621:97;;51748:1;51733:12;:16;;;:91;;;;-1:-1:-1;51753:17:0;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;51753:28:0;;;;;;;;;:71;;;;51782:16;51797:1;51782:12;:16;:::i;:::-;51753:46;;;;;;;;;;;;;;;-1:-1:-1;51753:46:0;:56;;:71;51733:91;51729:353;;;51839:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;51839:28:0;;;;;;;;;51894:8;;51868:16;51883:1;51868:12;:16;:::i;:::-;51839:46;;;;;;;;;;;;;-1:-1:-1;51839:46:0;:52;;:63;51729:353;;;51976:33;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;51931:17:0;;;:11;:17;;;;;-1:-1:-1;;;;;51931:28:0;;;;;;;;;:42;;;;;;;;;;;:78;;;;-1:-1:-1;;51931:78:0;;;;;;;;-1:-1:-1;51931:78:0;;;;52056:16;;51931:42;;52056:16;:::i;:::-;52022:20;;;;:14;:20;;;;;;;;-1:-1:-1;;;;;52022:31:0;;;;;;;;;:50;;-1:-1:-1;;52022:50:0;;;;;;;;;;;;51729:353;52097:51;;;7542:25:1;;;7598:2;7583:18;;7576:34;;;-1:-1:-1;;;;;52097:51:0;;;;;7515:18:1;52097:51:0;;;;;;;51612:544;51487:669;;;;;:::o;13277:113::-;10585:13;;;;;;;10577:69;;;;-1:-1:-1;;;10577:69:0;;;;;;;:::i;:::-;13350:32:::1;11762:10:::0;13350:18:::1;:32::i;26242:229::-:0;26379:12;26411:52;26433:6;26441:4;26447:1;26450:12;26411:21;:52::i;:::-;26404:59;26242:229;-1:-1:-1;;;;26242:229:0:o;52168:161::-;52243:6;52281:12;52274:5;52270:9;;52262:32;;;;-1:-1:-1;;;52262:32:0;;;;;;;;:::i;:::-;-1:-1:-1;52319:1:0;;52168:161;-1:-1:-1;;52168:161:0:o;27362:510::-;27532:12;27590:5;27565:21;:30;;27557:81;;;;-1:-1:-1;;;27557:81:0;;15626:2:1;27557:81:0;;;15608:21:1;15665:2;15645:18;;;15638:30;15704:34;15684:18;;;15677:62;-1:-1:-1;;;15755:18:1;;;15748:36;15801:19;;27557:81:0;15424:402:1;27557:81:0;-1:-1:-1;;;;;1562:19:0;;;27649:60;;;;-1:-1:-1;;;27649:60:0;;16033:2:1;27649:60:0;;;16015:21:1;16072:2;16052:18;;;16045:30;16111:31;16091:18;;;16084:59;16160:18;;27649:60:0;15831:353:1;27649:60:0;27723:12;27737:23;27764:6;-1:-1:-1;;;;;27764:11:0;27783:5;27790:4;27764:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27722:73;;;;27813:51;27830:7;27839:10;27851:12;27813:16;:51::i;:::-;27806:58;27362:510;-1:-1:-1;;;;;;;27362:510:0:o;30048:712::-;30198:12;30227:7;30223:530;;;-1:-1:-1;30258:10:0;30251:17;;30223:530;30372:17;;:21;30368:374;;30570:10;30564:17;30631:15;30618:10;30614:2;30610:19;30603:44;30368:374;30713:12;30706:20;;-1:-1:-1;;;30706:20:0;;;;;;;;:::i;196:180:1:-;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;-1:-1:-1;347:23:1;;196:180;-1:-1:-1;196:180:1:o;890:248::-;958:6;966;1019:2;1007:9;998:7;994:23;990:32;987:52;;;1035:1;1032;1025:12;987:52;-1:-1:-1;;1058:23:1;;;1128:2;1113:18;;;1100:32;;-1:-1:-1;890:248:1:o;1143:139::-;-1:-1:-1;;;;;1226:31:1;;1216:42;;1206:70;;1272:1;1269;1262:12;1287:338;1370:6;1378;1431:2;1419:9;1410:7;1406:23;1402:32;1399:52;;;1447:1;1444;1437:12;1399:52;1483:9;1470:23;1460:33;;1543:2;1532:9;1528:18;1515:32;1556:39;1589:5;1556:39;:::i;:::-;1614:5;1604:15;;;1287:338;;;;;:::o;1838:323::-;1906:6;1914;1967:2;1955:9;1946:7;1942:23;1938:32;1935:52;;;1983:1;1980;1973:12;1935:52;2022:9;2009:23;2041:39;2074:5;2041:39;:::i;:::-;2099:5;2151:2;2136:18;;;;2123:32;;-1:-1:-1;;;1838:323:1:o;2166:495::-;2242:6;2250;2258;2311:2;2299:9;2290:7;2286:23;2282:32;2279:52;;;2327:1;2324;2317:12;2279:52;2363:9;2350:23;2340:33;;2423:2;2412:9;2408:18;2395:32;2436:39;2469:5;2436:39;:::i;:::-;2494:5;-1:-1:-1;2551:2:1;2536:18;;2523:32;2599:10;2586:24;;2574:37;;2564:65;;2625:1;2622;2615:12;2564:65;2648:7;2638:17;;;2166:495;;;;;:::o;2934:694::-;3053:6;3061;3069;3077;3085;3093;3146:3;3134:9;3125:7;3121:23;3117:33;3114:53;;;3163:1;3160;3153:12;3114:53;3202:9;3189:23;3221:39;3254:5;3221:39;:::i;:::-;3279:5;-1:-1:-1;3331:2:1;3316:18;;3303:32;;-1:-1:-1;3382:2:1;3367:18;;3354:32;;-1:-1:-1;3433:2:1;3418:18;;3405:32;;-1:-1:-1;3484:3:1;3469:19;;3456:33;;-1:-1:-1;3541:3:1;3526:19;;3513:33;3555:41;3513:33;3555:41;:::i;:::-;3615:7;3605:17;;;2934:694;;;;;;;;:::o;4285:255::-;4344:6;4397:2;4385:9;4376:7;4372:23;4368:32;4365:52;;;4413:1;4410;4403:12;4365:52;4452:9;4439:23;4471:39;4504:5;4471:39;:::i;4737:391::-;4814:6;4822;4830;4883:2;4871:9;4862:7;4858:23;4854:32;4851:52;;;4899:1;4896;4889:12;4851:52;4935:9;4922:23;4912:33;;4995:2;4984:9;4980:18;4967:32;5008:39;5041:5;5008:39;:::i;:::-;4737:391;;5066:5;;-1:-1:-1;;;5118:2:1;5103:18;;;;5090:32;;4737:391::o;5553:356::-;5755:2;5737:21;;;5774:18;;;5767:30;5833:34;5828:2;5813:18;;5806:62;5900:2;5885:18;;5553:356::o;5914:343::-;6116:2;6098:21;;;6155:2;6135:18;;;6128:30;-1:-1:-1;;;6189:2:1;6174:18;;6167:49;6248:2;6233:18;;5914:343::o;6262:127::-;6323:10;6318:3;6314:20;6311:1;6304:31;6354:4;6351:1;6344:15;6378:4;6375:1;6368:15;7095:127;7156:10;7151:3;7147:20;7144:1;7137:31;7187:4;7184:1;7177:15;7211:4;7208:1;7201:15;7227:128;7267:3;7298:1;7294:6;7291:1;7288:13;7285:39;;;7304:18;;:::i;:::-;-1:-1:-1;7340:9:1;;7227:128::o;9150:184::-;9220:6;9273:2;9261:9;9252:7;9248:23;9244:32;9241:52;;;9289:1;9286;9279:12;9241:52;-1:-1:-1;9312:16:1;;9150:184;-1:-1:-1;9150:184:1:o;10176:135::-;10215:3;-1:-1:-1;;10236:17:1;;10233:43;;;10256:18;;:::i;:::-;-1:-1:-1;10303:1:1;10292:13;;10176:135::o;11134:221::-;11173:4;11202:10;11262;;;;11232;;11284:12;;;11281:38;;;11299:18;;:::i;:::-;11336:13;;11134:221;-1:-1:-1;;;11134:221:1:o;11360:127::-;11421:10;11416:3;11412:20;11409:1;11402:31;11452:4;11449:1;11442:15;11476:4;11473:1;11466:15;11492:191;11531:1;11557:10;11594:2;11591:1;11587:10;11616:3;11606:37;;11623:18;;:::i;:::-;11661:10;;11657:20;;;;;11492:191;-1:-1:-1;;11492:191:1:o;12095:125::-;12135:4;12163:1;12160;12157:8;12154:34;;;12168:18;;:::i;:::-;-1:-1:-1;12205:9:1;;12095:125::o;12225:168::-;12265:7;12331:1;12327;12323:6;12319:14;12316:1;12313:21;12308:1;12301:9;12294:17;12290:45;12287:71;;;12338:18;;:::i;:::-;-1:-1:-1;12378:9:1;;12225:168::o;12398:120::-;12438:1;12464;12454:35;;12469:18;;:::i;:::-;-1:-1:-1;12503:9:1;;12398:120::o;12802:407::-;13004:2;12986:21;;;13043:2;13023:18;;;13016:30;13082:34;13077:2;13062:18;;13055:62;-1:-1:-1;;;13148:2:1;13133:18;;13126:41;13199:3;13184:19;;12802:407::o;13594:277::-;13661:6;13714:2;13702:9;13693:7;13689:23;13685:32;13682:52;;;13730:1;13727;13720:12;13682:52;13762:9;13756:16;13815:5;13808:13;13801:21;13794:5;13791:32;13781:60;;13837:1;13834;13827:12;14287:228;14326:3;14354:10;14391:2;14388:1;14384:10;14421:2;14418:1;14414:10;14452:3;14448:2;14444:12;14439:3;14436:21;14433:47;;;14460:18;;:::i;:::-;14496:13;;14287:228;-1:-1:-1;;;;14287:228:1:o;14773:258::-;14845:1;14855:113;14869:6;14866:1;14863:13;14855:113;;;14945:11;;;14939:18;14926:11;;;14919:39;14891:2;14884:10;14855:113;;;14986:6;14983:1;14980:13;14977:48;;;-1:-1:-1;;15021:1:1;15003:16;;14996:27;14773:258::o;15036:383::-;15185:2;15174:9;15167:21;15148:4;15217:6;15211:13;15260:6;15255:2;15244:9;15240:18;15233:34;15276:66;15335:6;15330:2;15319:9;15315:18;15310:2;15302:6;15298:15;15276:66;:::i;:::-;15403:2;15382:15;-1:-1:-1;;15378:29:1;15363:45;;;;15410:2;15359:54;;15036:383;-1:-1:-1;;15036:383:1:o;16189:274::-;16318:3;16356:6;16350:13;16372:53;16418:6;16413:3;16406:4;16398:6;16394:17;16372:53;:::i;:::-;16441:16;;;;;16189:274;-1:-1:-1;;16189:274:1:o

Swarm Source

ipfs://140472603efdbf4df863aa939776e18f31e9c45290876da4bc0519d8291be825

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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