ETH Price: $3,629.78 (+1.26%)
Gas: 5.95 Gwei

Token

ERC-20: Maximus Decimus (DECI)
 

Overview

Max Total Supply

565,991,987.72947111 DECI

Holders

2,116

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 8 Decimals)

Balance
0.05751184 DECI

Value
$0.00
0xD71d7c18C670c69294dc32560057f0009B8Df7Cf
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xe9f84d41...C2C3504e0
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PerpetualPool

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 201 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-09-05
*/

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// 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 v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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/utils/Context.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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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


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

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

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

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

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

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

// File: @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: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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


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

pragma solidity ^0.8.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        unchecked {
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }
}

// File: contracts/PerpetualPool.sol

//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.2;








contract HedronToken {
  function approve(address spender, uint256 amount) external returns (bool) {}
  function transfer(address recipient, uint256 amount) external returns (bool) {}
  function mintNative(uint256 stakeIndex, uint40 stakeId) external returns (uint256) {}
  function claimNative(uint256 stakeIndex, uint40 stakeId) external returns (uint256) {}
  function currentDay() external view returns (uint256) {}
}

contract HEXToken {
  function currentDay() external view returns (uint256){}
  function stakeStart(uint256 newStakedHearts, uint256 newStakedDays) external {}
  function approve(address spender, uint256 amount) external returns (bool) {}
  function transfer(address recipient, uint256 amount) public returns (bool) {}
  function stakeEnd(uint256 stakeIndex, uint40 stakeIdParam) public {}
  function stakeCount(address stakerAddr) external view returns (uint256) {}
}
/*
 /$$      /$$                     /$$                                         /$$$$$$$$ /$$$$$$$$  /$$$$$$  /$$      /$$
| $$$    /$$$                    |__/                                        |__  $$__/| $$_____/ /$$__  $$| $$$    /$$$
| $$$$  /$$$$  /$$$$$$  /$$   /$$ /$$ /$$$$$$/$$$$  /$$   /$$  /$$$$$$$         | $$   | $$      | $$  \ $$| $$$$  /$$$$
| $$ $$/$$ $$ |____  $$|  $$ /$$/| $$| $$_  $$_  $$| $$  | $$ /$$_____/         | $$   | $$$$$   | $$$$$$$$| $$ $$/$$ $$
| $$  $$$| $$  /$$$$$$$ \  $$$$/ | $$| $$ \ $$ \ $$| $$  | $$|  $$$$$$          | $$   | $$__/   | $$__  $$| $$  $$$| $$
| $$\  $ | $$ /$$__  $$  >$$  $$ | $$| $$ | $$ | $$| $$  | $$ \____  $$         | $$   | $$      | $$  | $$| $$\  $ | $$
| $$ \/  | $$|  $$$$$$$ /$$/\  $$| $$| $$ | $$ | $$|  $$$$$$/ /$$$$$$$/         | $$   | $$$$$$$$| $$  | $$| $$ \/  | $$
|__/     |__/ \_______/|__/  \__/|__/|__/ |__/ |__/ \______/ |_______/          |__/   |________/|__/  |__/|__/     |__/
                                                                                                                        
                                                                                                                        
                                                                                                                        
                           /$$         /$$     /$$                                                                      
                          | $$        | $$    | $$                                                                      
  /$$$$$$  /$$$$$$$   /$$$$$$$       /$$$$$$  | $$$$$$$   /$$$$$$                                                       
 |____  $$| $$__  $$ /$$__  $$      |_  $$_/  | $$__  $$ /$$__  $$                                                      
  /$$$$$$$| $$  \ $$| $$  | $$        | $$    | $$  \ $$| $$$$$$$$                                                      
 /$$__  $$| $$  | $$| $$  | $$        | $$ /$$| $$  | $$| $$_____/                                                      
|  $$$$$$$| $$  | $$|  $$$$$$$        |  $$$$/| $$  | $$|  $$$$$$$                                                      
 \_______/|__/  |__/ \_______/         \___/  |__/  |__/ \_______/                                                      
                                                                                                                        
                                                                                                                        
                                                                                                                        
 /$$$$$$$                                           /$$                         /$$                                     
| $$__  $$                                         | $$                        | $$                                     
| $$  \ $$ /$$$$$$   /$$$$$$   /$$$$$$   /$$$$$$  /$$$$$$   /$$   /$$  /$$$$$$ | $$  /$$$$$$$                           
| $$$$$$$//$$__  $$ /$$__  $$ /$$__  $$ /$$__  $$|_  $$_/  | $$  | $$ |____  $$| $$ /$$_____/                           
| $$____/| $$$$$$$$| $$  \__/| $$  \ $$| $$$$$$$$  | $$    | $$  | $$  /$$$$$$$| $$|  $$$$$$                            
| $$     | $$_____/| $$      | $$  | $$| $$_____/  | $$ /$$| $$  | $$ /$$__  $$| $$ \____  $$                           
| $$     |  $$$$$$$| $$      | $$$$$$$/|  $$$$$$$  |  $$$$/|  $$$$$$/|  $$$$$$$| $$ /$$$$$$$/                           
|__/      \_______/|__/      | $$____/  \_______/   \___/   \______/  \_______/|__/|_______/                            
                             | $$                                                                                       
                             | $$                                                                                       
                             |__/                                                                                      


// Anyone may choose to mint 1 Perpetual Pool Token per HEX pledged to the Perpetual Pool Contract during the minting phase.
// Pool Tokens are a standard ERC20 token, only minted upon HEX deposit and burnt upon HEX redemption with no pre-mine.
// Pool Token holders may choose to burn their Pool Tokens to redeem HEX principal and yield pro-rata from the Pool Token Contract Address during the reload phase.
// The Perpetual Pools start with an initial minting phase, followed by a stake phase. Then once the HEX stake has ended they enter a reload phase where HEX may be redeemed with Pool Tokens or Pool Tokens may be minted with HEX - all at the same redemption rate.
// Then after the reload phase ends another Stake Phase begins and the cycle repeats forever.


// PHASES:        |----- Minting Phase ----|------ Stake Phase -----...-----|---- Reload Phase ----->|----- Stake Phase ------|----> REPEAT FOREVER
// WHAT HAPPENS?  |       Mint and redeem  |    No Minting or Redeeming     |   Mint and redeem      | No Minting or Redeeming|---->
// FUNCTIONS USED:| pledgeHEX(),redeemHEX()|      mintHedron()              | pledgeHEX(),redeemHEX()|      mintHedron().     |
// TRANSITION FUNCTION:       stakeStart() ^                  endStakeHex() ^           stakeStart() ^          endStakeHex() ^ 

// The Pool Contracts send half of it's Bigger Pays Better Bonus HEX Yield and all of the HDRN the stake accumulated to the Maximus TEAM Contract as a thank you for deploying the pools and an incentive to grow the stake pooling economy.



THE PERPETUAL POOLS CONTRACTS, SUPPORTING WEBSITES, AND ALL OTHER INTERFACES (THE SOFTWARE) IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

BY INTERACTING WITH THE SOFTWARE YOU ARE ASSERTING THAT YOU BEAR ALL THE RISKS ASSOCIATED WITH DOING SO. AN INFINITE NUMBER OF UNPREDICTABLE THINGS MAY GO WRONG WHICH COULD POTENTIALLY RESULT IN CRITICAL FAILURE AND FINANCIAL LOSS. BY INTERACTING WITH THE SOFTWARE YOU ARE ASSERTING THAT YOU AGREE THERE IS NO RECOURSE AVAILABLE AND YOU WILL NOT SEEK IT.

INTERACTING WITH THE SOFTWARE SHALL NOT BE CONSIDERED AN INVESTMENT OR A COMMON ENTERPRISE. INSTEAD, INTERACTING WITH THE SOFTWARE IS EQUIVALENT TO CARPOOLING WITH FRIENDS TO SAVE ON GAS AND EXPERIENCE THE BENEFITS OF THE H.O.V. LANE. 

YOU SHALL HAVE NO EXPECTATION OF PROFIT OR ANY TYPE OF GAIN FROM THE WORK OF OTHER PEOPLE.

*/


contract PerpetualPool is ERC20, ERC20Burnable, ReentrancyGuard {
    // all days are measured in terms of the HEX contract day number
    uint256 public RELOAD_PHASE_DURATION; // How many days are between each stake
    uint256 public RELOAD_PHASE_START; // the day when the current reload phase starts, is updated as each stake ends
    uint256 public RELOAD_PHASE_END; // the day when the current reload phase ends, is updated as each stake ends
    uint256 public STAKE_START_DAY; // the day when the current stake starts, is updated as each stake starts
    uint256 public STAKE_END_DAY; // the day when the current stake ends, is updated as each stake starts
    uint256 public STAKE_LENGTH; // length of the stake
    uint256 public HEX_REDEMPTION_RATE; // Number of HEX units redeemable per Perpetual Pool Token and the number of HEX required to mint a new Perpetual Pool Token after a stake ends
    bool public STAKE_IS_ACTIVE; // Used to keep track of whether or not the HEX stake is active. Is TRUE during stake phases and FALSE during reload ohases
    address public END_STAKER; // Address who paid the gas to end the stake
    address public TEAM_CONTRACT_ADDRESS;
    uint256 public CURRENT_STAKE_PRINCIPAL; // Principal of current stake, updated whenever a stake starts and reset to zero when a stake ends.
    uint256 public CURRENT_PERIOD; // even numbers are Reload Period, odd numbers are staking periods.

    
    constructor(uint256 initial_mint_duration, uint256 stake_duration, uint256 reload_duration,address team_address, string memory name, string memory ticker) ERC20(name, ticker) ReentrancyGuard() {
        RELOAD_PHASE_DURATION=reload_duration;
        uint256 start_day=hex_token.currentDay();
        RELOAD_PHASE_START = start_day;
        RELOAD_PHASE_END = start_day+initial_mint_duration; // The initial RELOAD PHASE may be set to be different than the ongoing reload phases.
        STAKE_LENGTH=stake_duration; 
        STAKE_IS_ACTIVE=false;
        TEAM_CONTRACT_ADDRESS=team_address;
        HEX_REDEMPTION_RATE=100000000; // HEX and MINI are 1:1 convertible during first minting/redemption phase. Then this will scale based on treasury value.
        CURRENT_STAKE_PRINCIPAL=0;
        CURRENT_PERIOD=0;
    }
    
    address POOL_ADDRESS =address(this);
    address constant HEX_ADDRESS = 0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39; // "2b, 5 9 1e? that is the question..."
    address constant HEDRON_ADDRESS=0x3819f64f282bf135d62168C1e513280dAF905e06; 

    IERC20 hex_contract = IERC20(HEX_ADDRESS);
    IERC20 hedron_contract=IERC20(HEDRON_ADDRESS);
    HEXToken hex_token = HEXToken(HEX_ADDRESS);
    HedronToken hedron_token = HedronToken(HEDRON_ADDRESS);
    
    /**
    * @dev View number of decimal places the Pool Token is divisible to. Manually overwritten from default 18 to 8 to match that of HEX. 1 Pool Token = 10^8 mini
    */
    function decimals() public view virtual override returns (uint8) {return 8;}

    /**
    * @dev Returns the current Period. Even numbers are Reload Phases, Odd numbers are staking phases."
    * @return Current Period
    */
    function getCurrentPeriod() external view returns (uint256){
        return CURRENT_PERIOD;
    }
    // @dev Returns the current day from the hex contract.
    function getHexDay() external view returns (uint256){
        uint256 day = hex_token.currentDay();
        return day;
    }

     /**
    * @dev Returns the address of the person who ends stake. May be used by external gas pooling contracts. If stake has not been ended yet will return 0x000...000"
    * @return end_staker_address This person should be honored and celebrated as a hero.
    */
    function getEndStaker() external view returns (address end_staker_address) {return END_STAKER;}

    // Pool Token Issuance and Redemption Functions
    /**
     * @dev Mints Pool Token.
     * @param amount of Pool Tokens to mint, measured in minis
     */
    function mint(uint256 amount) private {
        _mint(msg.sender, amount);
    }
     /**
     * @dev Ensures that Pool Token Minting Phase is ongoing and that the user has allowed the Perpetual Pool Contract address to spend the amount of HEX the user intends to pledge to The Perpetual Pool. Then sends the designated HEX from the user to the Perpetual Pool Contract address and mints 1 Pool Token per HEX pledged.
     * @param amount of HEX user chose to pledge, measured in hearts
     */
    function pledgeHEX(uint256 amount) nonReentrant external {
        require(STAKE_IS_ACTIVE==false, "Minting may only be done if a stake is not active");
        require(hex_token.currentDay()<=RELOAD_PHASE_END, "Minting Phase is Done");
        require(hex_contract.allowance(msg.sender, POOL_ADDRESS)>=amount, "Please approve contract address as allowed spender in the hex contract.");
        address from = msg.sender;
        hex_contract.transferFrom(from, POOL_ADDRESS, amount);
        uint256 mintable_amount = (10**8)*amount/HEX_REDEMPTION_RATE;
        mint(mintable_amount);
    }
     /**
     * @dev Ensures that it is currently a redemption period (before stake starts or after stake ends) and that the user has at least the number of Pool Tokens they entered. Then it calculates how much hex may be redeemed, burns the Pool Token, and transfers them the hex.
     * @param amount number of Pool Tokens that the user is redeeming, measured in mini
     */
    function redeemHEX(uint256 amount) nonReentrant external {
        require(STAKE_IS_ACTIVE==false, "Redemption can not happen while stake is active");
        uint256 your_balance = balanceOf(msg.sender);
        require(your_balance>=amount, "You do not have that much of the Pool Token.");
        uint256 raw_redeemable_amount = amount*HEX_REDEMPTION_RATE;
        uint256 redeemable_amount = raw_redeemable_amount/(10**8); //scaled back down to handle integer rounding
        burn(amount);
        hex_token.transfer(msg.sender, redeemable_amount);
        
    }
    //Staking Functions
    // Anyone may run these functions during the allowed time, so long as they pay the gas.
    // While nothing is forcing you to, gracious Perpetual Pool members will tip the sender some ETH for paying gas to end your stake.

    /**
     * @dev Ensures that the stake has not started yet and that the minting phase is over. Then it stakes all the hex in the contract and schedules the STAKE_END_DAY.
     * @notice This will trigger the start of the HEX stake. If you run this, you will pay the gas on behalf of the contract and you should not expect reimbursement.
     
     */
    function stakeHEX() nonReentrant external {
        require(STAKE_IS_ACTIVE==false, "Stake has already started.");
        uint256 current_day = hex_token.currentDay();
        require(current_day>RELOAD_PHASE_END, "Minting Phase is still ongoing - see RELOAD_PHASE_END day.");
        uint256 amount = hex_contract.balanceOf(address(this));
        _stakeHEX(amount);
        CURRENT_STAKE_PRINCIPAL=amount;
        STAKE_START_DAY=current_day;
        STAKE_END_DAY=current_day+STAKE_LENGTH;
        STAKE_IS_ACTIVE=true;
        CURRENT_PERIOD = CURRENT_PERIOD+1;
    }
    function _stakeHEX(uint256 amount) private  {
        hex_token.stakeStart(amount,STAKE_LENGTH);
        }
    
    function _endStakeHEX(uint256 stakeIndex,uint40 stakeIdParam ) private  {
        hex_token.stakeEnd(stakeIndex, stakeIdParam);
        }
    /**
     * @dev Ensures that the stake is fully complete and that it has not already been ended. Then it ends the hex stake and updates the redemption rate.
     * @notice This will trigger the ending of the HEX stake and calculate the new redemption rate. This may be very expensive. If you run this, you will pay the gas on behalf of the contract and you should not expect reimbursement.
     * @param stakeIndex index of stake found in stakeLists[contract_address] in hex contract.
     * @param stakeIdParam stake identifier found in stakeLists[contract_address] in hex contract.
     */
    function endStakeHEX(uint256 stakeIndex,uint40 stakeIdParam ) nonReentrant external {
        require(hex_token.currentDay()>STAKE_END_DAY, "Stake is not complete yet.");
        require(STAKE_IS_ACTIVE==true, "Stake must be active.");
        _endStakeHEX(stakeIndex, stakeIdParam);
        uint256 hex_balance = hex_contract.balanceOf(address(this));
        uint256 bpb_bonus_sharing_amount = get_bonus_sharing_amount(CURRENT_STAKE_PRINCIPAL, hex_balance,STAKE_LENGTH);
        hex_token.transfer(TEAM_CONTRACT_ADDRESS, bpb_bonus_sharing_amount);
        hedron_token.transfer(TEAM_CONTRACT_ADDRESS,hedron_contract.balanceOf(address(this)));
        uint256 total_supply = IERC20(address(this)).totalSupply();
        HEX_REDEMPTION_RATE  = calculate_redemption_rate(hex_contract.balanceOf(address(this)), total_supply);
        END_STAKER=msg.sender;
        CURRENT_STAKE_PRINCIPAL=0;
        STAKE_IS_ACTIVE=false;
        RELOAD_PHASE_START=hex_token.currentDay();
        RELOAD_PHASE_END=RELOAD_PHASE_START+RELOAD_PHASE_DURATION;
        CURRENT_PERIOD = CURRENT_PERIOD+1;
         
        
    }

    //@dev This calculates the amount of HEX to send to the Maximus TEAM Contract. See HEX Staking Bonuses for Details about BPB and LPB Bonuses
    function get_bonus_sharing_amount(uint256 principal,uint256 end_value, uint256 stake_length) private pure returns(uint256) {
        
        
        uint256 bpb_effective_hex;
        
        uint256 bpb_threshold = 150000000*(10**8);
        if (principal>bpb_threshold) {
            bpb_effective_hex = principal/10;
        }
        else {
            uint256 scaled_bpb_multiplier = (((10**8)*(principal))/(10*bpb_threshold));
            bpb_effective_hex = principal * (scaled_bpb_multiplier)/(10**8);
        }   
        uint256 lpb_effective_hex;
        uint256 scaled_lpb_multiplier;
        uint256 lpb_threshold = 3650;
        if (stake_length>lpb_threshold) {
            scaled_lpb_multiplier = 2*(10**8);
        }
        else {
            scaled_lpb_multiplier = 2*((10**8)*(stake_length))/lpb_threshold;
            
        }   
        lpb_effective_hex = principal * (scaled_lpb_multiplier)/(10**8);
        uint256 scalar = 10**8;
        uint256 earnings = end_value-principal;
        uint256 bpb_makeup_scaled = (scalar * bpb_effective_hex)/(bpb_effective_hex+principal+lpb_effective_hex);
        uint256 bpb_earnings_scaled = earnings *bpb_makeup_scaled;
        uint256 bpb_earnings = bpb_earnings_scaled/scalar;
        return bpb_earnings/2;

    }
    /**
     * @dev Calculates the pro-rata redemption rate of any coin per Pool Token. Scales value by 10^8 to handle integer rounding.
     * @param treasury_balance The balance of coins in contract address (either HEX or HEDRON)
     * @param token_supply total Pool Token supply
     * @return redemption_rate Number of units redeemable per 10^8 decimal units of Pool Tokens. Is scaled back down by 10^8 on redemption transaction.
     */
    function calculate_redemption_rate(uint treasury_balance, uint token_supply) private pure returns (uint redemption_rate) {
        uint256 scalar = 10**8;
        uint256 scaled = (treasury_balance * scalar) / token_supply; // scale value to calculate redemption amount per Pool Token and then divide by same scalar after multiplication
        return scaled;
    }
    
    /**
     * @dev Public function which calls the private function which is used for minting available HDRN accumulated by the contract stake. 
     * @notice This will trigger the minting of the mintable Hedron earned by the stake. If you run this, you will pay the gas on behalf of the contract and you should not expect reimbursement. If check to make sure this has not been run yet already or the transaction will fail.
     * @param stakeIndex index of stake found in stakeLists[contract_address] in hex contract.
     * @param stakeId stake identifier found in stakeLists[contract_address] in hex contract.
     */
  function mintHedron(uint256 stakeIndex,uint40 stakeId ) external  {
      _mintHedron(stakeIndex, stakeId);
        }
   /**
     * @dev Private function used for minting available HDRN accumulated by the contract stake.
     * @param stakeIndex index of stake found in stakeLists[contract_address] in hex contract.
     * @param stakeId stake identifier found in stakeLists[contract_address] in hex contract.
     */
  function _mintHedron(uint256 stakeIndex,uint40 stakeId ) private  {
        hedron_token.mintNative(stakeIndex, stakeId);
        }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"initial_mint_duration","type":"uint256"},{"internalType":"uint256","name":"stake_duration","type":"uint256"},{"internalType":"uint256","name":"reload_duration","type":"uint256"},{"internalType":"address","name":"team_address","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CURRENT_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CURRENT_STAKE_PRINCIPAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"END_STAKER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HEX_REDEMPTION_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELOAD_PHASE_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELOAD_PHASE_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELOAD_PHASE_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKE_END_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKE_IS_ACTIVE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKE_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKE_START_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_CONTRACT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeIndex","type":"uint256"},{"internalType":"uint40","name":"stakeIdParam","type":"uint40"}],"name":"endStakeHEX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEndStaker","outputs":[{"internalType":"address","name":"end_staker_address","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHexDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeIndex","type":"uint256"},{"internalType":"uint40","name":"stakeId","type":"uint40"}],"name":"mintHedron","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pledgeHEX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemHEX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeHEX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

6080604052601180546001600160a01b03199081163017909155601280548216732b591e99afe9f32eaa6214f7b7629768c40eeb39908117909155601380548316733819f64f282bf135d62168c1e513280daf905e06908117909155601480548416909217909155601580549092161790553480156200007e57600080fd5b50604051620022d0380380620022d0833981016040819052620000a19162000265565b81816003620000b183826200039c565b506004620000c082826200039c565b5050600160055550600684905560145460408051635c9302c960e01b815290516000926001600160a01b031691635c9302c99160048083019260209291908290030181865afa15801562000118573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013e919062000468565b6007819055905062000151878262000482565b600855505050600b9290925550600d805460ff19169055600e80546001600160a01b0319166001600160a01b03909216919091179055506305f5e100600c556000600f819055601055620004aa565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001c857600080fd5b81516001600160401b0380821115620001e557620001e5620001a0565b604051601f8301601f19908116603f01168101908282118183101715620002105762000210620001a0565b816040528381526020925086838588010111156200022d57600080fd5b600091505b8382101562000251578582018301518183018401529082019062000232565b600093810190920192909252949350505050565b60008060008060008060c087890312156200027f57600080fd5b86516020880151604089015160608a015192985090965094506001600160a01b0381168114620002ae57600080fd5b60808801519093506001600160401b0380821115620002cc57600080fd5b620002da8a838b01620001b6565b935060a0890151915080821115620002f157600080fd5b506200030089828a01620001b6565b9150509295509295509295565b600181811c908216806200032257607f821691505b6020821081036200034357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039757600081815260208120601f850160051c81016020861015620003725750805b601f850160051c820191505b8181101562000393578281556001016200037e565b5050505b505050565b81516001600160401b03811115620003b857620003b8620001a0565b620003d081620003c984546200030d565b8462000349565b602080601f831160018114620004085760008415620003ef5750858301515b600019600386901b1c1916600185901b17855562000393565b600085815260208120601f198616915b82811015620004395788860151825594840194600190910190840162000418565b5085821015620004585787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200047b57600080fd5b5051919050565b80820180821115620004a457634e487b7160e01b600052601160045260246000fd5b92915050565b611e1680620004ba6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636a63ef6e1161011a578063a9059cbb116100ad578063ba777bcc1161007c578063ba777bcc146103f1578063ccaa408f146103f9578063dd62ed3e14610402578063e7644fb91461043b578063fecf706e1461044e57600080fd5b8063a9059cbb146103bf578063b2d2997a146103d2578063b4a2bc0e146103db578063b7241ba5146103e457600080fd5b80638d2fe35d116100e95780638d2fe35d146103795780638dff901b1461038c57806395d89b41146103a4578063a457c2d7146103ac57600080fd5b80636a63ef6e1461032157806370a082311461032a57806379cc6790146103535780638412d89b1461036657600080fd5b806323b872dd1161019257806342966c681161016157806342966c68146102dd5780634537523c146102f25780634953a509146103055780634e67581e1461031857600080fd5b806323b872dd1461029f578063313ce567146102b257806339509351146102c15780633d720dda146102d457600080fd5b806318160ddd116101ce57806318160ddd1461027d57806318edf0dd146102855780631d92803d1461028d5780631fa0bb3d1461029657600080fd5b806306fdde0314610200578063086146d21461021e578063095ea7b3146102305780630a19d93314610253575b600080fd5b610208610457565b6040516102159190611b3f565b60405180910390f35b6010545b604051908152602001610215565b61024361023e366004611ba9565b6104e9565b6040519015158152602001610215565b600d5461010090046001600160a01b03165b6040516001600160a01b039091168152602001610215565b600254610222565b610222610500565b61022260085481565b61022260105481565b6102436102ad366004611bd3565b61057a565b60405160088152602001610215565b6102436102cf366004611ba9565b610629565b610222600a5481565b6102f06102eb366004611c0f565b610665565b005b6102f0610300366004611c0f565b610672565b6102f0610313366004611c28565b61097c565b61022260065481565b610222600c5481565b610222610338366004611c62565b6001600160a01b031660009081526020819052604090205490565b6102f0610361366004611ba9565b610e41565b6102f0610374366004611c28565b610ec7565b600e54610265906001600160a01b031681565b600d546102659061010090046001600160a01b031681565b610208610ed5565b6102436103ba366004611ba9565b610ee4565b6102436103cd366004611ba9565b610f7d565b61022260075481565b610222600b5481565b600d546102439060ff1681565b6102f0610f8a565b610222600f5481565b610222610410366004611c84565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102f0610449366004611c0f565b6111a5565b61022260095481565b60606003805461046690611cb7565b80601f016020809104026020016040519081016040528092919081815260200182805461049290611cb7565b80156104df5780601f106104b4576101008083540402835291602001916104df565b820191906000526020600020905b8154815290600101906020018083116104c257829003601f168201915b5050505050905090565b60006104f633848461135a565b5060015b92915050565b600080601460009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610556573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fa9190611cf1565b600061058784848461147e565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156106115760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61061e853385840361135a565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104f6918590610660908690611d20565b61135a565b61066f338261164d565b50565b6002600554036106945760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156107065760405162461bcd60e51b815260206004820152603160248201527f4d696e74696e67206d6179206f6e6c7920626520646f6e652069662061207374604482015270616b65206973206e6f742061637469766560781b6064820152608401610608565b600854601460009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561075c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107809190611cf1565b11156107c65760405162461bcd60e51b81526020600482015260156024820152744d696e74696e6720506861736520697320446f6e6560581b6044820152606401610608565b601254601154604051636eb1769f60e11b81523360048201526001600160a01b0391821660248201528392919091169063dd62ed3e90604401602060405180830381865afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190611cf1565b10156108c45760405162461bcd60e51b815260206004820152604760248201527f506c6561736520617070726f766520636f6e747261637420616464726573732060448201527f617320616c6c6f776564207370656e64657220696e207468652068657820636f606482015266373a3930b1ba1760c91b608482015260a401610608565b6012546011546040516323b872dd60e01b815233600482018190526001600160a01b039283166024830152604482018590529291909116906323b872dd906064016020604051808303816000875af1158015610924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109489190611d6a565b50600c5460009061095d846305f5e100611d8c565b6109679190611dab565b90506109728161179b565b5050600160055550565b60026005540361099e5760405162461bcd60e51b815260040161060890611d33565b6002600555600a5460145460408051635c9302c960e01b815290516001600160a01b0390921691635c9302c9916004808201926020929091908290030181865afa1580156109f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190611cf1565b11610a615760405162461bcd60e51b815260206004820152601a60248201527f5374616b65206973206e6f7420636f6d706c657465207965742e0000000000006044820152606401610608565b600d5460ff161515600114610ab05760405162461bcd60e51b815260206004820152601560248201527429ba30b5b29036bab9ba1031329030b1ba34bb329760591b6044820152606401610608565b610aba82826117a5565b6012546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b279190611cf1565b90506000610b3a600f5483600b54611814565b601454600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015610b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb59190611d6a565b50601554600e546013546040516370a0823160e01b81523060048201526001600160a01b039384169363a9059cbb9381169216906370a0823190602401602060405180830381865afa158015610c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c339190611cf1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190611d6a565b506000306001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d079190611cf1565b6012546040516370a0823160e01b8152306004820152919250610d80916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a9190611cf1565b82611952565b600c55600d80546000600f556001600160a81b031916336101000260ff191617905560145460408051635c9302c960e01b815290516001600160a01b0390921691635c9302c9916004808201926020929091908290030181865afa158015610dec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e109190611cf1565b6007819055600654610e2191611d20565b600855601054610e32906001611d20565b60105550506001600555505050565b6000610e4d8333610410565b905081811015610eab5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610608565b610eb8833384840361135a565b610ec2838361164d565b505050565b610ed18282611978565b5050565b60606004805461046690611cb7565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610f665760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610608565b610f73338585840361135a565b5060019392505050565b60006104f633848461147e565b600260055403610fac5760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156110045760405162461bcd60e51b815260206004820152601a60248201527f5374616b652068617320616c726561647920737461727465642e0000000000006044820152606401610608565b60145460408051635c9302c960e01b815290516000926001600160a01b031691635c9302c99160048083019260209291908290030181865afa15801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190611cf1565b905060085481116110eb5760405162461bcd60e51b815260206004820152603a60248201527f4d696e74696e67205068617365206973207374696c6c206f6e676f696e67202d60448201527f207365652052454c4f41445f50484153455f454e44206461792e0000000000006064820152608401610608565b6012546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111589190611cf1565b9050611163816119f4565b600f8190556009829055600b5461117a9083611d20565b600a55600d805460ff1916600190811790915560105461119991611d20565b60105550506001600555565b6002600554036111c75760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156112375760405162461bcd60e51b815260206004820152602f60248201527f526564656d7074696f6e2063616e206e6f742068617070656e207768696c652060448201526e7374616b652069732061637469766560881b6064820152608401610608565b33600090815260208190526040902054818110156112ac5760405162461bcd60e51b815260206004820152602c60248201527f596f7520646f206e6f7420686176652074686174206d756368206f662074686560448201526b102837b7b6102a37b5b2b71760a11b6064820152608401610608565b6000600c54836112bc9190611d8c565b905060006112ce6305f5e10083611dab565b90506112d984610665565b60145460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611d6a565b50506001600555505050565b6001600160a01b0383166113bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610608565b6001600160a01b03821661141d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610608565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114e25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610608565b6001600160a01b0382166115445760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610608565b6001600160a01b038316600090815260208190526040902054818110156115bc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610608565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115f3908490611d20565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163f91815260200190565b60405180910390a350505050565b6001600160a01b0382166116ad5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610608565b6001600160a01b038216600090815260208190526040902054818110156117215760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610608565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611750908490611dcd565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61066f3382611a60565b601454604051631a1804d160e11b81526004810184905264ffffffffff831660248201526001600160a01b039091169063343009a290604401600060405180830381600087803b1580156117f857600080fd5b505af115801561180c573d6000803e3d6000fd5b505050505050565b60008066354a6ba7a180008086111561183957611832600a87611dab565b915061187d565b600061184682600a611d8c565b611854886305f5e100611d8c565b61185e9190611dab565b90506305f5e10061186f8289611d8c565b6118799190611dab565b9250505b600080610e428087111561189757630bebc20091506118be565b806118a6886305f5e100611d8c565b6118b1906002611d8c565b6118bb9190611dab565b91505b6305f5e1006118cd838b611d8c565b6118d79190611dab565b92506305f5e10060006118ea8b8b611dcd565b90506000856118f98d8a611d20565b6119039190611d20565b61190d8985611d8c565b6119179190611dab565b905060006119258284611d8c565b905060006119338583611dab565b9050611940600282611dab565b9e9d5050505050505050505050505050565b60006305f5e10081836119658387611d8c565b61196f9190611dab565b95945050505050565b601554604051633e04ae6960e21b81526004810184905264ffffffffff831660248201526001600160a01b039091169063f812b9a4906044016020604051808303816000875af11580156119d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec29190611cf1565b601454600b54604051630a54871760e31b81526004810184905260248101919091526001600160a01b03909116906352a438b890604401600060405180830381600087803b158015611a4557600080fd5b505af1158015611a59573d6000803e3d6000fd5b5050505050565b6001600160a01b038216611ab65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610608565b8060026000828254611ac89190611d20565b90915550506001600160a01b03821660009081526020819052604081208054839290611af5908490611d20565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b81811015611b6c57858101830151858201604001528201611b50565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611ba457600080fd5b919050565b60008060408385031215611bbc57600080fd5b611bc583611b8d565b946020939093013593505050565b600080600060608486031215611be857600080fd5b611bf184611b8d565b9250611bff60208501611b8d565b9150604084013590509250925092565b600060208284031215611c2157600080fd5b5035919050565b60008060408385031215611c3b57600080fd5b82359150602083013564ffffffffff81168114611c5757600080fd5b809150509250929050565b600060208284031215611c7457600080fd5b611c7d82611b8d565b9392505050565b60008060408385031215611c9757600080fd5b611ca083611b8d565b9150611cae60208401611b8d565b90509250929050565b600181811c90821680611ccb57607f821691505b602082108103611ceb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611d0357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104fa576104fa611d0a565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060208284031215611d7c57600080fd5b81518015158114611c7d57600080fd5b6000816000190483118215151615611da657611da6611d0a565b500290565b600082611dc857634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156104fa576104fa611d0a56fea26469706673582212208cd7daa8d5b1cbe8387d850e90b145394dec9825d24bc295e71df6d2f631539264736f6c63430008100033000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000001710000000000000000000000000000000000000000000000000000000000000007000000000000000000000000b7c9e99da8a857ce576a830a9c19312114d9de0200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000c4d6178696d75732042617365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044241534500000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636a63ef6e1161011a578063a9059cbb116100ad578063ba777bcc1161007c578063ba777bcc146103f1578063ccaa408f146103f9578063dd62ed3e14610402578063e7644fb91461043b578063fecf706e1461044e57600080fd5b8063a9059cbb146103bf578063b2d2997a146103d2578063b4a2bc0e146103db578063b7241ba5146103e457600080fd5b80638d2fe35d116100e95780638d2fe35d146103795780638dff901b1461038c57806395d89b41146103a4578063a457c2d7146103ac57600080fd5b80636a63ef6e1461032157806370a082311461032a57806379cc6790146103535780638412d89b1461036657600080fd5b806323b872dd1161019257806342966c681161016157806342966c68146102dd5780634537523c146102f25780634953a509146103055780634e67581e1461031857600080fd5b806323b872dd1461029f578063313ce567146102b257806339509351146102c15780633d720dda146102d457600080fd5b806318160ddd116101ce57806318160ddd1461027d57806318edf0dd146102855780631d92803d1461028d5780631fa0bb3d1461029657600080fd5b806306fdde0314610200578063086146d21461021e578063095ea7b3146102305780630a19d93314610253575b600080fd5b610208610457565b6040516102159190611b3f565b60405180910390f35b6010545b604051908152602001610215565b61024361023e366004611ba9565b6104e9565b6040519015158152602001610215565b600d5461010090046001600160a01b03165b6040516001600160a01b039091168152602001610215565b600254610222565b610222610500565b61022260085481565b61022260105481565b6102436102ad366004611bd3565b61057a565b60405160088152602001610215565b6102436102cf366004611ba9565b610629565b610222600a5481565b6102f06102eb366004611c0f565b610665565b005b6102f0610300366004611c0f565b610672565b6102f0610313366004611c28565b61097c565b61022260065481565b610222600c5481565b610222610338366004611c62565b6001600160a01b031660009081526020819052604090205490565b6102f0610361366004611ba9565b610e41565b6102f0610374366004611c28565b610ec7565b600e54610265906001600160a01b031681565b600d546102659061010090046001600160a01b031681565b610208610ed5565b6102436103ba366004611ba9565b610ee4565b6102436103cd366004611ba9565b610f7d565b61022260075481565b610222600b5481565b600d546102439060ff1681565b6102f0610f8a565b610222600f5481565b610222610410366004611c84565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102f0610449366004611c0f565b6111a5565b61022260095481565b60606003805461046690611cb7565b80601f016020809104026020016040519081016040528092919081815260200182805461049290611cb7565b80156104df5780601f106104b4576101008083540402835291602001916104df565b820191906000526020600020905b8154815290600101906020018083116104c257829003601f168201915b5050505050905090565b60006104f633848461135a565b5060015b92915050565b600080601460009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610556573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fa9190611cf1565b600061058784848461147e565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156106115760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61061e853385840361135a565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104f6918590610660908690611d20565b61135a565b61066f338261164d565b50565b6002600554036106945760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156107065760405162461bcd60e51b815260206004820152603160248201527f4d696e74696e67206d6179206f6e6c7920626520646f6e652069662061207374604482015270616b65206973206e6f742061637469766560781b6064820152608401610608565b600854601460009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561075c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107809190611cf1565b11156107c65760405162461bcd60e51b81526020600482015260156024820152744d696e74696e6720506861736520697320446f6e6560581b6044820152606401610608565b601254601154604051636eb1769f60e11b81523360048201526001600160a01b0391821660248201528392919091169063dd62ed3e90604401602060405180830381865afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190611cf1565b10156108c45760405162461bcd60e51b815260206004820152604760248201527f506c6561736520617070726f766520636f6e747261637420616464726573732060448201527f617320616c6c6f776564207370656e64657220696e207468652068657820636f606482015266373a3930b1ba1760c91b608482015260a401610608565b6012546011546040516323b872dd60e01b815233600482018190526001600160a01b039283166024830152604482018590529291909116906323b872dd906064016020604051808303816000875af1158015610924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109489190611d6a565b50600c5460009061095d846305f5e100611d8c565b6109679190611dab565b90506109728161179b565b5050600160055550565b60026005540361099e5760405162461bcd60e51b815260040161060890611d33565b6002600555600a5460145460408051635c9302c960e01b815290516001600160a01b0390921691635c9302c9916004808201926020929091908290030181865afa1580156109f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190611cf1565b11610a615760405162461bcd60e51b815260206004820152601a60248201527f5374616b65206973206e6f7420636f6d706c657465207965742e0000000000006044820152606401610608565b600d5460ff161515600114610ab05760405162461bcd60e51b815260206004820152601560248201527429ba30b5b29036bab9ba1031329030b1ba34bb329760591b6044820152606401610608565b610aba82826117a5565b6012546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b279190611cf1565b90506000610b3a600f5483600b54611814565b601454600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015610b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb59190611d6a565b50601554600e546013546040516370a0823160e01b81523060048201526001600160a01b039384169363a9059cbb9381169216906370a0823190602401602060405180830381865afa158015610c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c339190611cf1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190611d6a565b506000306001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d079190611cf1565b6012546040516370a0823160e01b8152306004820152919250610d80916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a9190611cf1565b82611952565b600c55600d80546000600f556001600160a81b031916336101000260ff191617905560145460408051635c9302c960e01b815290516001600160a01b0390921691635c9302c9916004808201926020929091908290030181865afa158015610dec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e109190611cf1565b6007819055600654610e2191611d20565b600855601054610e32906001611d20565b60105550506001600555505050565b6000610e4d8333610410565b905081811015610eab5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610608565b610eb8833384840361135a565b610ec2838361164d565b505050565b610ed18282611978565b5050565b60606004805461046690611cb7565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610f665760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610608565b610f73338585840361135a565b5060019392505050565b60006104f633848461147e565b600260055403610fac5760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156110045760405162461bcd60e51b815260206004820152601a60248201527f5374616b652068617320616c726561647920737461727465642e0000000000006044820152606401610608565b60145460408051635c9302c960e01b815290516000926001600160a01b031691635c9302c99160048083019260209291908290030181865afa15801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190611cf1565b905060085481116110eb5760405162461bcd60e51b815260206004820152603a60248201527f4d696e74696e67205068617365206973207374696c6c206f6e676f696e67202d60448201527f207365652052454c4f41445f50484153455f454e44206461792e0000000000006064820152608401610608565b6012546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111589190611cf1565b9050611163816119f4565b600f8190556009829055600b5461117a9083611d20565b600a55600d805460ff1916600190811790915560105461119991611d20565b60105550506001600555565b6002600554036111c75760405162461bcd60e51b815260040161060890611d33565b6002600555600d5460ff16156112375760405162461bcd60e51b815260206004820152602f60248201527f526564656d7074696f6e2063616e206e6f742068617070656e207768696c652060448201526e7374616b652069732061637469766560881b6064820152608401610608565b33600090815260208190526040902054818110156112ac5760405162461bcd60e51b815260206004820152602c60248201527f596f7520646f206e6f7420686176652074686174206d756368206f662074686560448201526b102837b7b6102a37b5b2b71760a11b6064820152608401610608565b6000600c54836112bc9190611d8c565b905060006112ce6305f5e10083611dab565b90506112d984610665565b60145460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611d6a565b50506001600555505050565b6001600160a01b0383166113bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610608565b6001600160a01b03821661141d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610608565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114e25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610608565b6001600160a01b0382166115445760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610608565b6001600160a01b038316600090815260208190526040902054818110156115bc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610608565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115f3908490611d20565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163f91815260200190565b60405180910390a350505050565b6001600160a01b0382166116ad5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610608565b6001600160a01b038216600090815260208190526040902054818110156117215760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610608565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611750908490611dcd565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61066f3382611a60565b601454604051631a1804d160e11b81526004810184905264ffffffffff831660248201526001600160a01b039091169063343009a290604401600060405180830381600087803b1580156117f857600080fd5b505af115801561180c573d6000803e3d6000fd5b505050505050565b60008066354a6ba7a180008086111561183957611832600a87611dab565b915061187d565b600061184682600a611d8c565b611854886305f5e100611d8c565b61185e9190611dab565b90506305f5e10061186f8289611d8c565b6118799190611dab565b9250505b600080610e428087111561189757630bebc20091506118be565b806118a6886305f5e100611d8c565b6118b1906002611d8c565b6118bb9190611dab565b91505b6305f5e1006118cd838b611d8c565b6118d79190611dab565b92506305f5e10060006118ea8b8b611dcd565b90506000856118f98d8a611d20565b6119039190611d20565b61190d8985611d8c565b6119179190611dab565b905060006119258284611d8c565b905060006119338583611dab565b9050611940600282611dab565b9e9d5050505050505050505050505050565b60006305f5e10081836119658387611d8c565b61196f9190611dab565b95945050505050565b601554604051633e04ae6960e21b81526004810184905264ffffffffff831660248201526001600160a01b039091169063f812b9a4906044016020604051808303816000875af11580156119d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec29190611cf1565b601454600b54604051630a54871760e31b81526004810184905260248101919091526001600160a01b03909116906352a438b890604401600060405180830381600087803b158015611a4557600080fd5b505af1158015611a59573d6000803e3d6000fd5b5050505050565b6001600160a01b038216611ab65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610608565b8060026000828254611ac89190611d20565b90915550506001600160a01b03821660009081526020819052604081208054839290611af5908490611d20565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b81811015611b6c57858101830151858201604001528201611b50565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611ba457600080fd5b919050565b60008060408385031215611bbc57600080fd5b611bc583611b8d565b946020939093013593505050565b600080600060608486031215611be857600080fd5b611bf184611b8d565b9250611bff60208501611b8d565b9150604084013590509250925092565b600060208284031215611c2157600080fd5b5035919050565b60008060408385031215611c3b57600080fd5b82359150602083013564ffffffffff81168114611c5757600080fd5b809150509250929050565b600060208284031215611c7457600080fd5b611c7d82611b8d565b9392505050565b60008060408385031215611c9757600080fd5b611ca083611b8d565b9150611cae60208401611b8d565b90509250929050565b600181811c90821680611ccb57607f821691505b602082108103611ceb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611d0357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104fa576104fa611d0a565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060208284031215611d7c57600080fd5b81518015158114611c7d57600080fd5b6000816000190483118215151615611da657611da6611d0a565b500290565b600082611dc857634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156104fa576104fa611d0a56fea26469706673582212208cd7daa8d5b1cbe8387d850e90b145394dec9825d24bc295e71df6d2f631539264736f6c63430008100033

Deployed Bytecode Sourcemap

47791:12786:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28585:100;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;50964:99;51041:14;;50964:99;;;713:25:1;;;701:2;686:18;50964:99:0;567:177:1;30752:169:0;;;;;;:::i;:::-;;:::i;:::-;;;1351:14:1;;1344:22;1326:41;;1314:2;1299:18;30752:169:0;1186:187:1;51539:95:0;51622:10;;;;;-1:-1:-1;;;;;51622:10:0;51539:95;;;-1:-1:-1;;;;;1542:32:1;;;1524:51;;1512:2;1497:18;51539:95:0;1378:203:1;29705:108:0;29793:12;;29705:108;;51129:128;;;:::i;48134:31::-;;;;;;49132:29;;;;;;31403:492;;;;;;:::i;:::-;;:::i;50728:76::-;;;50801:1;2061:36:1;;2049:2;2034:18;50728:76:0;1919:184:1;32304:215:0;;;;;;:::i;:::-;;:::i;48360:28::-;;;;;;39114:91;;;;;;:::i;:::-;;:::i;:::-;;52313:599;;;;;;:::i;:::-;;:::i;55955:1124::-;;;;;;:::i;:::-;;:::i;47932:36::-;;;;;;48524:34;;;;;;29876:127;;;;;;:::i;:::-;-1:-1:-1;;;;;29977:18:0;29950:7;29977:18;;;;;;;;;;;;29876:127;39524:368;;;;;;:::i;:::-;;:::i;60013:119::-;;;;;;:::i;:::-;;:::i;48944:36::-;;;;;-1:-1:-1;;;;;48944:36:0;;;48867:25;;;;;;;;-1:-1:-1;;;;;48867:25:0;;;28804:104;;;:::i;33022:413::-;;;;;;:::i;:::-;;:::i;30216:175::-;;;;;;:::i;:::-;;:::i;48015:33::-;;;;;;48467:27;;;;;;48709;;;;;;;;;54499:583;;;:::i;48987:38::-;;;;;;30454:151;;;;;;:::i;:::-;-1:-1:-1;;;;;30570:18:0;;;30543:7;30570:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;30454:151;53300:577;;;;;;:::i;:::-;;:::i;48249:30::-;;;;;;28585:100;28639:13;28672:5;28665:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28585:100;:::o;30752:169::-;30835:4;30852:39;18696:10;30875:7;30884:6;30852:8;:39::i;:::-;-1:-1:-1;30909:4:0;30752:169;;;;;:::o;51129:128::-;51173:7;51192:11;51206:9;;;;;;;;;-1:-1:-1;;;;;51206:9:0;-1:-1:-1;;;;;51206:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;31403:492::-;31543:4;31560:36;31570:6;31578:9;31589:6;31560:9;:36::i;:::-;-1:-1:-1;;;;;31636:19:0;;31609:24;31636:19;;;:11;:19;;;;;;;;18696:10;31636:33;;;;;;;;31688:26;;;;31680:79;;;;-1:-1:-1;;;31680:79:0;;3876:2:1;31680:79:0;;;3858:21:1;3915:2;3895:18;;;3888:30;3954:34;3934:18;;;3927:62;-1:-1:-1;;;4005:18:1;;;3998:38;4053:19;;31680:79:0;;;;;;;;;31795:57;31804:6;18696:10;31845:6;31826:16;:25;31795:8;:57::i;:::-;-1:-1:-1;31883:4:0;;31403:492;-1:-1:-1;;;;31403:492:0:o;32304:215::-;18696:10;32392:4;32441:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;32441:34:0;;;;;;;;;;32392:4;;32409:80;;32432:7;;32441:47;;32478:10;;32441:47;:::i;:::-;32409:8;:80::i;39114:91::-;39170:27;18696:10;39190:6;39170:5;:27::i;:::-;39114:91;:::o;52313:599::-;1812:1;2410:7;;:19;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;52389:15:::1;::::0;::::1;;:22;52381:84;;;::::0;-1:-1:-1;;;52381:84:0;;4907:2:1;52381:84:0::1;::::0;::::1;4889:21:1::0;4946:2;4926:18;;;4919:30;4985:34;4965:18;;;4958:62;-1:-1:-1;;;5036:18:1;;;5029:47;5093:19;;52381:84:0::1;4705:413:1::0;52381:84:0::1;52508:16;;52484:9;;;;;;;;;-1:-1:-1::0;;;;;52484:9:0::1;-1:-1:-1::0;;;;;52484:20:0::1;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;52476:74;;;::::0;-1:-1:-1;;;52476:74:0;;5325:2:1;52476:74:0::1;::::0;::::1;5307:21:1::0;5364:2;5344:18;;;5337:30;-1:-1:-1;;;5383:18:1;;;5376:51;5444:18;;52476:74:0::1;5123:345:1::0;52476:74:0::1;52569:12;::::0;52604::::1;::::0;52569:48:::1;::::0;-1:-1:-1;;;52569:48:0;;52592:10:::1;52569:48;::::0;::::1;5685:34:1::0;-1:-1:-1;;;;;52604:12:0;;::::1;5735:18:1::0;;;5728:43;52619:6:0;;52569:12;;;::::1;::::0;:22:::1;::::0;5620:18:1;;52569:48:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:56;;52561:140;;;::::0;-1:-1:-1;;;52561:140:0;;5984:2:1;52561:140:0::1;::::0;::::1;5966:21:1::0;6023:2;6003:18;;;5996:30;6062:34;6042:18;;;6035:62;6133:34;6113:18;;;6106:62;-1:-1:-1;;;6184:19:1;;;6177:38;6232:19;;52561:140:0::1;5782:475:1::0;52561:140:0::1;52748:12;::::0;52780::::1;::::0;52748:53:::1;::::0;-1:-1:-1;;;52748:53:0;;52727:10:::1;52748:53;::::0;::::1;6502:34:1::0;;;-1:-1:-1;;;;;52780:12:0;;::::1;6552:18:1::0;;;6545:43;6604:18;;;6597:34;;;52727:10:0;52748:12;;;::::1;::::0;:25:::1;::::0;6437:18:1;;52748:53:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;52853:19:0::1;::::0;52812:23:::1;::::0;52838:14:::1;52846:6:::0;52839:5:::1;52838:14;:::i;:::-;:34;;;;:::i;:::-;52812:60;;52883:21;52888:15;52883:4;:21::i;:::-;-1:-1:-1::0;;1768:1:0;2722:7;:22;-1:-1:-1;52313:599:0:o;55955:1124::-;1812:1;2410:7;;:19;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;56081:13:::1;::::0;56058:9:::1;::::0;:22:::1;::::0;;-1:-1:-1;;;56058:22:0;;;;-1:-1:-1;;;;;56058:9:0;;::::1;::::0;:20:::1;::::0;:22:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;:9;:22:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:36;56050:75;;;::::0;-1:-1:-1;;;56050:75:0;;7521:2:1;56050:75:0::1;::::0;::::1;7503:21:1::0;7560:2;7540:18;;;7533:30;7599:28;7579:18;;;7572:56;7645:18;;56050:75:0::1;7319:350:1::0;56050:75:0::1;56144:15;::::0;::::1;;:21;;:15:::0;:21:::1;56136:55;;;::::0;-1:-1:-1;;;56136:55:0;;7876:2:1;56136:55:0::1;::::0;::::1;7858:21:1::0;7915:2;7895:18;;;7888:30;-1:-1:-1;;;7934:18:1;;;7927:51;7995:18;;56136:55:0::1;7674:345:1::0;56136:55:0::1;56202:38;56215:10;56227:12;56202;:38::i;:::-;56273:12;::::0;:37:::1;::::0;-1:-1:-1;;;56273:37:0;;56304:4:::1;56273:37;::::0;::::1;1524:51:1::0;56251:19:0::1;::::0;-1:-1:-1;;;;;56273:12:0::1;::::0;:22:::1;::::0;1497:18:1;;56273:37:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56251:59;;56321:32;56356:75;56381:23;;56406:11;56418:12;;56356:24;:75::i;:::-;56442:9;::::0;56461:21:::1;::::0;56442:67:::1;::::0;-1:-1:-1;;;56442:67:0;;-1:-1:-1;;;;;56461:21:0;;::::1;56442:67;::::0;::::1;8198:51:1::0;8265:18;;;8258:34;;;56321:110:0;;-1:-1:-1;56442:9:0::1;::::0;:18:::1;::::0;8171::1;;56442:67:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;56520:12:0::1;::::0;56542:21:::1;::::0;56564:15:::1;::::0;:40:::1;::::0;-1:-1:-1;;;56564:40:0;;56598:4:::1;56564:40;::::0;::::1;1524:51:1::0;-1:-1:-1;;;;;56520:12:0;;::::1;::::0;:21:::1;::::0;56542;::::1;::::0;56564:15:::1;::::0;:25:::1;::::0;1497:18:1;;56564:40:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56520:85;::::0;-1:-1:-1;;;;;;56520:85:0::1;::::0;;;;;;-1:-1:-1;;;;;8216:32:1;;;56520:85:0::1;::::0;::::1;8198:51:1::0;8265:18;;;8258:34;8171:18;;56520:85:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;56616:20;56654:4;-1:-1:-1::0;;;;;56639:33:0::1;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56734:12;::::0;:37:::1;::::0;-1:-1:-1;;;56734:37:0;;56765:4:::1;56734:37;::::0;::::1;1524:51:1::0;56616:58:0;;-1:-1:-1;56708:78:0::1;::::0;-1:-1:-1;;;;;56734:12:0;;::::1;::::0;:22:::1;::::0;1497:18:1;;56734:37:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56773:12;56708:25;:78::i;:::-;56685:19;:101:::0;56797:10:::1;:21:::0;;-1:-1:-1;56829:23:0::1;:25:::0;-1:-1:-1;;;;;;56865:21:0;56808:10:::1;56797:21;;-1:-1:-1::0;;56865:21:0;;;;56916:9:::1;::::0;:22:::1;::::0;;-1:-1:-1;;;56916:22:0;;;;-1:-1:-1;;;;;56916:9:0;;::::1;::::0;:20:::1;::::0;:22:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;:9;:22:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56897:18;:41:::0;;;56985:21:::1;::::0;56966:40:::1;::::0;::::1;:::i;:::-;56949:16;:57:::0;57034:14:::1;::::0;:16:::1;::::0;57049:1:::1;57034:16;:::i;:::-;57017:14;:33:::0;-1:-1:-1;;1768:1:0;2722:7;:22;-1:-1:-1;;;55955:1124:0:o;39524:368::-;39601:24;39628:32;39638:7;18696:10;30454:151;:::i;39628:32::-;39601:59;;39699:6;39679:16;:26;;39671:75;;;;-1:-1:-1;;;39671:75:0;;8505:2:1;39671:75:0;;;8487:21:1;8544:2;8524:18;;;8517:30;8583:34;8563:18;;;8556:62;-1:-1:-1;;;8634:18:1;;;8627:34;8678:19;;39671:75:0;8303:400:1;39671:75:0;39782:58;39791:7;18696:10;39833:6;39814:16;:25;39782:8;:58::i;:::-;39862:22;39868:7;39877:6;39862:5;:22::i;:::-;39590:302;39524:368;;:::o;60013:119::-;60088:32;60100:10;60112:7;60088:11;:32::i;:::-;60013:119;;:::o;28804:104::-;28860:13;28893:7;28886:14;;;;;:::i;33022:413::-;18696:10;33115:4;33159:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;33159:34:0;;;;;;;;;;33212:35;;;;33204:85;;;;-1:-1:-1;;;33204:85:0;;8910:2:1;33204:85:0;;;8892:21:1;8949:2;8929:18;;;8922:30;8988:34;8968:18;;;8961:62;-1:-1:-1;;;9039:18:1;;;9032:35;9084:19;;33204:85:0;8708:401:1;33204:85:0;33325:67;18696:10;33348:7;33376:15;33357:16;:34;33325:8;:67::i;:::-;-1:-1:-1;33423:4:0;;33022:413;-1:-1:-1;;;33022:413:0:o;30216:175::-;30302:4;30319:42;18696:10;30343:9;30354:6;30319:9;:42::i;54499:583::-;1812:1;2410:7;;:19;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;54560:15:::1;::::0;::::1;;:22;54552:61;;;::::0;-1:-1:-1;;;54552:61:0;;9316:2:1;54552:61:0::1;::::0;::::1;9298:21:1::0;9355:2;9335:18;;;9328:30;9394:28;9374:18;;;9367:56;9440:18;;54552:61:0::1;9114:350:1::0;54552:61:0::1;54646:9;::::0;:22:::1;::::0;;-1:-1:-1;;;54646:22:0;;;;54624:19:::1;::::0;-1:-1:-1;;;;;54646:9:0::1;::::0;:20:::1;::::0;:22:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;:9;:22:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;54624:44;;54699:16;;54687:11;:28;54679:99;;;::::0;-1:-1:-1;;;54679:99:0;;9671:2:1;54679:99:0::1;::::0;::::1;9653:21:1::0;9710:2;9690:18;;;9683:30;9749:34;9729:18;;;9722:62;9820:28;9800:18;;;9793:56;9866:19;;54679:99:0::1;9469:422:1::0;54679:99:0::1;54806:12;::::0;:37:::1;::::0;-1:-1:-1;;;54806:37:0;;54837:4:::1;54806:37;::::0;::::1;1524:51:1::0;54789:14:0::1;::::0;-1:-1:-1;;;;;54806:12:0::1;::::0;:22:::1;::::0;1497:18:1;;54806:37:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;54789:54;;54854:17;54864:6;54854:9;:17::i;:::-;54882:23;:30:::0;;;54923:15:::1;:27:::0;;;54987:12:::1;::::0;54975:24:::1;::::0;54939:11;54975:24:::1;:::i;:::-;54961:13;:38:::0;55010:15:::1;:20:::0;;-1:-1:-1;;55010:20:0::1;55026:4;55010:20:::0;;::::1;::::0;;;55058:14:::1;::::0;:16:::1;::::0;::::1;:::i;:::-;55041:14;:33:::0;-1:-1:-1;;1768:1:0;2722:7;:22;54499:583::o;53300:577::-;1812:1;2410:7;;:19;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;53376:15:::1;::::0;::::1;;:22;53368:82;;;::::0;-1:-1:-1;;;53368:82:0;;10098:2:1;53368:82:0::1;::::0;::::1;10080:21:1::0;10137:2;10117:18;;;10110:30;10176:34;10156:18;;;10149:62;-1:-1:-1;;;10227:18:1;;;10220:45;10282:19;;53368:82:0::1;9896:411:1::0;53368:82:0::1;53494:10;53461:20;29977:18:::0;;;;;;;;;;;53524:20;;::::1;;53516:77;;;::::0;-1:-1:-1;;;53516:77:0;;10514:2:1;53516:77:0::1;::::0;::::1;10496:21:1::0;10553:2;10533:18;;;10526:30;10592:34;10572:18;;;10565:62;-1:-1:-1;;;10643:18:1;;;10636:42;10695:19;;53516:77:0::1;10312:408:1::0;53516:77:0::1;53604:29;53643:19;;53636:6;:26;;;;:::i;:::-;53604:58:::0;-1:-1:-1;53673:25:0::1;53701:29;53724:5;53604:58:::0;53701:29:::1;:::i;:::-;53673:57;;53787:12;53792:6;53787:4;:12::i;:::-;53810:9;::::0;:49:::1;::::0;-1:-1:-1;;;53810:49:0;;53829:10:::1;53810:49;::::0;::::1;8198:51:1::0;8265:18;;;8258:34;;;-1:-1:-1;;;;;53810:9:0;;::::1;::::0;:18:::1;::::0;8171::1;;53810:49:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;1768:1:0;2722:7;:22;-1:-1:-1;;;53300:577:0:o;36706:380::-;-1:-1:-1;;;;;36842:19:0;;36834:68;;;;-1:-1:-1;;;36834:68:0;;10927:2:1;36834:68:0;;;10909:21:1;10966:2;10946:18;;;10939:30;11005:34;10985:18;;;10978:62;-1:-1:-1;;;11056:18:1;;;11049:34;11100:19;;36834:68:0;10725:400:1;36834:68:0;-1:-1:-1;;;;;36921:21:0;;36913:68;;;;-1:-1:-1;;;36913:68:0;;11332:2:1;36913:68:0;;;11314:21:1;11371:2;11351:18;;;11344:30;11410:34;11390:18;;;11383:62;-1:-1:-1;;;11461:18:1;;;11454:32;11503:19;;36913:68:0;11130:398:1;36913:68:0;-1:-1:-1;;;;;36994:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;37046:32;;713:25:1;;;37046:32:0;;686:18:1;37046:32:0;;;;;;;36706:380;;;:::o;33925:733::-;-1:-1:-1;;;;;34065:20:0;;34057:70;;;;-1:-1:-1;;;34057:70:0;;11735:2:1;34057:70:0;;;11717:21:1;11774:2;11754:18;;;11747:30;11813:34;11793:18;;;11786:62;-1:-1:-1;;;11864:18:1;;;11857:35;11909:19;;34057:70:0;11533:401:1;34057:70:0;-1:-1:-1;;;;;34146:23:0;;34138:71;;;;-1:-1:-1;;;34138:71:0;;12141:2:1;34138:71:0;;;12123:21:1;12180:2;12160:18;;;12153:30;12219:34;12199:18;;;12192:62;-1:-1:-1;;;12270:18:1;;;12263:33;12313:19;;34138:71:0;11939:399:1;34138:71:0;-1:-1:-1;;;;;34306:17:0;;34282:21;34306:17;;;;;;;;;;;34342:23;;;;34334:74;;;;-1:-1:-1;;;34334:74:0;;12545:2:1;34334:74:0;;;12527:21:1;12584:2;12564:18;;;12557:30;12623:34;12603:18;;;12596:62;-1:-1:-1;;;12674:18:1;;;12667:36;12720:19;;34334:74:0;12343:402:1;34334:74:0;-1:-1:-1;;;;;34444:17:0;;;:9;:17;;;;;;;;;;;34464:22;;;34444:42;;34508:20;;;;;;;;:30;;34480:6;;34444:9;34508:30;;34480:6;;34508:30;:::i;:::-;;;;;;;;34573:9;-1:-1:-1;;;;;34556:35:0;34565:6;-1:-1:-1;;;;;34556:35:0;;34584:6;34556:35;;;;713:25:1;;701:2;686:18;;567:177;34556:35:0;;;;;;;;34046:612;33925:733;;;:::o;35677:591::-;-1:-1:-1;;;;;35761:21:0;;35753:67;;;;-1:-1:-1;;;35753:67:0;;12952:2:1;35753:67:0;;;12934:21:1;12991:2;12971:18;;;12964:30;13030:34;13010:18;;;13003:62;-1:-1:-1;;;13081:18:1;;;13074:31;13122:19;;35753:67:0;12750:397:1;35753:67:0;-1:-1:-1;;;;;35920:18:0;;35895:22;35920:18;;;;;;;;;;;35957:24;;;;35949:71;;;;-1:-1:-1;;;35949:71:0;;13354:2:1;35949:71:0;;;13336:21:1;13393:2;13373:18;;;13366:30;13432:34;13412:18;;;13405:62;-1:-1:-1;;;13483:18:1;;;13476:32;13525:19;;35949:71:0;13152:398:1;35949:71:0;-1:-1:-1;;;;;36056:18:0;;:9;:18;;;;;;;;;;36077:23;;;36056:44;;36122:12;:22;;36094:6;;36056:9;36122:22;;36094:6;;36122:22;:::i;:::-;;;;-1:-1:-1;;36162:37:0;;713:25:1;;;36188:1:0;;-1:-1:-1;;;;;36162:37:0;;;;;701:2:1;686:18;36162:37:0;;;;;;;39590:302;39524:368;;:::o;51808:82::-;51857:25;51863:10;51875:6;51857:5;:25::i;55208:139::-;55291:9;;:44;;-1:-1:-1;;;55291:44:0;;;;;13860:25:1;;;13933:12;13921:25;;13901:18;;;13894:53;-1:-1:-1;;;;;55291:9:0;;;;:18;;13833::1;;55291:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55208:139;;:::o;57233:1317::-;57347:7;;57457:17;57489:23;;;57485:282;;;57549:12;57559:2;57549:9;:12;:::i;:::-;57529:32;;57485:282;;;57603:29;57659:16;57662:13;57659:2;:16;:::i;:::-;57637:19;57646:9;57638:5;57637:19;:::i;:::-;57636:40;;;;:::i;:::-;57603:74;-1:-1:-1;57749:5:0;57712:35;57603:74;57712:9;:35;:::i;:::-;:43;;;;:::i;:::-;57692:63;;57588:179;57485:282;57780:25;;57880:4;57899:26;;;57895:212;;;57966:9;57942:33;;57895:212;;;58068:13;58044:22;58053:12;58045:5;58044:22;:::i;:::-;58041:26;;:1;:26;:::i;:::-;:40;;;;:::i;:::-;58017:64;;57895:212;58177:5;58140:35;58153:21;58140:9;:35;:::i;:::-;:43;;;;:::i;:::-;58120:63;-1:-1:-1;58211:5:0;58194:14;58246:19;58256:9;58246;:19;:::i;:::-;58227:38;-1:-1:-1;58276:25:0;58362:17;58334:27;58352:9;58334:17;:27;:::i;:::-;:45;;;;:::i;:::-;58305:26;58314:17;58305:6;:26;:::i;:::-;58304:76;;;;:::i;:::-;58276:104;-1:-1:-1;58391:27:0;58421;58276:104;58421:8;:27;:::i;:::-;58391:57;-1:-1:-1;58459:20:0;58482:26;58502:6;58391:57;58482:26;:::i;:::-;58459:49;-1:-1:-1;58526:14:0;58539:1;58459:49;58526:14;:::i;:::-;58519:21;57233:1317;-1:-1:-1;;;;;;;;;;;;;;57233:1317:0:o;59005:369::-;59104:20;59154:5;59104:20;59217:12;59188:25;59154:5;59188:16;:25;:::i;:::-;59187:42;;;;:::i;:::-;59170:59;59005:369;-1:-1:-1;;;;;59005:369:0:o;60441:133::-;60518:12;;:44;;-1:-1:-1;;;60518:44:0;;;;;13860:25:1;;;13933:12;13921:25;;13901:18;;;13894:53;-1:-1:-1;;;;;60518:12:0;;;;:23;;13833:18:1;;60518:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;55088:108::-;55143:9;;55171:12;;55143:41;;-1:-1:-1;;;55143:41:0;;;;;14132:25:1;;;14173:18;;;14166:34;;;;-1:-1:-1;;;;;55143:9:0;;;;:20;;14105:18:1;;55143:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55088:108;:::o;34945:399::-;-1:-1:-1;;;;;35029:21:0;;35021:65;;;;-1:-1:-1;;;35021:65:0;;14413:2:1;35021:65:0;;;14395:21:1;14452:2;14432:18;;;14425:30;14491:33;14471:18;;;14464:61;14542:18;;35021:65:0;14211:355:1;35021:65:0;35177:6;35161:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;35194:18:0;;:9;:18;;;;;;;;;;:28;;35216:6;;35194:9;:28;;35216:6;;35194:28;:::i;:::-;;;;-1:-1:-1;;35238:37:0;;713:25:1;;;-1:-1:-1;;;;;35238:37:0;;;35255:1;;35238:37;;701:2:1;686:18;35238:37:0;;;;;;;60013:119;;:::o;14:548:1:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;749:173::-;817:20;;-1:-1:-1;;;;;866:31:1;;856:42;;846:70;;912:1;909;902:12;846:70;749:173;;;:::o;927:254::-;995:6;1003;1056:2;1044:9;1035:7;1031:23;1027:32;1024:52;;;1072:1;1069;1062:12;1024:52;1095:29;1114:9;1095:29;:::i;:::-;1085:39;1171:2;1156:18;;;;1143:32;;-1:-1:-1;;;927:254:1:o;1586:328::-;1663:6;1671;1679;1732:2;1720:9;1711:7;1707:23;1703:32;1700:52;;;1748:1;1745;1738:12;1700:52;1771:29;1790:9;1771:29;:::i;:::-;1761:39;;1819:38;1853:2;1842:9;1838:18;1819:38;:::i;:::-;1809:48;;1904:2;1893:9;1889:18;1876:32;1866:42;;1586:328;;;;;:::o;2108:180::-;2167:6;2220:2;2208:9;2199:7;2195:23;2191:32;2188:52;;;2236:1;2233;2226:12;2188:52;-1:-1:-1;2259:23:1;;2108:180;-1:-1:-1;2108:180:1:o;2293:346::-;2360:6;2368;2421:2;2409:9;2400:7;2396:23;2392:32;2389:52;;;2437:1;2434;2427:12;2389:52;2473:9;2460:23;2450:33;;2533:2;2522:9;2518:18;2505:32;2577:12;2570:5;2566:24;2559:5;2556:35;2546:63;;2605:1;2602;2595:12;2546:63;2628:5;2618:15;;;2293:346;;;;;:::o;2644:186::-;2703:6;2756:2;2744:9;2735:7;2731:23;2727:32;2724:52;;;2772:1;2769;2762:12;2724:52;2795:29;2814:9;2795:29;:::i;:::-;2785:39;2644:186;-1:-1:-1;;;2644:186:1:o;2835:260::-;2903:6;2911;2964:2;2952:9;2943:7;2939:23;2935:32;2932:52;;;2980:1;2977;2970:12;2932:52;3003:29;3022:9;3003:29;:::i;:::-;2993:39;;3051:38;3085:2;3074:9;3070:18;3051:38;:::i;:::-;3041:48;;2835:260;;;;;:::o;3100:380::-;3179:1;3175:12;;;;3222;;;3243:61;;3297:4;3289:6;3285:17;3275:27;;3243:61;3350:2;3342:6;3339:14;3319:18;3316:38;3313:161;;3396:10;3391:3;3387:20;3384:1;3377:31;3431:4;3428:1;3421:15;3459:4;3456:1;3449:15;3313:161;;3100:380;;;:::o;3485:184::-;3555:6;3608:2;3596:9;3587:7;3583:23;3579:32;3576:52;;;3624:1;3621;3614:12;3576:52;-1:-1:-1;3647:16:1;;3485:184;-1:-1:-1;3485:184:1:o;4083:127::-;4144:10;4139:3;4135:20;4132:1;4125:31;4175:4;4172:1;4165:15;4199:4;4196:1;4189:15;4215:125;4280:9;;;4301:10;;;4298:36;;;4314:18;;:::i;4345:355::-;4547:2;4529:21;;;4586:2;4566:18;;;4559:30;4625:33;4620:2;4605:18;;4598:61;4691:2;4676:18;;4345:355::o;6642:277::-;6709:6;6762:2;6750:9;6741:7;6737:23;6733:32;6730:52;;;6778:1;6775;6768:12;6730:52;6810:9;6804:16;6863:5;6856:13;6849:21;6842:5;6839:32;6829:60;;6885:1;6882;6875:12;6924:168;6964:7;7030:1;7026;7022:6;7018:14;7015:1;7012:21;7007:1;7000:9;6993:17;6989:45;6986:71;;;7037:18;;:::i;:::-;-1:-1:-1;7077:9:1;;6924:168::o;7097:217::-;7137:1;7163;7153:132;;7207:10;7202:3;7198:20;7195:1;7188:31;7242:4;7239:1;7232:15;7270:4;7267:1;7260:15;7153:132;-1:-1:-1;7299:9:1;;7097:217::o;13555:128::-;13622:9;;;13643:11;;;13640:37;;;13657:18;;:::i

Swarm Source

ipfs://8cd7daa8d5b1cbe8387d850e90b145394dec9825d24bc295e71df6d2f6315392
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.