ETH Price: $3,413.47 (-6.53%)
Gas: 9.47 Gwei

Token

Poly Water (WATER)
 

Overview

Max Total Supply

28,381.801705889083815716 WATER

Holders

398

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
1.00009 WATER

Value
$0.00
0x908f295ec711b14fe0f618b757f6c26488f361e0
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
PolyWater

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 420 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-11-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 (last updated v4.6.0) (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 subtraction 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/token/ERC20/extensions/draft-IERC20Permit.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

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


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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

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

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

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

// 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/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// 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/ERC20.sol


// OpenZeppelin Contracts (last updated v4.7.0) (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:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, 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) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, 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) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - 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 (last updated v4.5.0) (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 {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

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


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


// OpenZeppelin Contracts (last updated v4.7.0) (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));
        }
    }

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

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

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

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;








/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` 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 tokenId
    ) 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.
     * - `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 tokenId
    ) internal virtual {}
}

// File: contracts/PolyMaximus.sol


pragma solidity ^0.8.4;









/// Contract Interfaces and Abstract contracts
    // this interface comes directly from the Icosa contract. Many of these are not used in Poly Maximus
    interface HedronContract {
        struct LiquidationStore{
            uint256 liquidationStart;
            address hsiAddress;
            uint96  bidAmount;
            address liquidator;
            uint88  endOffset;
            bool    isActive;
        }
        struct HEXStakeMinimal {
        uint40 stakeId;
        uint72 stakeShares;
        uint16 lockedDay;
        uint16 stakedDays;
        }
        event Approval(
            address indexed owner,
            address indexed spender,
            uint256 value
        );
        event Claim(uint256 data, address indexed claimant, uint40 indexed stakeId);
        event LoanEnd(
            uint256 data,
            address indexed borrower,
            uint40 indexed stakeId
        );
        event LoanLiquidateBid(
            uint256 data,
            address indexed bidder,
            uint40 indexed stakeId,
            uint40 indexed liquidationId
        );
        event LoanLiquidateExit(
            uint256 data,
            address indexed liquidator,
            uint40 indexed stakeId,
            uint40 indexed liquidationId
        );
        event LoanLiquidateStart(
            uint256 data,
            address indexed borrower,
            uint40 indexed stakeId,
            uint40 indexed liquidationId
        );
        event LoanPayment(
            uint256 data,
            address indexed borrower,
            uint40 indexed stakeId
        );
        event LoanStart(
            uint256 data,
            address indexed borrower,
            uint40 indexed stakeId
        );
        event Mint(uint256 data, address indexed minter, uint40 indexed stakeId);
        event Transfer(address indexed from, address indexed to, uint256 value);

        function allowance(address owner, address spender)
            external
            view
            returns (uint256);

        function approve(address spender, uint256 amount) external returns (bool);

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

        function calcLoanPayment(
            address borrower,
            uint256 hsiIndex,
            address hsiAddress
        ) external view returns (uint256, uint256);

        function calcLoanPayoff(
            address borrower,
            uint256 hsiIndex,
            address hsiAddress
        ) external view returns (uint256, uint256);

        function claimInstanced(
            uint256 hsiIndex,
            address hsiAddress,
            address hsiStarterAddress
        ) external;

        function claimNative(uint256 stakeIndex, uint40 stakeId)
            external
            returns (uint256);

        function currentDay() external view returns (uint256);

        function dailyDataList(uint256)
            external
            view
            returns (
                uint72 dayMintedTotal,
                uint72 dayLoanedTotal,
                uint72 dayBurntTotal,
                uint32 dayInterestRate,
                uint8 dayMintMultiplier
            );

        function decimals() external view returns (uint8);

        function decreaseAllowance(address spender, uint256 subtractedValue)
            external
            returns (bool);

        function hsim() external view returns (address);

        function increaseAllowance(address spender, uint256 addedValue)
            external
            returns (bool);

        function liquidationList(uint256)
            external
            view
            returns (LiquidationStore memory);
            /*
            returns (
                uint256 liquidationStart,
                address hsiAddress,
                uint96 bidAmount,
                address liquidator,
                uint88 endOffset,
                bool isActive
            );*/

        function loanInstanced(uint256 hsiIndex, address hsiAddress)
            external
            returns (uint256);

        function loanLiquidate(
            address owner,
            uint256 hsiIndex,
            address hsiAddress
        ) external returns (uint256);

        function loanLiquidateBid(uint256 liquidationId, uint256 liquidationBid)
            external
            returns (uint256);

        function loanLiquidateExit(uint256 hsiIndex, uint256 liquidationId)
            external
            returns (address);

        function loanPayment(uint256 hsiIndex, address hsiAddress)
            external
            returns (uint256);

        function loanPayoff(uint256 hsiIndex, address hsiAddress)
            external
            returns (uint256);

        function loanedSupply() external view returns (uint256);

        function mintInstanced(uint256 hsiIndex, address hsiAddress)
            external
            returns (uint256);

        function mintNative(uint256 stakeIndex, uint40 stakeId)
            external
            returns (uint256);

        function name() external view returns (string memory);

        function proofOfBenevolence(uint256 amount) external;

        function shareList(uint256)
            external
            view
            returns (
                HEXStakeMinimal memory stake,
                uint16 mintedDays,
                uint8 launchBonus,
                uint16 loanStart,
                uint16 loanedDays,
                uint32 interestRate,
                uint8 paymentsMade,
                bool isLoaned
            );

        function symbol() external view returns (string memory);

        function totalSupply() external view returns (uint256);

        function transfer(address recipient, uint256 amount)
            external
            returns (bool);

        function transferFrom(
            address sender,
            address recipient,
            uint256 amount
        ) external returns (bool);
    }
    // this comes from the icosa contract. Used for staking HDRN
    interface IcosaInterface {
        event Approval(
            address indexed owner,
            address indexed spender,
            uint256 value
        );
        event HDRNStakeAddCapital(uint256 data, address indexed staker);
        event HDRNStakeEnd(uint256 data, address indexed staker);
        event HDRNStakeStart(uint256 data, address indexed staker);
        event HDRNStakingStats(
            uint256 data,
            uint256 payout,
            uint256 indexed stakeDay
        );
        event HSIBuyBack(
            uint256 price,
            address indexed seller,
            uint40 indexed stakeId
        );
        event ICSAStakeAddCapital(uint256 data, address indexed staker);
        event ICSAStakeEnd(uint256 data0, uint256 data1, address indexed staker);
        event ICSAStakeStart(uint256 data, address indexed staker);
        event ICSAStakingStats(
            uint256 data,
            uint256 payoutIcsa,
            uint256 payoutHdrn,
            uint256 indexed stakeDay
        );
        event NFTStakeEnd(
            uint256 data,
            address indexed staker,
            uint96 indexed nftId
        );
        event NFTStakeStart(
            uint256 data,
            address indexed staker,
            uint96 indexed nftId,
            address indexed tokenAddress
        );
        event NFTStakingStats(
            uint256 data,
            uint256 payout,
            uint256 indexed stakeDay
        );
        event Transfer(address indexed from, address indexed to, uint256 value);

        function allowance(address owner, address spender)
            external
            view
            returns (uint256);

        function approve(address spender, uint256 amount) external returns (bool);

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

        function currentDay() external view returns (uint256);

        function decimals() external view returns (uint8);

        function decreaseAllowance(address spender, uint256 subtractedValue)
            external
            returns (bool);

        function hdrnPoolIcsaCollected() external view returns (uint256);

        function hdrnPoolPayout(uint256) external view returns (uint256);

        function hdrnPoolPoints(uint256) external view returns (uint256);

        function hdrnPoolPointsRemoved() external view returns (uint256);

        function hdrnSeedLiquidity(uint256) external view returns (uint256);

        function hdrnStakeAddCapital(uint256 amount) external returns (uint256);

        function hdrnStakeEnd()
            external
            returns (
                uint256,
                uint256,
                uint256
            );

        function hdrnStakeStart(uint256 amount) external returns (uint256);

        function hdrnStakes(address)
            external
            view
            returns (
                uint64 stakeStart,
                uint64 capitalAdded,
                uint120 stakePoints,
                bool isActive,
                uint80 payoutPreCapitalAddIcsa,
                uint80 payoutPreCapitalAddHdrn,
                uint80 stakeAmount,
                uint16 minStakeLength
            );

        function hexStakeSell(uint256 tokenId) external returns (uint256);

        function icsaPoolHdrnCollected() external view returns (uint256);

        function icsaPoolIcsaCollected() external view returns (uint256);

        function icsaPoolPayoutHdrn(uint256) external view returns (uint256);

        function icsaPoolPayoutIcsa(uint256) external view returns (uint256);

        function icsaPoolPoints(uint256) external view returns (uint256);

        function icsaPoolPointsRemoved() external view returns (uint256);

        function icsaSeedLiquidity(uint256) external view returns (uint256);

        function icsaStakeAddCapital(uint256 amount) external returns (uint256);

        function icsaStakeEnd()
            external
            returns (
                uint256,
                uint256,
                uint256,
                uint256,
                uint256
            );

        function icsaStakeStart(uint256 amount) external returns (uint256);

        function icsaStakedSupply() external view returns (uint256);

        function icsaStakes(address)
            external
            view
            returns (
                uint64 stakeStart,
                uint64 capitalAdded,
                uint120 stakePoints,
                bool isActive,
                uint80 payoutPreCapitalAddIcsa,
                uint80 payoutPreCapitalAddHdrn,
                uint80 stakeAmount,
                uint16 minStakeLength
            );

        function increaseAllowance(address spender, uint256 addedValue)
            external
            returns (bool);

        function injectSeedLiquidity(uint256 amount, uint256 seedDays) external;

        function launchDay() external view returns (uint256);

        function name() external view returns (string memory);

        function nftPoolIcsaCollected() external view returns (uint256);

        function nftPoolPayout(uint256) external view returns (uint256);

        function nftPoolPoints(uint256) external view returns (uint256);

        function nftPoolPointsRemoved() external view returns (uint256);

        function nftStakeEnd(uint256 nftId) external returns (uint256);

        function nftStakeStart(uint256 amount, address tokenAddress)
            external
            payable
            returns (uint256);

        function nftStakes(uint256)
            external
            view
            returns (
                uint64 stakeStart,
                uint64 capitalAdded,
                uint120 stakePoints,
                bool isActive,
                uint80 payoutPreCapitalAddIcsa,
                uint80 payoutPreCapitalAddHdrn,
                uint80 stakeAmount,
                uint16 minStakeLength
            );

        function symbol() external view returns (string memory);

        function totalSupply() external view returns (uint256);

        function transfer(address to, uint256 amount) external returns (bool);

        function transferFrom(
            address from,
            address to,
            uint256 amount
        ) external returns (bool);

        function waatsa() external view returns (address);
    }
    // used in ThankYouTeam escrow contract
    contract TEAMContract {
        function getCurrentPeriod() public view returns (uint256) {}
    }
    contract HEXContract {
        function currentDay() external view returns (uint256){}
        function stakeStart(uint256 newStakedHearts, uint256 newStakedDays) external {}
        function stakeEnd(uint256 stakeIndex, uint40 stakeIdParam) external {}
    }
    contract HedronContracts {
        struct HEXStakeMinimal {
        uint40 stakeId;
        uint72 stakeShares;
        uint16 lockedDay;
        uint16 stakedDays;
        }

        struct ShareStore {
            HEXStakeMinimal stake;
            uint16          mintedDays;
            uint8           launchBonus;
            uint16          loanStart;
            uint16          loanedDays;
            uint32          interestRate;
            uint8           paymentsMade;
            bool            isLoaned;
        }
        struct LiquidationStore{
            uint256 liquidationStart;
            address hsiAddress;
            uint96  bidAmount;
            address liquidator;
            uint88  endOffset;
            bool    isActive;
        }

    function currentDay() external view returns (uint256) {}
    function liquidationList(uint256 index) public view returns (LiquidationStore memory) {}
    function shareList(uint256 hshi_id) public view returns (ShareStore memory) {}
    function mintInstanced(uint256 hsiIndex,address hsiAddress) external returns (uint256){}
    function mintNative(uint256 stakeIndex, uint40 stakeId) external returns (uint256){}
    function loanLiquidate(address owner,uint256 hsiIndex,address hsiAddress) external returns (uint256) {}
    function loanLiquidateBid (uint256 liquidationId,uint256 liquidationBid) external returns (uint256) {}
    function loanLiquidateExit(uint256 hsiIndex, uint256 liquidationId) external returns (address) {}
    }
    contract HSIContract{
        struct HEXStakeMinimal {
        uint40 stakeId;
        uint72 stakeShares;
        uint16 lockedDay;
        uint16 stakedDays;
        }

        struct ShareStore {
            HEXStakeMinimal stake;
            uint16          mintedDays;
            uint8           launchBonus;
            uint16          loanStart;
            uint16          loanedDays;
            uint32          interestRate;
            uint8           paymentsMade;
            bool            isLoaned;
        }
        struct HEXStake {
        uint40 stakeId;
        uint72 stakedHearts;
        uint72 stakeShares;
        uint16 lockedDay;
        uint16 stakedDays;
        uint16 unlockedDay;
        bool   isAutoStake;
        }
    
        function share() public view returns (ShareStore memory) {}
        function goodAccounting() external {}
        function stakeDataFetch(
        ) 
            external
            view
            returns(HEXStake memory)
        {}
    }
    contract HSIManagerContract {
        mapping(address => address[]) public  hsiLists;
        function hexStakeDetokenize (uint256 tokenId) external returns (address) {}
        function hexStakeStart ( uint256 amount, uint256 length) external returns (address) {}
        function hexStakeEnd (uint256 hsiIndex,address hsiAddress) external returns (uint256) {}
        function ownerOf(uint256 tokenId) public view virtual returns (address) {}
        function hsiToken(uint256 hsiIndex) public view returns (address) {}
        function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual  returns (uint256) {}
        function safeTransferFrom(
            address from,
            address to,
            uint256 tokenId
        ) public virtual  {}
        function transferFrom(
            address from,
            address to,
            uint256 tokenId
        ) external {}
    }





contract PolyMaximus is ERC20, ERC20Burnable, ReentrancyGuard {

    /*
    Poly Maximus is a HDRN pool for bidding in the HSIs available in the Hedron Liquidation Auctions.

    * Minting and Redemption Rules:
        - Mint 1 POLY per 1 HDRN deposited to the contract before or on the LAST_POSSIBLE_MINTING_DAY.
        - When minting, users vote for their recommended Bidding Budget as a percent of the entire Poly Maximus HDRN Treasury. Votes on LAST_POSSIBLE_MINTING_DAY default to 100%.
        - When there are less than 2 days left in minting, someone needs to run finalizeMinting() which activates bidding phase, stakes HDRN, and allocates the bidding budget. Then after minting someone needs to run flushLateMint
        - All HDRN deposited on the Late Minting Day is added to the bidding budget.
        - The redemption phase begins once all stakes are ended. Users run redeemPoly() which burns POLY and transfers them the corresponding HEX, HDRN, and ICSA per the REDEMPTION_RATE values.
    
    * HSI Auction Executor
        - The Executor is an address, or set of addresses which are able to run the bid() function completely at their discretion.
        - Poly Maximus Participants agree to not have any expectations of the performance of The Executor. 
        - If the executor does not make any bids over any 30 day period, the bidding is considered done and the remaining HDRN gets staked via Icosa.
    
    * HSI Management:
        - As HSIs enter the contract after succesful auctions, someone needs to run processHSI() which records information about the stake and schedules the ending of the stakes.
        - After each HSI ends, someone needs to run endHSIStake() to mint the HDRN and end the HEX stake. If it is the last scheduled HSI, it activates the redemption period.
        - if one of the HSIs ends with at least a year left until the LAST_ACTIVE_HSI ends, the HEX is restaked until right before the LAST_ACTIVE_HSI ends and the HDRN is added to the Icosa Hedron stake.

    * Thank You Maximus Team:
        - As an expression of gratitude for the outsized benefits of participating in Poly Maximus, 1% of the incoming HDRN and 1% of the outgoing HEX is gifted to TEAM
            - Before or on MINTING_PHASE_END
            -of the 1% of the incoming HDRN:
                - 33% is distributed to TEAM stakers during year 1
                - 33% is distributed to TEAM stakers during year 2
                - 34% is sent to the Mystery Box Hot Address
            - The 1% of the outgoing HEX after all the stakes end is distributed to TEAM stakers during whichever year the last HSI ends.
    */





    /// Data Structures

        struct HEXStakeMinimal {
        uint40 stakeId;
        uint72 stakeShares;
        uint16 lockedDay;
        uint16 stakedDays;
        }

        struct ShareStore {
            HEXStakeMinimal stake;
            uint16          mintedDays;
            uint8           launchBonus;
            uint16          loanStart;
            uint16          loanedDays;
            uint32          interestRate;
            uint8           paymentsMade;
            bool            isLoaned;
        }
        struct LiquidationStore{
            uint256 liquidationStart;
            address hsiAddress;
            uint96  bidAmount;
            address liquidator;
            uint88  endOffset;
            bool    isActive;
        }

        struct LiquidationData {
            uint16          mintedDays;
            uint8           launchBonus;
            uint16          loanStart;
            uint16          loanedDays;
            uint32          interestRate;
            uint8           paymentsMade;
            bool            isLoaned;
            uint256 liquidationStart;
            address hsiAddress;
            uint96  bidAmount;
            address liquidator;
            uint88  endOffset;
            bool    isActive;
        }
        struct HEXStake {
                uint40 stakeId;
                uint72 stakedHearts;
                uint72 stakeShares;
                uint16 lockedDay;
                uint16 stakedDays;
                uint16 unlockedDay;
                bool   isAutoStake;
            }
    
    /// Events
        event Mint (address indexed user,uint256 amount);
        event Redeem (address indexed user, uint256 amount, uint256 hex_redeemed, uint256 hedron_redeemed, uint256 icosa_redeemed);
        event Bid(uint256 liquidationId, uint256 liquidationBid);
        event ProcessHSI(address indexed hsi_address, uint256 hsi_id);
   

    /// Contract interfaces
        address constant HEX_ADDRESS = 0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39;
        HEXContract hex_contract = HEXContract(HEX_ADDRESS);
        address constant HEDRON_ADDRESS=0x3819f64f282bf135d62168C1e513280dAF905e06;
        HedronContract hedron_contract = HedronContract(HEDRON_ADDRESS); 
        address constant HSI_MANAGER_ADDRESS =0x8BD3d1472A656e312E94fB1BbdD599B8C51D18e3;
        HSIManagerContract HSI_manager_contract = HSIManagerContract(HSI_MANAGER_ADDRESS); 
        address public ICOSA_CONTRACT_ADDRESS = 0xfc4913214444aF5c715cc9F7b52655e788A569ed; 
        IcosaInterface icosa_contract = IcosaInterface(ICOSA_CONTRACT_ADDRESS);
        address constant TEAM_ADDRESS = 0xB7c9E99Da8A857cE576A830A9c19312114d9dE02;
    /// Minting Variables

        uint256 public MINTING_PHASE_START;
        uint256 public MINTING_PHASE_END;
        uint256 public LAST_POSSIBLE_MINTING_DAY;
        uint256 public late_thank_you_team; // late thank you team amount
        address mystery_box_hot =0x00C055Ee792B5bC9AeB06ced73bB71ce7E5773Ce;
        bool HAS_LATE_FLUSHED;
    /// Redemption Variables
        bool public IS_REDEMPTION_ACTIVE;
        uint256 public HEX_REDEMPTION_RATE; // Number of HEX units redeemable per POLY
        uint256 public HEDRON_REDEMPTION_RATE; // Number of HEDRON units redeemable per POLY
        uint256 public ICOSA_REDEMPTION_RATE; // Number of ICSA units redeemable per POLY
        uint256 div_scalar = 10**8;
    
    /// HSI Variables
        mapping (address => bool) public END_STAKERS; // Addresses of the users who end HSI stakes on Poly Community's behalf, may be used in future gas pooling contracts
        uint256 public LAST_STAKE_START_DAY;
        uint256 public LATEST_STAKE_END_DAY;
        mapping (address => HEXStake) public HEXStakes;
        address public LAST_ACTIVE_HSI;
        
        
    
    /// Bid Execution Variables
        mapping (address => bool) public IS_EXECUTOR; // mapping of addresses authorized to run executor functions
        bool public IS_BIDDING_ACTIVE;
        // BIDDING_BUDGET_TRACKER and STAKING_BUDGET_TRACKER are used to calculate the bidding_budget_percent, updated as each user mints and votes.
        uint256 public BIDDING_BUDGET_TRACKER; 
        uint256 public STAKING_BUDGET_TRACKER;
        uint256 TOTAL_BIDDING_BUDGET; // amount of HDRN able to be bid
        uint256 public HDRN_STAKING_BUDGET; // amount of HDRN allocated for staking
        uint256 public bidding_budget_percent; // percent of total HDRN able to be bid
        address public THANK_YOU_TEAM; // contract address for the ThankYouTeam Escrow contract
        uint256 public LAST_BID_PLACED_DAY; // Updated as each bid is placed, used to declare bidding deadline
        address public EXECUTOR_MAIN = 0x07D48f521e11B3824808397A1E57177821de2b61;
        address public EXECUTOR_AUX = 0xc9534Ca2B339bbfC3435e24B93bD1239A898cB28;
        address public POLY_WATER_ADDRESS;
        

        

    constructor() ERC20("Poly Maximus", "POLY") ReentrancyGuard() {
        uint256 start_day=hex_contract.currentDay();
        MINTING_PHASE_START = start_day;
        MINTING_PHASE_END = 1075;
        LAST_POSSIBLE_MINTING_DAY = MINTING_PHASE_END + 2;
        LAST_BID_PLACED_DAY=MINTING_PHASE_END; // set to first eligible day to prevent stake_leftover_hdrn() from being run before first bid is placed
        LAST_STAKE_START_DAY= MINTING_PHASE_END+10; // HSIs must have started before this deadline in order to be processed.
        IS_EXECUTOR[EXECUTOR_MAIN]=true;
        IS_EXECUTOR[EXECUTOR_AUX]=true; 

        PolyWater poly_water_contract = new PolyWater(address(this), EXECUTOR_MAIN); // deploys the gas fee donation pool contract
        POLY_WATER_ADDRESS = address(poly_water_contract);  
       
    }
    
    /// Utilities
        /**
        * @dev Sets decimals to 9 - to be equal to that of HDRN.
        */
        function decimals() public view virtual override returns (uint8) {return 9;}
        function mint(uint256 amount) private {_mint(msg.sender, amount);}
        /**
        * @dev Gets the current HEX Day.
        * @return hex_day current day per the HEX Contract.
        */
        function getCurrentDay() public view returns (uint256 hex_day) {return hex_contract.currentDay();} 
        
    /// Minting Phase Functions
        /**
        * @dev Checks that mint phase is ongoing and that the user inputted bid budget percent is within the allowed range. Then it updates the global bidding_budget_percent value, transfers the amount of HDRN to the Poly contract, then mints the user the same number of POLY.
        * @param amount amount of HDRN minted into POLY.
        * @param bid_budget_percent percent of total HDRN the user thinks should be bid on HSIs.
        */
        function mintPoly(uint256 amount, uint256 bid_budget_percent) nonReentrant external {
            uint256 today = getCurrentDay();
            require(today <= LAST_POSSIBLE_MINTING_DAY, "Minting Phase must still be ongoing to mint POLY.");
            require(bid_budget_percent <= 100, "Bid Budget must not be greater than 100 percent.");
            require(bid_budget_percent >= 50, "Bid Budget Percent must not be less than 50 percent.");
            IERC20(HEDRON_ADDRESS).transferFrom(msg.sender, address(this), amount); // sends HDRN to the Poly Contract
            if (today==LAST_POSSIBLE_MINTING_DAY || today == LAST_POSSIBLE_MINTING_DAY-1){
                require(IS_BIDDING_ACTIVE==true, "Run finalizeMinting() to resume minting today.");  // prevent double-thanking team (even though team should get way more)
                late_thank_you_team = late_thank_you_team + (amount / 200); 
                bid_budget_percent = 100;
            }
            BIDDING_BUDGET_TRACKER = BIDDING_BUDGET_TRACKER + ((bid_budget_percent * amount)/100); // increments weighted running total bidding budget tracker
            STAKING_BUDGET_TRACKER = STAKING_BUDGET_TRACKER + (((100-bid_budget_percent) * amount)/100); // increments weighted running total staking budget tracker
            bidding_budget_percent = 100 * BIDDING_BUDGET_TRACKER / (BIDDING_BUDGET_TRACKER + STAKING_BUDGET_TRACKER); // calculates percent of total to be bid
            mint(amount); // Mints 1 POLY per 1 HDRN
            emit Mint(msg.sender, amount);
        }

        /*
        * @dev This function is run at the end of the minting phase to kick off the bidding phase. It checks if the minting phase is still ongoing, deploys the ThankYouTeam escrow contract, allocates the amount used to Thank TEAM, calculates the Bidding and Staking budgets, and stakes the HDRN staking budget.
        */
        function finalizeMinting() external nonReentrant {
            require(getCurrentDay() > MINTING_PHASE_END, "Minting Phase must be over.");
            require(IS_BIDDING_ACTIVE ==false);
            ThankYouTeam tyt = new ThankYouTeam();
            THANK_YOU_TEAM = address(tyt);
            uint256 total_hdrn = IERC20(HEDRON_ADDRESS).balanceOf(address(this));
            uint256 thank_you_team = 100 * total_hdrn / 10000; // Poly thanks TEAM for saving them 99% on gas fees and letting them have HDRN staking bonuses with 1% of the total HDRN pledged.
            IERC20(HEDRON_ADDRESS).transfer(THANK_YOU_TEAM, thank_you_team);
            TOTAL_BIDDING_BUDGET = (total_hdrn - thank_you_team) * bidding_budget_percent/100;
            HDRN_STAKING_BUDGET = (total_hdrn - thank_you_team) - TOTAL_BIDDING_BUDGET;
            IERC20(HEDRON_ADDRESS).approve(ICOSA_CONTRACT_ADDRESS, HDRN_STAKING_BUDGET);
            icosa_contract.hdrnStakeStart(HDRN_STAKING_BUDGET);
            IS_BIDDING_ACTIVE = true;
        }
        
        /* 
        @dev Anyone can run the function which sends the late poly minters' thanks to TEAM and Mystery Box. Half of it gets distributed to Year 1 TEAM stakers. Half of it gets distributed to the Mystery Box Hot address collected from the Mystery Bx Contract.
        
        */
        function flushLateMint() nonReentrant external {
            require(getCurrentDay()>LAST_POSSIBLE_MINTING_DAY, "Late Mint Phase must be over");
            require(HAS_LATE_FLUSHED==false);
            IERC20(HEDRON_ADDRESS).transfer(TEAM_ADDRESS, late_thank_you_team);
            IERC20(HEDRON_ADDRESS).transfer(mystery_box_hot, late_thank_you_team);
            HAS_LATE_FLUSHED = true;
        }
        

    /// Redemption Functions
        /**
        * @dev Checks that redemption phase is ongoing and that the amount requested is less than the user's POLY balance. Then it calculates the amount of HEX, HDRN, and ICOSA that is redeemable for the amount input by the user, burns that amount and transfers them their alloted HEX, HDRN, and ICOSA.
        * @param amount amount of POLY being redeemed.
        */
        function redeemPoly(uint256 amount) nonReentrant external {
            require(IS_REDEMPTION_ACTIVE==true, "Redemption can only happen at end.");
            uint256 current_balance = balanceOf(msg.sender);
            require(amount<=current_balance, "insufficient balance");
            uint256 redeemable_hex = amount * HEX_REDEMPTION_RATE / div_scalar;
            uint256 redeemable_hedron = amount * HEDRON_REDEMPTION_RATE / div_scalar;
            uint256 redeemable_icosa = amount * ICOSA_REDEMPTION_RATE / div_scalar;
            burn(amount);
            if (redeemable_hex > 0 ) {
                IERC20(HEX_ADDRESS).transfer(msg.sender, redeemable_hex);
            }
            if (redeemable_hedron > 0 ) {
                IERC20(HEDRON_ADDRESS).transfer(msg.sender, redeemable_hedron);
            }
            if (redeemable_icosa > 0 ) {
                IERC20(ICOSA_CONTRACT_ADDRESS).transfer(msg.sender, redeemable_icosa);
            }
            emit Redeem(msg.sender, amount, redeemable_hex, redeemable_hedron, redeemable_icosa);
        }
        

        function calculate_redemption_rate(uint256 balance, uint256 supply) public view returns (uint256 redemption_rate) {
            uint256 scaled_redemption_rate = balance * div_scalar / supply;
            return scaled_redemption_rate;
        }
 
        function set_redemption_rate() private {
            HEX_REDEMPTION_RATE = calculate_redemption_rate(IERC20(HEX_ADDRESS).balanceOf(address(this)), totalSupply());
            HEDRON_REDEMPTION_RATE = calculate_redemption_rate(IERC20(HEDRON_ADDRESS).balanceOf(address(this)), totalSupply());
            ICOSA_REDEMPTION_RATE =  calculate_redemption_rate(IERC20(ICOSA_CONTRACT_ADDRESS).balanceOf(address(this)), totalSupply());
        }
    /// Liquidation Auction Management
        /*
        * @dev Bids on existing liquidations. It checks to make sure the bid is within the maximum bid allowance, ensures that bidding is still active, and that the caller of this function is in the whitelisted executor list. Then it places the bid via the Hedron contract.
        * @param liquidationId - unique identifier for the liquidation
        * @param liquidationBid - bid amount determined by executor.
        */
        function bid(uint256 liquidationId, uint256 liquidationBid) external nonReentrant {
            require(IS_BIDDING_ACTIVE);
            require(getCurrentDay() <= LAST_BID_PLACED_DAY + 30, "If 30 Days go by without a bid placed, bidding phase ends.");
            require(IS_EXECUTOR[msg.sender]);
            hedron_contract.loanLiquidateBid(liquidationId, liquidationBid);
            LAST_BID_PLACED_DAY = getCurrentDay();
            emit Bid(liquidationId, liquidationBid);
        }
        
        /*
        * @dev Allows the executor to start the liquidation process.
        * @param owner HSI contract owner address.
        * @param hsiIndex Index of the HSI contract address in the owner's HSI list.
        * @param hsiAddress Address of the HSI contract.
        */
        function startBid(address owner, uint256 hsiIndex, address hsiAddress) external nonReentrant {
            require(getCurrentDay() <= LAST_BID_PLACED_DAY + 30, "If 30 Days go by without a bid placed, bidding phase ends.");
            require(IS_EXECUTOR[msg.sender]);
            hedron_contract.loanLiquidate(owner, hsiIndex, hsiAddress);
            LAST_BID_PLACED_DAY = getCurrentDay();
        }
        /**
            * @dev Allows any address to exit a completed liquidation, granting control of the
                    HSI to the highest bidder. Included here for UI simplicity, but may be called directly to hedron contract.
            * @param hsiIndex Index of the HSI contract address in the zero address's HSI list.
            *                 (see hsiLists -> HEXStakeInstanceManager.sol)
            * @param liquidationId ID number of the liquidation to exit.
          
     */
        function collectWinnings(uint256 hsiIndex, uint256 liquidationId) external {
            hedron_contract.loanLiquidateExit(hsiIndex, liquidationId);
        }

        
        /*
        * @dev Gets the information about the liquidation, and the HSI.
        * @param liquidation_index Hedron liquidation auction identifier
        * return liquidation_data Liquidation information including: mintedDays, launchBonus, loanStart , loanedDays, interestRate, paymentsMade, isLoaned, liquidationStart, hsiAddress, bidAmount, liquidator, endOffset, isActive
        */
        function getLiquidation(uint256 liquidation_index) public view returns (LiquidationData memory liquidation_data) {
            
            uint256 liquidationStart=hedron_contract.liquidationList(liquidation_index).liquidationStart; 
            address hsiAddress=hedron_contract.liquidationList(liquidation_index).hsiAddress;
            uint96  bidAmount=hedron_contract.liquidationList(liquidation_index).bidAmount;
            address liquidator=hedron_contract.liquidationList(liquidation_index).liquidator;
            uint88  endOffset=hedron_contract.liquidationList(liquidation_index).endOffset;
            bool    isActive=hedron_contract.liquidationList(liquidation_index).isActive;
            uint16         mintedDays=  HSIContract(hsiAddress).share().mintedDays;
            uint8          launchBonus = HSIContract(hsiAddress).share().launchBonus;
            uint16         loanStart =  HSIContract(hsiAddress).share().loanStart;
            uint16         loanedDays =HSIContract(hsiAddress).share().loanedDays;
            uint32         interestRate= HSIContract(hsiAddress).share().interestRate;
            uint8          paymentsMade = HSIContract(hsiAddress).share().paymentsMade;
            bool           isLoaned = HSIContract(hsiAddress).share().isLoaned;
            LiquidationData memory liquidation = LiquidationData(
            mintedDays, launchBonus, loanStart , loanedDays, interestRate, paymentsMade, isLoaned,
            liquidationStart, hsiAddress, bidAmount, liquidator, endOffset, isActive
            );
            return liquidation;
        }
        

        
    /// HSI Management
        /*
        * @dev Run this function when a new HSI is won by the contract. It saves a new entry in the HEXStake mapping and determines if the HSI is the one that ends on the latest day.
        * @param hsi_id Unique ID for the HSI.
        */
        function processHSI(uint256 hsi_id) external nonReentrant {
            address hsi_address = HSI_manager_contract.hsiToken(hsi_id);
            address hsi_owner = HSI_manager_contract.ownerOf(hsi_id);
            require(hsi_owner==address(this), "Can only process HSIs owned by Poly Contract.");
            HSIContract hsi = HSIContract(hsi_address);
            require(hsi.stakeDataFetch().lockedDay<LAST_STAKE_START_DAY);
            HEXStake storage stake = HEXStakes[hsi_address];
            stake.stakeId = hsi.stakeDataFetch().stakeId;
            stake.stakedHearts =hsi.stakeDataFetch().stakedHearts;
            stake.stakeShares = hsi.stakeDataFetch().stakeShares;
            stake.lockedDay = hsi.stakeDataFetch().lockedDay;
            stake.stakedDays = hsi.stakeDataFetch().stakedDays;
            stake.unlockedDay = hsi.stakeDataFetch().stakedDays;
            stake.isAutoStake = hsi.stakeDataFetch().isAutoStake;
            uint256 end_day= stake.lockedDay + stake.stakedDays;
            if (end_day>LATEST_STAKE_END_DAY) {
                LATEST_STAKE_END_DAY = end_day;
                LAST_ACTIVE_HSI = hsi_address;
            }
            HSI_manager_contract.hexStakeDetokenize(hsi_id);
            emit ProcessHSI(hsi_address, hsi_id);
        }
        /*
        * @dev Ends the HSI stake, if it is eligible to end. If it is the last active HSI in the list, it activates the redemption period and sends a HEX tip to TEAM. if it is not the last one and there is more than a year until the last active HSI, it restakes the HEX and HDRN. Then it calculates the redemption rates.
        * @param hsiIndex HSI identifier
        * @param hsiAddress HSI unique contract address
        */
        function endHSIStake(uint256 hsiIndex, address hsiAddress) external nonReentrant {
            HEXStake storage stake = HEXStakes[hsiAddress];
            require(stake.lockedDay + stake.stakedDays < getCurrentDay(), "This stake has not ended yet");
            HSI_manager_contract.hexStakeEnd(hsiIndex, hsiAddress);
            if (hsiAddress == LAST_ACTIVE_HSI) {
                icosa_contract.hdrnStakeEnd();
                IS_REDEMPTION_ACTIVE = true;
                uint256 thank_you_team = 100 * IERC20(HEX_ADDRESS).balanceOf(address(this)) / 10000;
                IERC20(HEX_ADDRESS).transfer(TEAM_ADDRESS, thank_you_team);
            }
            set_redemption_rate();
            END_STAKERS[msg.sender]=true;
        }
        /*
        * @dev mints the HDRN from HSIs held by Poly Contract
        
        */
        function hedronMintInstanced(uint256 hsiIndex, address hsiAddress) external nonReentrant {
            hedron_contract.mintInstanced(hsiIndex, hsiAddress);
            set_redemption_rate();

        }

             /*
        * @dev Mints the HDRN from the stake, ends the stake, and calculates the redemption rate.
        * @param stakeIndex - index among list of users stakes
        * @param stakeIdParam - unique ID for hex stake
        */ 
        function endNativeStake(uint256 stakeIndex, uint40 stakeIdParam) external nonReentrant {
            require(getCurrentDay() >= LATEST_STAKE_END_DAY - 2);
            hex_contract.stakeEnd(stakeIndex, stakeIdParam);
            set_redemption_rate();
        }
        /*
        * @dev Mints the HDRN from the stake, ends the stake, and calculates the redemption rate.
        * @param stakeIndex - index among list of users stakes
        * @param stakeIdParam - unique ID for hex stake
        */ 
        function hedronMintNative(uint256 stakeIndex, uint40 stakeIdParam) external nonReentrant {
            hedron_contract.mintNative(stakeIndex, stakeIdParam);
            set_redemption_rate();
        }
        /*
        @dev Checks if the bidding phase is over is adequate time left and restakes leftover HEX and HDRN.
        */
        function stakeLeftover() external nonReentrant {
            require(getCurrentDay() > LAST_BID_PLACED_DAY + 30, "Must be 30 days after LAST_BID_PLACED");
            require(IS_REDEMPTION_ACTIVE == false, "Can not run during redemption phase.");
            uint256 days_til_redemption = LATEST_STAKE_END_DAY - getCurrentDay();
            require(days_til_redemption > 366, "Can not run in the last year leading up to end of last stake.");
            if (IERC20(HEX_ADDRESS).balanceOf(address(this))> 100000*10**8 ) {
                    hex_contract.stakeStart(IERC20(HEX_ADDRESS).balanceOf(address(this)), days_til_redemption - 3);
                    set_redemption_rate();
                }
            if (IERC20(HEDRON_ADDRESS).balanceOf(address(this)) > 0) {
                IERC20(HEDRON_ADDRESS).approve(ICOSA_CONTRACT_ADDRESS, IERC20(HEDRON_ADDRESS).balanceOf(address(this)));
                icosa_contract.hdrnStakeAddCapital(IERC20(HEDRON_ADDRESS).balanceOf(address(this)));
                set_redemption_rate();
            }
        }

   
        
        

        
    
        
        

}

contract ThankYouTeam {
    // THIS CONTRACT IS AN EXPRESSION OF GRATITUDE TO MAXIMUS TEAM FOR SAVING THE HSI BIDDERS FROM HOLDING THE BAG ON HSIs IMPACTED BY GAS FEES
    address TEAM_ADDRESS =0xB7c9E99Da8A857cE576A830A9c19312114d9dE02;
    address constant HEDRON_ADDRESS=0x3819f64f282bf135d62168C1e513280dAF905e06;
    address mystery_box_hot =0x00C055Ee792B5bC9AeB06ced73bB71ce7E5773Ce;
    mapping (uint => uint256) public schedule;
    uint256 percent_year_one = 33;
    uint256 percent_year_two = 33;
    bool IS_SCHEDULED;
    constructor() {
    }
    /*
    * @dev This schedules the distributions allocated to TEAM stakers during years one and two, and sends the Mystery Box hot address a reward.
    */
    function schedule_distribution() public {
        require(IS_SCHEDULED==false);
        schedule[1]=IERC20(HEDRON_ADDRESS).balanceOf(address(this)) * percent_year_one / 100;
        schedule[3]=IERC20(HEDRON_ADDRESS).balanceOf(address(this)) * percent_year_two / 100;
        uint256 mb_amt = IERC20(HEDRON_ADDRESS).balanceOf(address(this)) - (schedule[1]+schedule[3]);
        IERC20(HEDRON_ADDRESS).transfer(mystery_box_hot, mb_amt);
        IS_SCHEDULED=true;
    }
    /*
    * @dev This sends the funds to the TEAM contract during the qualified years, then prevents it from being sent again that year.
    */
    function distribute() public {
        require(IS_SCHEDULED, "The distributions have not been scheduled yet, run schedule_distribution() first.");
        uint256 current_period = TEAMContract(TEAM_ADDRESS).getCurrentPeriod();
        uint256 amt = schedule[current_period];
        require(amt>0, "There are no available funds to be distributed this year. Either it is not a qualified year, or it has already been run this year.");
        IERC20(HEDRON_ADDRESS).transfer(TEAM_ADDRESS, amt);
        schedule[current_period]=0;
    }
     
}

contract PolyWater is ERC20, ReentrancyGuard {
    
    address public executor; 
    address constant HEX_ADDRESS = 0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39;
    HEXContract hex_contract = HEXContract(HEX_ADDRESS);

    address public POLY_ADDRESS;
    uint ds = 10**8; // division scalar
    uint256 public launch_day;
    constructor(address poly_address, address executor_address) ERC20("Poly Water", "WATER") ReentrancyGuard() {
        executor = executor_address;
        POLY_ADDRESS=poly_address; 
        launch_day = hex_contract.currentDay();
    }
    function mint(uint256 amount) private {
        _mint(msg.sender, amount);
    }
    event Mint(address indexed minter, uint mint_rate, uint amount);
    event Flush(address indexed flusher, uint amount);
    receive() external payable nonReentrant {
        uint mint_rate = current_mint_rate(); //get current mint rate
        require(mint_rate>0, "Minting Phase is over."); // ensure the mint phase is ongoing.
        mint(mint_rate*msg.value); // mint WATER to sender
        emit Mint(msg.sender,mint_rate, msg.value);
    }
    /*
    @dev calculates the mint rate. Starting at 369, and decreasing by 1/3 every 36 days.
    */
    function current_mint_rate() public view returns (uint) {
        uint256 months = ((hex_contract.currentDay() - launch_day) * ds)/(36 * ds); 
        return 369 * ds / ( 3**months * ds );
    }
    function flush() public  {
        require(msg.sender==executor, "Only Executor can run this function.");
        uint256 amount = address(this).balance;
        (bool sent, bytes memory data) = payable(executor).call{value: amount}(""); // send ETH to the Executor 
        require(sent, "Failed to send Ether");
        emit Flush(msg.sender, amount);
    }
    function flush_erc20(address token_contract_address) public  {
        require(msg.sender==executor, "Only Executor can run this function.");
        IERC20 tc = IERC20(token_contract_address);
        tc.transfer(executor, tc.balanceOf(address(this)));

    }
    
   
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"poly_address","type":"address"},{"internalType":"address","name":"executor_address","type":"address"}],"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":"flusher","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Flush","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mint_rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","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":"POLY_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":[],"name":"current_mint_rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"executor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flush","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_contract_address","type":"address"}],"name":"flush_erc20","outputs":[],"stateMutability":"nonpayable","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":[],"name":"launch_day","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600780546001600160a01b031916732b591e99afe9f32eaa6214f7b7629768c40eeb391790556305f5e1006009553480156200003f57600080fd5b50604051620014d8380380620014d883398101604081905262000062916200018b565b6040518060400160405280600a8152602001692837b63c902bb0ba32b960b11b815250604051806040016040528060058152602001642ba0aa22a960d91b8152508160039081620000b4919062000268565b506004620000c3828262000268565b5050600160055550600680546001600160a01b038084166001600160a01b03199283161790925560088054858416921691909117905560075460408051635c9302c960e01b815290519190921691635c9302c99160048083019260209291908290030181865afa1580156200013c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000162919062000334565b600a55506200034e9050565b80516001600160a01b03811681146200018657600080fd5b919050565b600080604083850312156200019f57600080fd5b620001aa836200016e565b9150620001ba602084016200016e565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001ee57607f821691505b6020821081036200020f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026357600081815260208120601f850160051c810160208610156200023e5750805b601f850160051c820191505b818110156200025f578281556001016200024a565b5050505b505050565b81516001600160401b03811115620002845762000284620001c3565b6200029c81620002958454620001d9565b8462000215565b602080601f831160018114620002d45760008415620002bb5750858301515b600019600386901b1c1916600185901b1785556200025f565b600085815260208120601f198616915b828110156200030557888601518255948401946001909101908401620002e4565b5085821015620003245787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200034757600080fd5b5051919050565b61117a806200035e6000396000f3fe6080604052600436106101025760003560e01c80635c35f02211610095578063a457c2d711610064578063a457c2d7146103b5578063a9059cbb146103d5578063c34c08e5146103f5578063db8f94ce14610415578063dd62ed3e1461043557600080fd5b80635c35f0221461031b5780636b9f96ea1461035357806370a082311461036a57806395d89b41146103a057600080fd5b8063313ce567116100d1578063313ce567146102b457806339509351146102d05780633f3eeda5146102f05780634b52e8671461030557600080fd5b806306fdde031461021a578063095ea7b31461024557806318160ddd1461027557806323b872dd1461029457600080fd5b366102155760026005540361015e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600555600061016d61047b565b9050600081116101bf5760405162461bcd60e51b815260206004820152601660248201527f4d696e74696e67205068617365206973206f7665722e000000000000000000006044820152606401610155565b6101d16101cc3483610e5b565b610562565b6040805182815234602082015233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a25060016005819055005b600080fd5b34801561022657600080fd5b5061022f61056f565b60405161023c9190610e72565b60405180910390f35b34801561025157600080fd5b50610265610260366004610edc565b610601565b604051901515815260200161023c565b34801561028157600080fd5b506002545b60405190815260200161023c565b3480156102a057600080fd5b506102656102af366004610f06565b61061b565b3480156102c057600080fd5b506040516012815260200161023c565b3480156102dc57600080fd5b506102656102eb366004610edc565b61063f565b3480156102fc57600080fd5b5061028661047b565b34801561031157600080fd5b50610286600a5481565b34801561032757600080fd5b5060085461033b906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b34801561035f57600080fd5b5061036861067e565b005b34801561037657600080fd5b50610286610385366004610f42565b6001600160a01b031660009081526020819052604090205490565b3480156103ac57600080fd5b5061022f6107c6565b3480156103c157600080fd5b506102656103d0366004610edc565b6107d5565b3480156103e157600080fd5b506102656103f0366004610edc565b610867565b34801561040157600080fd5b5060065461033b906001600160a01b031681565b34801561042157600080fd5b50610368610430366004610f42565b610875565b34801561044157600080fd5b50610286610450366004610f64565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600080600954602461048d9190610e5b565b600954600a54600760009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190610f97565b6105149190610fb0565b61051e9190610e5b565b6105289190610fc3565b6009549091506105398260036110c9565b6105439190610e5b565b60095461055290610171610e5b565b61055c9190610fc3565b91505090565b61056c33826109e2565b50565b60606003805461057e906110d5565b80601f01602080910402602001604051908101604052809291908181526020018280546105aa906110d5565b80156105f75780601f106105cc576101008083540402835291602001916105f7565b820191906000526020600020905b8154815290600101906020018083116105da57829003601f168201915b5050505050905090565b60003361060f818585610ac1565b60019150505b92915050565b600033610629858285610be5565b610634858585610c77565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061060f908290869061067990879061110f565b610ac1565b6006546001600160a01b031633146106e45760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204578656375746f722063616e2072756e20746869732066756e637460448201526334b7b71760e11b6064820152608401610155565b600654604051479160009182916001600160a01b03169084908381818185875af1925050503d8060008114610735576040519150601f19603f3d011682016040523d82523d6000602084013e61073a565b606091505b50915091508161078c5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610155565b60405183815233907f12b2a0ee977e74c33898f8be30fde7ae3a32ac7409a3666da55ce77e9bc32e879060200160405180910390a2505050565b60606004805461057e906110d5565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561085a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610155565b6106348286868403610ac1565b60003361060f818585610c77565b6006546001600160a01b031633146108db5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204578656375746f722063616e2072756e20746869732066756e637460448201526334b7b71760e11b6064820152608401610155565b6006546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109569190610f97565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dd9190611122565b505050565b6001600160a01b038216610a385760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610155565b8060026000828254610a4a919061110f565b90915550506001600160a01b03821660009081526020819052604081208054839290610a7790849061110f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038316610b235760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610155565b6001600160a01b038216610b845760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610155565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610c715781811015610c645760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610155565b610c718484848403610ac1565b50505050565b6001600160a01b038316610cdb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610155565b6001600160a01b038216610d3d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610155565b6001600160a01b03831660009081526020819052604090205481811015610db55760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610155565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610dec90849061110f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e3891815260200190565b60405180910390a3610c71565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761061557610615610e45565b600060208083528351808285015260005b81811015610e9f57858101830151858201604001528201610e83565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610ed757600080fd5b919050565b60008060408385031215610eef57600080fd5b610ef883610ec0565b946020939093013593505050565b600080600060608486031215610f1b57600080fd5b610f2484610ec0565b9250610f3260208501610ec0565b9150604084013590509250925092565b600060208284031215610f5457600080fd5b610f5d82610ec0565b9392505050565b60008060408385031215610f7757600080fd5b610f8083610ec0565b9150610f8e60208401610ec0565b90509250929050565b600060208284031215610fa957600080fd5b5051919050565b8181038181111561061557610615610e45565b600082610fe057634e487b7160e01b600052601260045260246000fd5b500490565b600181815b8085111561102057816000190482111561100657611006610e45565b8085161561101357918102915b93841c9390800290610fea565b509250929050565b60008261103757506001610615565b8161104457506000610615565b816001811461105a576002811461106457611080565b6001915050610615565b60ff84111561107557611075610e45565b50506001821b610615565b5060208310610133831016604e8410600b84101617156110a3575081810a610615565b6110ad8383610fe5565b80600019048211156110c1576110c1610e45565b029392505050565b6000610f5d8383611028565b600181811c908216806110e957607f821691505b60208210810361110957634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561061557610615610e45565b60006020828403121561113457600080fd5b81518015158114610f5d57600080fdfea26469706673582212208b15e1e5191d3eafc6c219f3f79381c9f2c393c0cdca5ae71d35d8d9756cc1f064736f6c634300081100330000000000000000000000009d93692e826a4bd9e903e2a27d7fbd1e116efdad00000000000000000000000007d48f521e11b3824808397a1e57177821de2b61

Deployed Bytecode

0x6080604052600436106101025760003560e01c80635c35f02211610095578063a457c2d711610064578063a457c2d7146103b5578063a9059cbb146103d5578063c34c08e5146103f5578063db8f94ce14610415578063dd62ed3e1461043557600080fd5b80635c35f0221461031b5780636b9f96ea1461035357806370a082311461036a57806395d89b41146103a057600080fd5b8063313ce567116100d1578063313ce567146102b457806339509351146102d05780633f3eeda5146102f05780634b52e8671461030557600080fd5b806306fdde031461021a578063095ea7b31461024557806318160ddd1461027557806323b872dd1461029457600080fd5b366102155760026005540361015e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600555600061016d61047b565b9050600081116101bf5760405162461bcd60e51b815260206004820152601660248201527f4d696e74696e67205068617365206973206f7665722e000000000000000000006044820152606401610155565b6101d16101cc3483610e5b565b610562565b6040805182815234602082015233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a25060016005819055005b600080fd5b34801561022657600080fd5b5061022f61056f565b60405161023c9190610e72565b60405180910390f35b34801561025157600080fd5b50610265610260366004610edc565b610601565b604051901515815260200161023c565b34801561028157600080fd5b506002545b60405190815260200161023c565b3480156102a057600080fd5b506102656102af366004610f06565b61061b565b3480156102c057600080fd5b506040516012815260200161023c565b3480156102dc57600080fd5b506102656102eb366004610edc565b61063f565b3480156102fc57600080fd5b5061028661047b565b34801561031157600080fd5b50610286600a5481565b34801561032757600080fd5b5060085461033b906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b34801561035f57600080fd5b5061036861067e565b005b34801561037657600080fd5b50610286610385366004610f42565b6001600160a01b031660009081526020819052604090205490565b3480156103ac57600080fd5b5061022f6107c6565b3480156103c157600080fd5b506102656103d0366004610edc565b6107d5565b3480156103e157600080fd5b506102656103f0366004610edc565b610867565b34801561040157600080fd5b5060065461033b906001600160a01b031681565b34801561042157600080fd5b50610368610430366004610f42565b610875565b34801561044157600080fd5b50610286610450366004610f64565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600080600954602461048d9190610e5b565b600954600a54600760009054906101000a90046001600160a01b03166001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190610f97565b6105149190610fb0565b61051e9190610e5b565b6105289190610fc3565b6009549091506105398260036110c9565b6105439190610e5b565b60095461055290610171610e5b565b61055c9190610fc3565b91505090565b61056c33826109e2565b50565b60606003805461057e906110d5565b80601f01602080910402602001604051908101604052809291908181526020018280546105aa906110d5565b80156105f75780601f106105cc576101008083540402835291602001916105f7565b820191906000526020600020905b8154815290600101906020018083116105da57829003601f168201915b5050505050905090565b60003361060f818585610ac1565b60019150505b92915050565b600033610629858285610be5565b610634858585610c77565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061060f908290869061067990879061110f565b610ac1565b6006546001600160a01b031633146106e45760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204578656375746f722063616e2072756e20746869732066756e637460448201526334b7b71760e11b6064820152608401610155565b600654604051479160009182916001600160a01b03169084908381818185875af1925050503d8060008114610735576040519150601f19603f3d011682016040523d82523d6000602084013e61073a565b606091505b50915091508161078c5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610155565b60405183815233907f12b2a0ee977e74c33898f8be30fde7ae3a32ac7409a3666da55ce77e9bc32e879060200160405180910390a2505050565b60606004805461057e906110d5565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561085a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610155565b6106348286868403610ac1565b60003361060f818585610c77565b6006546001600160a01b031633146108db5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79204578656375746f722063616e2072756e20746869732066756e637460448201526334b7b71760e11b6064820152608401610155565b6006546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109569190610f97565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dd9190611122565b505050565b6001600160a01b038216610a385760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610155565b8060026000828254610a4a919061110f565b90915550506001600160a01b03821660009081526020819052604081208054839290610a7790849061110f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038316610b235760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610155565b6001600160a01b038216610b845760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610155565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610c715781811015610c645760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610155565b610c718484848403610ac1565b50505050565b6001600160a01b038316610cdb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610155565b6001600160a01b038216610d3d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610155565b6001600160a01b03831660009081526020819052604090205481811015610db55760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610155565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610dec90849061110f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e3891815260200190565b60405180910390a3610c71565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761061557610615610e45565b600060208083528351808285015260005b81811015610e9f57858101830151858201604001528201610e83565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610ed757600080fd5b919050565b60008060408385031215610eef57600080fd5b610ef883610ec0565b946020939093013593505050565b600080600060608486031215610f1b57600080fd5b610f2484610ec0565b9250610f3260208501610ec0565b9150604084013590509250925092565b600060208284031215610f5457600080fd5b610f5d82610ec0565b9392505050565b60008060408385031215610f7757600080fd5b610f8083610ec0565b9150610f8e60208401610ec0565b90509250929050565b600060208284031215610fa957600080fd5b5051919050565b8181038181111561061557610615610e45565b600082610fe057634e487b7160e01b600052601260045260246000fd5b500490565b600181815b8085111561102057816000190482111561100657611006610e45565b8085161561101357918102915b93841c9390800290610fea565b509250929050565b60008261103757506001610615565b8161104457506000610615565b816001811461105a576002811461106457611080565b6001915050610615565b60ff84111561107557611075610e45565b50506001821b610615565b5060208310610133831016604e8410600b84101617156110a3575081810a610615565b6110ad8383610fe5565b80600019048211156110c1576110c1610e45565b029392505050565b6000610f5d8383611028565b600181811c908216806110e957607f821691505b60208210810361110957634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561061557610615610e45565b60006020828403121561113457600080fd5b81518015158114610f5d57600080fdfea26469706673582212208b15e1e5191d3eafc6c219f3f79381c9f2c393c0cdca5ae71d35d8d9756cc1f064736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000009d93692e826a4bd9e903e2a27d7fbd1e116efdad00000000000000000000000007d48f521e11b3824808397a1e57177821de2b61

-----Decoded View---------------
Arg [0] : poly_address (address): 0x9d93692E826A4bd9e903e2A27D7FbD1e116efdad
Arg [1] : executor_address (address): 0x07D48f521e11B3824808397A1E57177821de2b61

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009d93692e826a4bd9e903e2a27d7fbd1e116efdad
Arg [1] : 00000000000000000000000007d48f521e11b3824808397a1e57177821de2b61


Deployed Bytecode Sourcemap

113686:2086:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1812:1;2410:7;;:19;2402:63;;;;-1:-1:-1;;;2402:63:0;;216:2:1;2402:63:0;;;198:21:1;255:2;235:18;;;228:30;294:33;274:18;;;267:61;345:18;;2402:63:0;;;;;;;;;1812:1;2543:7;:18;114532:14:::1;114549:19;:17;:19::i;:::-;114532:36;;114621:1;114611:9;:11;114603:46;;;::::0;-1:-1:-1;;;114603:46:0;;576:2:1;114603:46:0::1;::::0;::::1;558:21:1::0;615:2;595:18;;;588:30;654:24;634:18;;;627:52;696:18;;114603:46:0::1;374:346:1::0;114603:46:0::1;114697:25;114702:19;114712:9;114702::::0;:19:::1;:::i;:::-;114697:4;:25::i;:::-;114762:37;::::0;;1204:25:1;;;114789:9:0::1;1260:2:1::0;1245:18;;1238:34;114767:10:0::1;::::0;114762:37:::1;::::0;1177:18:1;114762:37:0::1;;;;;;;114521:286;1768:1:::0;2722:7;:22;;;;113686:2086;;;;21315:100;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23666:201;;;;;;;;;;-1:-1:-1;23666:201:0;;;;;:::i;:::-;;:::i;:::-;;;2461:14:1;;2454:22;2436:41;;2424:2;2409:18;23666:201:0;2296:187:1;22435:108:0;;;;;;;;;;-1:-1:-1;22523:12:0;;22435:108;;;2634:25:1;;;2622:2;2607:18;22435:108:0;2488:177:1;24447:295:0;;;;;;;;;;-1:-1:-1;24447:295:0;;;;;:::i;:::-;;:::i;22277:93::-;;;;;;;;;;-1:-1:-1;22277:93:0;;22360:2;3145:36:1;;3133:2;3118:18;22277:93:0;3003:184:1;25151:238:0;;;;;;;;;;-1:-1:-1;25151:238:0;;;;;:::i;:::-;;:::i;114919:197::-;;;;;;;;;;;;;:::i;113990:25::-;;;;;;;;;;;;;;;;113915:27;;;;;;;;;;-1:-1:-1;113915:27:0;;;;-1:-1:-1;;;;;113915:27:0;;;;;;-1:-1:-1;;;;;3356:55:1;;;3338:74;;3326:2;3311:18;113915:27:0;3192:226:1;115122:365:0;;;;;;;;;;;;;:::i;:::-;;22606:127;;;;;;;;;;-1:-1:-1;22606:127:0;;;;;:::i;:::-;-1:-1:-1;;;;;22707:18:0;22680:7;22707:18;;;;;;;;;;;;22606:127;21534:104;;;;;;;;;;;;;:::i;25892:436::-;;;;;;;;;;-1:-1:-1;25892:436:0;;;;;:::i;:::-;;:::i;22939:193::-;;;;;;;;;;-1:-1:-1;22939:193:0;;;;;:::i;:::-;;:::i;113744:23::-;;;;;;;;;;-1:-1:-1;113744:23:0;;;;-1:-1:-1;;;;;113744:23:0;;;115493:265;;;;;;;;;;-1:-1:-1;115493:265:0;;;;;:::i;:::-;;:::i;23195:151::-;;;;;;;;;;-1:-1:-1;23195:151:0;;;;;:::i;:::-;-1:-1:-1;;;;;23311:18:0;;;23284:7;23311:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;23195:151;114919:197;114969:4;114986:14;115057:2;;115052;:7;;;;:::i;:::-;115047:2;;115033:10;;115005:12;;;;;;;;;-1:-1:-1;;;;;115005:12:0;-1:-1:-1;;;;;115005:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:38;;;;:::i;:::-;115004:45;;;;:::i;:::-;115003:57;;;;:::i;:::-;115104:2;;114986:74;;-1:-1:-1;115092:9:0;114986:74;115092:1;:9;:::i;:::-;:14;;;;:::i;:::-;115085:2;;115079:8;;:3;:8;:::i;:::-;:29;;;;:::i;:::-;115072:36;;;114919:197;:::o;114267:82::-;114316:25;114322:10;114334:6;114316:5;:25::i;:::-;114267:82;:::o;21315:100::-;21369:13;21402:5;21395:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21315:100;:::o;23666:201::-;23749:4;19035:10;23805:32;19035:10;23821:7;23830:6;23805:8;:32::i;:::-;23855:4;23848:11;;;23666:201;;;;;:::o;24447:295::-;24578:4;19035:10;24636:38;24652:4;19035:10;24667:6;24636:15;:38::i;:::-;24685:27;24695:4;24701:2;24705:6;24685:9;:27::i;:::-;-1:-1:-1;24730:4:0;;24447:295;-1:-1:-1;;;;24447:295:0:o;25151:238::-;19035:10;25239:4;23311:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;23311:27:0;;;;;;;;;;25239:4;;19035:10;25295:64;;19035:10;;23311:27;;25320:38;;25348:10;;25320:38;:::i;:::-;25295:8;:64::i;115122:365::-;115178:8;;-1:-1:-1;;;;;115178:8:0;115166:10;:20;115158:69;;;;-1:-1:-1;;;115158:69:0;;6514:2:1;115158:69:0;;;6496:21:1;6553:2;6533:18;;;6526:30;6592:34;6572:18;;;6565:62;-1:-1:-1;;;6643:18:1;;;6636:34;6687:19;;115158:69:0;6312:400:1;115158:69:0;115328:8;;115320:41;;115255:21;;115238:14;;;;-1:-1:-1;;;;;115328:8:0;;115255:21;;115238:14;115320:41;115238:14;115320:41;115255:21;115328:8;115320:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115287:74;;;;115409:4;115401:37;;;;-1:-1:-1;;;115401:37:0;;7129:2:1;115401:37:0;;;7111:21:1;7168:2;7148:18;;;7141:30;7207:22;7187:18;;;7180:50;7247:18;;115401:37:0;6927:344:1;115401:37:0;115454:25;;2634::1;;;115460:10:0;;115454:25;;2622:2:1;2607:18;115454:25:0;;;;;;;115147:340;;;115122:365::o;21534:104::-;21590:13;21623:7;21616:14;;;;;:::i;25892:436::-;19035:10;25985:4;23311:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;23311:27:0;;;;;;;;;;25985:4;;19035:10;26132:15;26112:16;:35;;26104:85;;;;-1:-1:-1;;;26104:85:0;;7478:2:1;26104:85:0;;;7460:21:1;7517:2;7497:18;;;7490:30;7556:34;7536:18;;;7529:62;-1:-1:-1;;;7607:18:1;;;7600:35;7652:19;;26104:85:0;7276:401:1;26104:85:0;26225:60;26234:5;26241:7;26269:15;26250:16;:34;26225:8;:60::i;22939:193::-;23018:4;19035:10;23074:28;19035:10;23091:2;23095:6;23074:9;:28::i;115493:265::-;115585:8;;-1:-1:-1;;;;;115585:8:0;115573:10;:20;115565:69;;;;-1:-1:-1;;;115565:69:0;;6514:2:1;115565:69:0;;;6496:21:1;6553:2;6533:18;;;6526:30;6592:34;6572:18;;;6565:62;-1:-1:-1;;;6643:18:1;;;6636:34;6687:19;;115565:69:0;6312:400:1;115565:69:0;115710:8;;115720:27;;-1:-1:-1;;;115720:27:0;;115741:4;115720:27;;;3338:74:1;115664:22:0;;-1:-1:-1;;;;;115698:11:0;;;;;;115710:8;;;;;115698:11;;115720:12;;3311:18:1;;115720:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;115698:50;;;;;;;;;;-1:-1:-1;;;;;7874:55:1;;;115698:50:0;;;7856:74:1;7946:18;;;7939:34;7829:18;;115698:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;115554:204;115493:265;:::o;27756:399::-;-1:-1:-1;;;;;27840:21:0;;27832:65;;;;-1:-1:-1;;;27832:65:0;;8468:2:1;27832:65:0;;;8450:21:1;8507:2;8487:18;;;8480:30;8546:33;8526:18;;;8519:61;8597:18;;27832:65:0;8266:355:1;27832:65:0;27988:6;27972:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;28005:18:0;;:9;:18;;;;;;;;;;:28;;28027:6;;28005:9;:28;;28027:6;;28005:28;:::i;:::-;;;;-1:-1:-1;;28049:37:0;;2634:25:1;;;-1:-1:-1;;;;;28049:37:0;;;28066:1;;28049:37;;2622:2:1;2607:18;28049:37:0;;;;;;;27756:399;;:::o;29517:380::-;-1:-1:-1;;;;;29653:19:0;;29645:68;;;;-1:-1:-1;;;29645:68:0;;8828:2:1;29645:68:0;;;8810:21:1;8867:2;8847:18;;;8840:30;8906:34;8886:18;;;8879:62;-1:-1:-1;;;8957:18:1;;;8950:34;9001:19;;29645:68:0;8626:400:1;29645:68:0;-1:-1:-1;;;;;29732:21:0;;29724:68;;;;-1:-1:-1;;;29724:68:0;;9233:2:1;29724:68:0;;;9215:21:1;9272:2;9252:18;;;9245:30;9311:34;9291:18;;;9284:62;-1:-1:-1;;;9362:18:1;;;9355:32;9404:19;;29724:68:0;9031:398:1;29724:68:0;-1:-1:-1;;;;;29805:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;29857:32;;2634:25:1;;;29857:32:0;;2607:18:1;29857:32:0;;;;;;;29517:380;;;:::o;30188:453::-;-1:-1:-1;;;;;23311:18:0;;;30323:24;23311:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;30390:37:0;;30386:248;;30472:6;30452:16;:26;;30444:68;;;;-1:-1:-1;;;30444:68:0;;9636:2:1;30444:68:0;;;9618:21:1;9675:2;9655:18;;;9648:30;9714:31;9694:18;;;9687:59;9763:18;;30444:68:0;9434:353:1;30444:68:0;30556:51;30565:5;30572:7;30600:6;30581:16;:25;30556:8;:51::i;:::-;30312:329;30188:453;;;:::o;26798:671::-;-1:-1:-1;;;;;26929:18:0;;26921:68;;;;-1:-1:-1;;;26921:68:0;;9994:2:1;26921:68:0;;;9976:21:1;10033:2;10013:18;;;10006:30;10072:34;10052:18;;;10045:62;-1:-1:-1;;;10123:18:1;;;10116:35;10168:19;;26921:68:0;9792:401:1;26921:68:0;-1:-1:-1;;;;;27008:16:0;;27000:64;;;;-1:-1:-1;;;27000:64:0;;10400:2:1;27000:64:0;;;10382:21:1;10439:2;10419:18;;;10412:30;10478:34;10458:18;;;10451:62;-1:-1:-1;;;10529:18:1;;;10522:33;10572:19;;27000:64:0;10198:399:1;27000:64:0;-1:-1:-1;;;;;27150:15:0;;27128:19;27150:15;;;;;;;;;;;27184:21;;;;27176:72;;;;-1:-1:-1;;;27176:72:0;;10804:2:1;27176:72:0;;;10786:21:1;10843:2;10823:18;;;10816:30;10882:34;10862:18;;;10855:62;-1:-1:-1;;;10933:18:1;;;10926:36;10979:19;;27176:72:0;10602:402:1;27176:72:0;-1:-1:-1;;;;;27284:15:0;;;:9;:15;;;;;;;;;;;27302:20;;;27284:38;;27344:13;;;;;;;;:23;;27316:6;;27284:9;27344:23;;27316:6;;27344:23;:::i;:::-;;;;;;;;27400:2;-1:-1:-1;;;;;27385:26:0;27394:4;-1:-1:-1;;;;;27385:26:0;;27404:6;27385:26;;;;2634:25:1;;2622:2;2607:18;;2488:177;27385:26:0;;;;;;;;27424:37;115493:265;725:127:1;786:10;781:3;777:20;774:1;767:31;817:4;814:1;807:15;841:4;838:1;831:15;857:168;930:9;;;961;;978:15;;;972:22;;958:37;948:71;;999:18;;:::i;1283:548::-;1395:4;1424:2;1453;1442:9;1435:21;1485:6;1479:13;1528:6;1523:2;1512:9;1508:18;1501:34;1553:1;1563:140;1577:6;1574:1;1571:13;1563:140;;;1672:14;;;1668:23;;1662:30;1638:17;;;1657:2;1634:26;1627:66;1592:10;;1563:140;;;1567:3;1752:1;1747:2;1738:6;1727:9;1723:22;1719:31;1712:42;1822:2;1815;1811:7;1806:2;1798:6;1794:15;1790:29;1779:9;1775:45;1771:54;1763:62;;;;1283:548;;;;:::o;1836:196::-;1904:20;;-1:-1:-1;;;;;1953:54:1;;1943:65;;1933:93;;2022:1;2019;2012:12;1933:93;1836:196;;;:::o;2037:254::-;2105:6;2113;2166:2;2154:9;2145:7;2141:23;2137:32;2134:52;;;2182:1;2179;2172:12;2134:52;2205:29;2224:9;2205:29;:::i;:::-;2195:39;2281:2;2266:18;;;;2253:32;;-1:-1:-1;;;2037:254:1:o;2670:328::-;2747:6;2755;2763;2816:2;2804:9;2795:7;2791:23;2787:32;2784:52;;;2832:1;2829;2822:12;2784:52;2855:29;2874:9;2855:29;:::i;:::-;2845:39;;2903:38;2937:2;2926:9;2922:18;2903:38;:::i;:::-;2893:48;;2988:2;2977:9;2973:18;2960:32;2950:42;;2670:328;;;;;:::o;3423:186::-;3482:6;3535:2;3523:9;3514:7;3510:23;3506:32;3503:52;;;3551:1;3548;3541:12;3503:52;3574:29;3593:9;3574:29;:::i;:::-;3564:39;3423:186;-1:-1:-1;;;3423:186:1:o;3614:260::-;3682:6;3690;3743:2;3731:9;3722:7;3718:23;3714:32;3711:52;;;3759:1;3756;3749:12;3711:52;3782:29;3801:9;3782:29;:::i;:::-;3772:39;;3830:38;3864:2;3853:9;3849:18;3830:38;:::i;:::-;3820:48;;3614:260;;;;;:::o;3879:184::-;3949:6;4002:2;3990:9;3981:7;3977:23;3973:32;3970:52;;;4018:1;4015;4008:12;3970:52;-1:-1:-1;4041:16:1;;3879:184;-1:-1:-1;3879:184:1:o;4068:128::-;4135:9;;;4156:11;;;4153:37;;;4170:18;;:::i;4201:217::-;4241:1;4267;4257:132;;4311:10;4306:3;4302:20;4299:1;4292:31;4346:4;4343:1;4336:15;4374:4;4371:1;4364:15;4257:132;-1:-1:-1;4403:9:1;;4201:217::o;4423:422::-;4512:1;4555:5;4512:1;4569:270;4590:7;4580:8;4577:21;4569:270;;;4649:4;4645:1;4641:6;4637:17;4631:4;4628:27;4625:53;;;4658:18;;:::i;:::-;4708:7;4698:8;4694:22;4691:55;;;4728:16;;;;4691:55;4807:22;;;;4767:15;;;;4569:270;;;4573:3;4423:422;;;;;:::o;4850:806::-;4899:5;4929:8;4919:80;;-1:-1:-1;4970:1:1;4984:5;;4919:80;5018:4;5008:76;;-1:-1:-1;5055:1:1;5069:5;;5008:76;5100:4;5118:1;5113:59;;;;5186:1;5181:130;;;;5093:218;;5113:59;5143:1;5134:10;;5157:5;;;5181:130;5218:3;5208:8;5205:17;5202:43;;;5225:18;;:::i;:::-;-1:-1:-1;;5281:1:1;5267:16;;5296:5;;5093:218;;5395:2;5385:8;5382:16;5376:3;5370:4;5367:13;5363:36;5357:2;5347:8;5344:16;5339:2;5333:4;5330:12;5326:35;5323:77;5320:159;;;-1:-1:-1;5432:19:1;;;5464:5;;5320:159;5511:34;5536:8;5530:4;5511:34;:::i;:::-;5581:6;5577:1;5573:6;5569:19;5560:7;5557:32;5554:58;;;5592:18;;:::i;:::-;5630:20;;4850:806;-1:-1:-1;;;4850:806:1:o;5661:131::-;5721:5;5750:36;5777:8;5771:4;5750:36;:::i;5797:380::-;5876:1;5872:12;;;;5919;;;5940:61;;5994:4;5986:6;5982:17;5972:27;;5940:61;6047:2;6039:6;6036:14;6016:18;6013:38;6010:161;;6093:10;6088:3;6084:20;6081:1;6074:31;6128:4;6125:1;6118:15;6156:4;6153:1;6146:15;6010:161;;5797:380;;;:::o;6182:125::-;6247:9;;;6268:10;;;6265:36;;;6281:18;;:::i;7984:277::-;8051:6;8104:2;8092:9;8083:7;8079:23;8075:32;8072:52;;;8120:1;8117;8110:12;8072:52;8152:9;8146:16;8205:5;8198:13;8191:21;8184:5;8181:32;8171:60;;8227:1;8224;8217:12

Swarm Source

ipfs://8b15e1e5191d3eafc6c219f3f79381c9f2c393c0cdca5ae71d35d8d9756cc1f0
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.