ETH Price: $2,624.87 (-1.81%)

Contract

0x24217Ed5637C1Da8e7760c4b2D09774126083D93
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve192181452024-02-13 9:16:59362 days ago1707815819IN
0x24217Ed5...126083D93
0 ETH0.0012951126.9020576
Approve192156452024-02-13 0:54:11363 days ago1707785651IN
0x24217Ed5...126083D93
0 ETH0.0021155143.61704106
Approve192156312024-02-13 0:51:23363 days ago1707785483IN
0x24217Ed5...126083D93
0 ETH0.0014820530.78508831
Approve192155492024-02-13 0:34:47363 days ago1707784487IN
0x24217Ed5...126083D93
0 ETH0.0021782144.96533939
Approve192155452024-02-13 0:33:47363 days ago1707784427IN
0x24217Ed5...126083D93
0 ETH0.0015789332.59443389
Approve192155432024-02-13 0:33:23363 days ago1707784403IN
0x24217Ed5...126083D93
0 ETH0.0015584932.17230671
Approve192154892024-02-13 0:22:35363 days ago1707783755IN
0x24217Ed5...126083D93
0 ETH0.0023206447.84639766
Approve192153832024-02-13 0:01:11363 days ago1707782471IN
0x24217Ed5...126083D93
0 ETH0.0035550873.2976292
Approve192153802024-02-13 0:00:35363 days ago1707782435IN
0x24217Ed5...126083D93
0 ETH0.0028346458.44391129
Transfer192153792024-02-13 0:00:23363 days ago1707782423IN
0x24217Ed5...126083D93
0 ETH0.0051031355.09936385
Approve192153772024-02-12 23:59:59363 days ago1707782399IN
0x24217Ed5...126083D93
0 ETH0.0028798659.37618094
Approve192153662024-02-12 23:57:47363 days ago1707782267IN
0x24217Ed5...126083D93
0 ETH0.0032607767.22960322
Set Mint Enabled192153552024-02-12 23:55:35363 days ago1707782135IN
0x24217Ed5...126083D93
0 ETH0.0018354976.49487403
Set Reward Fees192153512024-02-12 23:54:35363 days ago1707782075IN
0x24217Ed5...126083D93
0 ETH0.0020728471.86140769
Set Max Buy192153492024-02-12 23:54:11363 days ago1707782051IN
0x24217Ed5...126083D93
0 ETH0.0020774972.14522585
Approve192153402024-02-12 23:52:23363 days ago1707781943IN
0x24217Ed5...126083D93
0 ETH0.0036331174.99918636
Approve192153332024-02-12 23:50:59363 days ago1707781859IN
0x24217Ed5...126083D93
0 ETH0.0028239358.29512629
Approve192153302024-02-12 23:50:23363 days ago1707781823IN
0x24217Ed5...126083D93
0 ETH0.002834958.4492442
Set Uniswap Pair192153282024-02-12 23:49:59363 days ago1707781799IN
0x24217Ed5...126083D93
0 ETH0.0016493456.80740476
Set Whitelist192153262024-02-12 23:49:35363 days ago1707781775IN
0x24217Ed5...126083D93
0 ETH0.0028894359.27778088
Approve192153192024-02-12 23:48:11363 days ago1707781691IN
0x24217Ed5...126083D93
0 ETH0.0030233262.41122085
Approve192153162024-02-12 23:47:35363 days ago1707781655IN
0x24217Ed5...126083D93
0 ETH0.0031831766.03821719
Set Uniswap Pair192153072024-02-12 23:45:47363 days ago1707781547IN
0x24217Ed5...126083D93
0 ETH0.0018128362.93271262
Approve192152982024-02-12 23:43:47363 days ago1707781427IN
0x24217Ed5...126083D93
0 ETH0.0028797259.37337168
Approve192152982024-02-12 23:43:47363 days ago1707781427IN
0x24217Ed5...126083D93
0 ETH0.003364769.37240168
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Chappie

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 11 : Chappie.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "./lib/ERC404.sol";

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Chappie is Ownable, ERC404 {
    string public dataURI = "";
    string public baseURI = "";

    constructor(
        address _owner
    ) ERC404("Chappie", "CHP", 18) Ownable(_owner) {
        _mintERC20(_owner, 2004 * units, false);
        _setWhitelist(_owner, true);
    }

    function setDataURI(string memory dataURI_) public onlyOwner {
        dataURI = dataURI_;
    }

    function setBaseURI(string memory baseURI_) public onlyOwner {
        baseURI = baseURI_;
    }

    function tokenURI(uint256 id) public view override returns (string memory) {
        if (bytes(baseURI).length > 0) {
            return string.concat(string.concat(baseURI, Strings.toString(id), ".json"));
        } else {
            string memory jsonPreImage = string.concat(
                string.concat(
                    string.concat('{"name": "Chappie #', Strings.toString(id)),
                    '","description":"CHAPPIE is the first experimental ERC 404 DIVIDEND token on Ethereum.","external_url":"https://chappie.build","image":"'
                ),
                dataURI
            );
            string memory jsonPostImage = '"}';

            return
                string.concat(
                    "data:application/json;utf8,",
                    string.concat(jsonPreImage, jsonPostImage)
            );
        }
    }

    function setWhitelist(address account_, bool value_) external onlyOwner {
        _setWhitelist(account_, value_);
    }
}

File 2 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 3 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 4 of 11 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    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.
     */
    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.
     */
    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.
     */
    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.
     */
    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 largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 5 of 11 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 6 of 11 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        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_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 7 of 11 : ERC404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC404} from "./interfaces/IERC404.sol";
import {ERC721Receiver} from "./lib/ERC721Receiver.sol";
import {DoubleEndedQueue} from "./lib/DoubleEndedQueue.sol";
import {IERC165} from "./lib/interfaces/IERC165.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

abstract contract ERC404 is IERC404, Ownable {
  using DoubleEndedQueue for DoubleEndedQueue.Uint256Deque;

  /// @dev The queue of ERC-721 tokens stored in the contract.
  DoubleEndedQueue.Uint256Deque private _storedERC721Ids;

  /// @dev Token name
  string public name;

  /// @dev Token symbol
  string public symbol;

  /// @dev Decimals for ERC-20 representation
  uint8 public immutable decimals;

  /// @dev Units for ERC-20 representation
  uint256 public immutable units;

  /// @dev Total supply in ERC-20 representation
  uint256 public totalSupply;

  /// @dev Current mint counter which also represents the highest
  ///      minted id, monotonically increasing to ensure accurate ownership
  uint256 internal _minted;

  /// @dev Initial chain id for EIP-2612 support
  uint256 internal immutable INITIAL_CHAIN_ID;

  /// @dev Initial domain separator for EIP-2612 support
  bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

  /// @dev Balance of user in ERC-20 representation
  mapping(address => uint256) public balanceOf;

  /// @dev Allowance of user in ERC-20 representation
  mapping(address => mapping(address => uint256)) public allowance;

  /// @dev Approval in ERC-721 representaion
  mapping(uint256 => address) public getApproved;

  /// @dev Approval for all in ERC-721 representation
  mapping(address => mapping(address => bool)) public isApprovedForAll;

  /// @dev Packed representation of ownerOf and owned indices
  mapping(uint256 => uint256) internal _ownedData;

  /// @dev Array of owned ids in ERC-721 representation
  mapping(address => uint256[]) internal _owned;

  /// @dev Addresses whitelisted from minting / banking for gas savings (pairs, routers, etc)
  mapping(address => bool) public whitelist;

  /// @dev EIP-2612 nonces
  mapping(address => uint256) public nonces;

  /// @dev Address bitmask for packed ownership data
  uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

  /// @dev Owned index bitmask for packed ownership data
  uint256 private constant _BITMASK_OWNED_INDEX = ((1 << 96) - 1) << 160;

  // =============
  // REWARD SYSTEM
  // =============

  /// @dev calculatedRewards for each wallet
  mapping(address => uint256) public calculatedRewards;

  /// @dev
  mapping(address => uint256) public lastCalculatedDay;

  /// @dev
  mapping(uint256 => uint256) public rewardsAmountPerDay;

  /// @dev
  mapping(uint256 => uint256) public poolAmountPerDay;

  /// @dev Pair address
  address public pair = address(1);

  /// @dev 5% of selling fees for rewards pool
  uint8 public rewardFees = 3;

  /// @dev
  uint256 public lastRewardDay = block.timestamp / (1 days);

  /// @dev 20% of the rewards pool
  uint256 public rewardsPoolPercent = 20;

  /// @dev
  uint256 public totalUnCalculatedAmount = 0;

  /// @dev
  uint256 public totalUnClaimedAmount = 0;

  /// @dev 1 for the minimum tokens needed
  uint256 public minimumTokenForRewards = 1 * 10 ** 18;

  /// @dev 10 max buy
  uint256 public maxBuy = 100 * 10 ** 18;

  bool public mintEnabled = false;

  constructor(string memory name_, string memory symbol_, uint8 decimals_) {
    name = name_;
    symbol = symbol_;

    if (decimals_ < 18) {
      revert DecimalsTooLow();
    }

    decimals = decimals_;
    units = 10 ** decimals;

    // EIP-2612 initialization
    INITIAL_CHAIN_ID = block.chainid;
    INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator();
  }

  /// @notice Function to find owner of a given ERC-721 token
  function ownerOf(
    uint256 id_
  ) public view virtual returns (address erc721Owner) {
    erc721Owner = _getOwnerOf(id_);

    // If the id_ is beyond the range of minted tokens, is 0, or the token is not owned by anyone, revert.
    if (id_ > _minted || id_ == 0 || erc721Owner == address(0)) {
      revert NotFound();
    }
  }

  function owned(
    address owner_
  ) public view virtual returns (uint256[] memory) {
    return _owned[owner_];
  }

  function erc721BalanceOf(
    address owner_
  ) public view virtual returns (uint256) {
    return _owned[owner_].length;
  }

  function erc20BalanceOf(
    address owner_
  ) public view virtual returns (uint256) {
    return balanceOf[owner_];
  }

  function erc20TotalSupply() public view virtual returns (uint256) {
    return totalSupply;
  }

  function erc721TotalSupply() public view virtual returns (uint256) {
    return _minted;
  }

  function erc721TokensBankedInQueue() public view virtual returns (uint256) {
    return _storedERC721Ids.length();
  }

  function setUniswapPair(address pair_) public onlyOwner {
    pair = pair_;
  }

  function setMintEnabled(bool mintEnabled_) public onlyOwner {
    mintEnabled = mintEnabled_;
  }

  function setRewardFees(uint8 rewardFees_) public onlyOwner {
    require(rewardFees_ < 10, "Fees can't be greater than 10%");
    rewardFees = rewardFees_;
  }

  function setMaxBuy(uint256 maxBuy_) public onlyOwner {
    maxBuy = maxBuy_;
  }

  /// @notice tokenURI must be implemented by child contract
  function tokenURI(uint256 id_) public view virtual returns (string memory);

  /// @notice Function for token approvals
  /// @dev This function assumes the operator is attempting to approve an ERC-721
  ///      if valueOrId is less than the minted count. Note: Unlike setApprovalForAll,
  ///      spender_ must be allowed to be 0x0 so that approval can be revoked.
  function approve(
    address spender_,
    uint256 valueOrId_
  ) public virtual returns (bool) {
    // The ERC-721 tokens are 1-indexed, so 0 is not a valid id and indicates that
    // operator is attempting to set the ERC-20 allowance to 0.
    if (valueOrId_ <= _minted && valueOrId_ > 0) {
      // Intention is to approve as ERC-721 token (id).
      uint256 id = valueOrId_;
      address erc721Owner = _getOwnerOf(id);

      if (
        msg.sender != erc721Owner && !isApprovedForAll[erc721Owner][msg.sender]
      ) {
        revert Unauthorized();
      }

      getApproved[id] = spender_;

      emit ERC721Approval(erc721Owner, spender_, id);
    } else {
      // Prevent granting 0x0 an ERC-20 allowance.
      if (spender_ == address(0)) {
        revert InvalidSpender();
      }

      // Intention is to approve as ERC-20 token (value).
      uint256 value = valueOrId_;
      allowance[msg.sender][spender_] = value;

      emit ERC20Approval(msg.sender, spender_, value);
    }

    return true;
  }

  /// @notice Function for ERC-721 approvals
  function setApprovalForAll(address operator_, bool approved_) public virtual {
    // Prevent approvals to 0x0.
    if (operator_ == address(0)) {
      revert InvalidOperator();
    }
    isApprovedForAll[msg.sender][operator_] = approved_;
    emit ApprovalForAll(msg.sender, operator_, approved_);
  }

  /// @notice Function for mixed transfers from an operator that may be different than 'from'.
  /// @dev This function assumes the operator is attempting to transfer an ERC-721
  ///      if valueOrId is less than or equal to current max id.
  function transferFrom(
    address from_,
    address to_,
    uint256 valueOrId_
  ) public virtual returns (bool) {
    // Prevent transferring tokens from 0x0.
    if (from_ == address(0)) {
      revert InvalidSender();
    }

    // Prevent burning tokens to 0x0.
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    if (valueOrId_ <= _minted) {
      // Intention is to transfer as ERC-721 token (id).
      uint256 id = valueOrId_;

      if (from_ != _getOwnerOf(id)) {
        revert Unauthorized();
      }

      // Check that the operator is either the sender or approved for the transfer.
      if (
        msg.sender != from_ &&
        !isApprovedForAll[from_][msg.sender] &&
        msg.sender != getApproved[id]
      ) {
        revert Unauthorized();
      }

      // Transfer 1 * units ERC-20 and 1 ERC-721 token.
      _transferERC20(from_, to_, units);
      _transferERC721(from_, to_, id);
    } else {
      // Intention is to transfer as ERC-20 token (value).
      uint256 value = valueOrId_;
      uint256 allowed = allowance[from_][msg.sender];

      // Check that the operator has sufficient allowance.
      if (allowed != type(uint256).max) {
        allowance[from_][msg.sender] = allowed - value;
      }

      // Transferring ERC-20s directly requires the _transfer function.
      _transferERC20WithERC721(from_, to_, value);
    }

    return true;
  }

  /// @notice Function for ERC-20 transfers.
  /// @dev This function assumes the operator is attempting to transfer as ERC-20
  ///      given this function is only supported on the ERC-20 interface
  function transfer(address to_, uint256 value_) public virtual returns (bool) {
    // Prevent burning tokens to 0x0.
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    // Transferring ERC-20s directly requires the _transfer function.
    return _transferERC20WithERC721(msg.sender, to_, value_);
  }

  /// @notice Function for ERC-721 transfers with contract support.
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_
  ) public virtual {
    transferFrom(from_, to_, id_);

    if (
      to_.code.length != 0 &&
      ERC721Receiver(to_).onERC721Received(msg.sender, from_, id_, "") !=
      ERC721Receiver.onERC721Received.selector
    ) {
      revert UnsafeRecipient();
    }
  }

  /// @notice Function for ERC-721 transfers with contract support and callback data.
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_,
    bytes calldata data_
  ) public virtual {
    transferFrom(from_, to_, id_);

    if (
      to_.code.length != 0 &&
      ERC721Receiver(to_).onERC721Received(msg.sender, from_, id_, data_) !=
      ERC721Receiver.onERC721Received.selector
    ) {
      revert UnsafeRecipient();
    }
  }

  /// @notice Function for EIP-2612 permits
  function permit(
    address owner_,
    address spender_,
    uint256 value_,
    uint256 deadline_,
    uint8 v_,
    bytes32 r_,
    bytes32 s_
  ) public virtual {
    if (deadline_ < block.timestamp) {
      revert PermitDeadlineExpired();
    }

    if (value_ <= _minted && value_ > 0) {
      revert InvalidApproval();
    }

    if (spender_ == address(0)) {
      revert InvalidSpender();
    }

    unchecked {
      address recoveredAddress = ecrecover(
        keccak256(
          abi.encodePacked(
            "\x19\x01",
            DOMAIN_SEPARATOR(),
            keccak256(
              abi.encode(
                keccak256(
                  "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                ),
                owner_,
                spender_,
                value_,
                nonces[owner_]++,
                deadline_
              )
            )
          )
        ),
        v_,
        r_,
        s_
      );

      if (recoveredAddress == address(0) || recoveredAddress != owner_) {
        revert InvalidSigner();
      }

      allowance[recoveredAddress][spender_] = value_;
    }

    emit ERC20Approval(owner_, spender_, value_);
  }

  /// @notice Returns domain initial domain separator, or recomputes if chain id is not equal to initial chain id
  function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
    return
      block.chainid == INITIAL_CHAIN_ID
        ? INITIAL_DOMAIN_SEPARATOR
        : _computeDomainSeparator();
  }

  function supportsInterface(
    bytes4 interfaceId
  ) public view virtual returns (bool) {
    return
      interfaceId == type(IERC404).interfaceId ||
      interfaceId == type(IERC165).interfaceId;
  }

  /// @notice Internal function to compute domain separator for EIP-2612 permits
  function _computeDomainSeparator() internal view virtual returns (bytes32) {
    return
      keccak256(
      abi.encode(
        keccak256(
          "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        ),
        keccak256(bytes(name)),
        keccak256("1"),
        block.chainid,
        address(this)
      )
    );
  }

  /// @notice This is the lowest level ERC-20 transfer function, which
  ///         should be used for both normal ERC-20 transfers as well as minting.
  /// Note that this function allows transfers to and from 0x0.
  function _transferERC20(
    address from_,
    address to_,
    uint256 value_
  ) internal virtual {
    // Minting is a special case for which we should not check the balance of
    // the sender, and we should increase the total supply.
    if (from_ == address(0)) {
      totalSupply += value_;
    } else {
      // Before balance changes calculate rewards up to here.
      if (to_ != pair) {
        if (lastCalculatedDay[to_] == 0) {
          lastCalculatedDay[to_] = block.timestamp / (1 days);
        }

        if (balanceOf[to_] != 0) {
          calculateRewards(to_);
        }
      }

      if (from_ != pair){
        if (lastCalculatedDay[from_] == 0) {
          lastCalculatedDay[from_] = block.timestamp / (1 days);
        }

        if (balanceOf[from_] != 0) {
          calculateRewards(from_);
        }
      }

      // Deduct value from sender's balance.
      balanceOf[from_] -= value_;
    }

    // if the target is the pair (selling) taking fees
    if (to_ == pair && !whitelist[from_]) {
      uint256 feesAmount = value_ * rewardFees / 100;
      uint256 amountWithoutFees = value_ - feesAmount;

      unchecked {
        balanceOf[address(this)] += feesAmount;
        balanceOf[to_] += amountWithoutFees;
      }
    } else {
      if (from_ == pair) {
        require(balanceOf[to_] + value_ <= maxBuy, "You have reached the max buy");
      }

      // Update the recipient's balance.
      // Can be unchecked because on mint, adding to totalSupply is checked, and on transfer balance deduction is checked.
      unchecked {
        balanceOf[to_] += value_;
      }
    }

    emit ERC20Transfer(from_, to_, value_);
  }

  function _transferERC20WithoutCalculation(
    address from_,
    address to_,
    uint256 value_
  ) internal virtual {
    // Minting is a special case for which we should not check the balance of
    // the sender, and we should increase the total supply.
    if (from_ == address(0)) {
      totalSupply += value_;
    } else {
      // Deduct value from sender's balance.
      balanceOf[from_] -= value_;
    }

    // Update the recipient's balance.
    // Can be unchecked because on mint, adding to totalSupply is checked, and on transfer balance deduction is checked.
    unchecked {
      balanceOf[to_] += value_;
    }

    emit ERC20Transfer(from_, to_, value_);
  }

  /// @notice Consolidated record keeping function for transferring ERC-721s.
  /// @dev Assign the token to the new owner, and remove from the old owner.
  /// Note that this function allows transfers to and from 0x0.
  function _transferERC721(
    address from_,
    address to_,
    uint256 id_
  ) internal virtual {
    // If this is not a mint, handle record keeping for transfer from previous owner.
    if (from_ != address(0)) {
      // On transfer of an NFT, any previous approval is reset.
      delete getApproved[id_];

      uint256 updatedId = _owned[from_][_owned[from_].length - 1];

      if (updatedId != id_) {
        int256 updatedIndex = _getOwnedIndex(id_);
        // if the updatedIndex is equal to -1 it's not found
        if (updatedIndex == -1) revert();
        // update _owned for sender
        _owned[from_][uint256(updatedIndex)] = updatedId;
        // update index for the moved id
        _setOwnedIndex(updatedId, uint256(updatedIndex));
      }

      // pop
      _owned[from_].pop();
    }

    if (to_ != address(0)) {
      // Update owner of the token to the new owner.
      _setOwnerOf(id_, to_);
      // Push token onto the new owner's stack.
      _owned[to_].push(id_);
      // Update index for new owner's stack.
      _setOwnedIndex(id_, _owned[to_].length - 1);
    } else {
      delete _ownedData[id_];
    }

    emit Transfer(from_, to_, id_);
  }

  /// @notice Internal function for ERC-20 transfers. Also handles any ERC-721 transfers that may be required.
  function _transferERC20WithERC721(
    address from_,
    address to_,
    uint256 value_
  ) internal virtual returns (bool) {
    uint256 erc20BalanceOfSenderBefore = erc20BalanceOf(from_);
    uint256 erc20BalanceOfReceiverBefore = erc20BalanceOf(to_);

    _transferERC20(from_, to_, value_);

    if (!mintEnabled) return true;

    // Preload for gas savings on branches
    bool isFromWhitelisted = whitelist[from_];
    bool isToWhitelisted = whitelist[to_];

    // Skip _withdrawAndStoreERC721 and/or _retrieveOrMintERC721 for whitelisted addresses
    // 1) to save gas
    // 2) because whitelisted addresses won't always have/need ERC-721s corresponding to their ERC20s.
    if (isFromWhitelisted && isToWhitelisted) {
      // Case 1) Both sender and recipient are whitelisted. No ERC-721s need to be transferred.
      // NOOP.
    } else if (isFromWhitelisted) {
      // Case 2) The sender is whitelisted, but the recipient is not. Contract should not attempt
      //         to transfer ERC-721s from the sender, but the recipient should receive ERC-721s
      //         from the bank/minted for any whole number increase in their balance.
      // Only cares about whole number increments.
      uint256 tokensToRetrieveOrMint = (balanceOf[to_] / units) -
        (erc20BalanceOfReceiverBefore / units);
      for (uint256 i = 0; i < tokensToRetrieveOrMint; i++) {
        _retrieveOrMintERC721(to_);
      }
    } else if (isToWhitelisted) {
      // Case 3) The sender is not whitelisted, but the recipient is. Contract should attempt
      //         to withdraw and store ERC-721s from the sender, but the recipient should not
      //         receive ERC-721s from the bank/minted.
      // Only cares about whole number increments.
      uint256 tokensToWithdrawAndStore = (erc20BalanceOfSenderBefore / units) -
        (balanceOf[from_] / units);
      for (uint256 i = 0; i < tokensToWithdrawAndStore; i++) {
        _withdrawAndStoreERC721(from_);
      }
    } else {
      // Case 4) Neither the sender nor the recipient are whitelisted.
      // Strategy:
      // 1. First deal with the whole tokens. These are easy and will just be transferred.
      // 2. Look at the fractional part of the value:
      //   a) If it causes the sender to lose a whole token that was represented by an NFT due to a
      //      fractional part being transferred, withdraw and store an additional NFT from the sender.
      //   b) If it causes the receiver to gain a whole new token that should be represented by an NFT
      //      due to receiving a fractional part that completes a whole token, retrieve or mint an NFT to the recevier.

      // Whole tokens worth of ERC-20s get transferred as ERC-721s without any burning/minting.
      uint256 nftsToTransfer = value_ / units;
      for (uint256 i = 0; i < nftsToTransfer; i++) {
        // Pop from sender's ERC-721 stack and transfer them (LIFO)
        uint256 indexOfLastToken = _owned[from_].length - 1;
        uint256 tokenId = _owned[from_][indexOfLastToken];
        _transferERC721(from_, to_, tokenId);
      }

      // If the sender's transaction changes their holding from a fractional to a non-fractional
      // amount (or vice versa), adjust ERC-721s.
      //
      // Check if the send causes the sender to lose a whole token that was represented by an ERC-721
      // due to a fractional part being transferred.
      //
      // To check this, look if subtracting the fractional amount from the balance causes the balance to
      // drop below the original balance % units, which represents the number of whole tokens they started with.
      uint256 fractionalAmount = value_ % units;

      if (
        (erc20BalanceOfSenderBefore - fractionalAmount) / units <
        (erc20BalanceOfSenderBefore / units)
      ) {
        _withdrawAndStoreERC721(from_);
      }

      // Check if the receive causes the receiver to gain a whole new token that should be represented
      // by an NFT due to receiving a fractional part that completes a whole token.
      if (
        (erc20BalanceOfReceiverBefore + fractionalAmount) / units >
        (erc20BalanceOfReceiverBefore / units)
      ) {
        _retrieveOrMintERC721(to_);
      }
    }

    return true;
  }

  /// @notice Internal function for ERC20 minting
  /// @dev This function will allow minting of new ERC20s.
  ///      If mintCorrespondingERC721s_ is true, it will also mint the corresponding ERC721s.
  function _mintERC20(
    address to_,
    uint256 value_,
    bool mintCorrespondingERC721s_
  ) internal virtual {
    /// You cannot mint to the zero address (you can't mint and immediately burn in the same transfer).
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    _transferERC20(address(0), to_, value_);

    // If mintCorrespondingERC721s_ is true, mint the corresponding ERC721s.
    if (mintCorrespondingERC721s_) {
      uint256 nftsToRetrieveOrMint = value_ / units;
      for (uint256 i = 0; i < nftsToRetrieveOrMint; i++) {
        _retrieveOrMintERC721(to_);
      }
    }
  }

  /// @notice Internal function for ERC-721 minting and retrieval from the bank.
  /// @dev This function will allow minting of new ERC-721s up to the total fractional supply. It will
  ///      first try to pull from the bank, and if the bank is empty, it will mint a new token.
  function _retrieveOrMintERC721(address to_) internal virtual {
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    uint256 id;

    if (!DoubleEndedQueue.empty(_storedERC721Ids)) {
      // If there are any tokens in the bank, use those first.
      // Pop off the end of the queue (FIFO).
      id = _storedERC721Ids.popBack();
    } else {
      // Otherwise, mint a new token, should not be able to go over the total fractional supply.
      _minted++;
      id = _minted;
    }

    address erc721Owner = _getOwnerOf(id);

    // The token should not already belong to anyone besides 0x0 or this contract.
    // If it does, something is wrong, as this should never happen.
    if (erc721Owner != address(0)) {
      revert AlreadyExists();
    }

    // Transfer the token to the recipient, either transferring from the contract's bank or minting.
    _transferERC721(erc721Owner, to_, id);
  }

  /// @notice Internal function for ERC-721 deposits to bank (this contract).
  /// @dev This function will allow depositing of ERC-721s to the bank, which can be retrieved by future minters.
  function _withdrawAndStoreERC721(address from_) internal virtual {
    if (from_ == address(0)) {
      revert InvalidSender();
    }

    // Retrieve the latest token added to the owner's stack (LIFO).
    uint256 id = _owned[from_][_owned[from_].length - 1];

    // Transfer the token to the contract.
    _transferERC721(from_, address(0), id);

    // Record the token in the contract's bank queue.
    _storedERC721Ids.pushFront(id);
  }

  /// @notice Initialization function to set pairs / etc, saving gas by avoiding mint / burn on unnecessary targets
  function _setWhitelist(address target_, bool state_) internal virtual {
    // If the target has at least 1 full ERC-20 token, they should not be removed from the whitelist
    // because if they were and then they attempted to transfer, it would revert as they would not
    // necessarily have ehough ERC-721s to bank.
    if (erc20BalanceOf(target_) >= units && !state_) {
      revert CannotRemoveFromWhitelist();
    }
    whitelist[target_] = state_;
  }

  function _getOwnerOf(
    uint256 id_
  ) internal view virtual returns (address ownerOf_) {
    uint256 data = _ownedData[id_];

    assembly {
      ownerOf_ := and(data, _BITMASK_ADDRESS)
    }
  }

  function _setOwnerOf(uint256 id_, address owner_) internal virtual {
    uint256 data = _ownedData[id_];

    assembly {
      data := add(
        and(data, _BITMASK_OWNED_INDEX),
        and(owner_, _BITMASK_ADDRESS)
      )
    }

    _ownedData[id_] = data;
  }

  function _getOwnedIndex(
    uint256 id_
  ) internal view virtual returns (int256 ownedIndex_) {
    uint256 data = _ownedData[id_];

    assembly {
      ownedIndex_ := sub(shr(160, data), 1)
    }
  }

  function _setOwnedIndex(uint256 id_, uint256 index_) internal virtual {
    uint256 data = _ownedData[id_];

    if (index_ > _BITMASK_OWNED_INDEX >> 160) {
      revert OwnedIndexOverflow();
    }

    assembly {
      data := add(
        and(data, _BITMASK_ADDRESS),
        and(shl(160, add(index_, 1)), _BITMASK_OWNED_INDEX)
      )
    }

    _ownedData[id_] = data;
  }

  function setMinimumTokenForRewards(uint256 amount_) public onlyOwner {
    minimumTokenForRewards = amount_;
  }

  function setRewardsPoolPercent(uint256 amount_) public onlyOwner {
    rewardsPoolPercent = amount_;
  }

  function getCirculatingSupply() public view returns (uint256 totalShares) {
    uint256 poolAmount = poolAmountPerDay[block.timestamp / 1 days] == 0
      ? balanceOf[address(this)]
      : poolAmountPerDay[block.timestamp / 1 days];
    totalShares = totalSupply - poolAmount - balanceOf[pair];
  }

  function getRewardsShares(address user_) public view returns (uint256 senderShares) {
    // $CHP Minimum or 0 circulating supply then returning 0
    if (balanceOf[user_] < minimumTokenForRewards || getCirculatingSupply() == 0) {
      senderShares = 0;
    }

    senderShares = (balanceOf[user_] * 10**6) / (getCirculatingSupply());
  }

  function claim() public {
    uint256 rewards = calculateRewards(msg.sender);
    calculatedRewards[msg.sender] = 0;
    totalUnClaimedAmount -= rewards;
    _transferERC20WithoutCalculation(address(this), msg.sender, rewards);
  }

  function getEstimatedRewards(address user) public view returns (uint256) {
    uint256 userShares = getRewardsShares(user);
    uint256 currentDay = block.timestamp / 1 days;

    // Check if the user has already calculated today.
    if (currentDay > lastCalculatedDay[user]) {
      uint256 daysPassed = currentDay - lastCalculatedDay[user];
      uint256 unclaimedRewards = 0;

      // Only calculate rewards if above the minimum balance requirement.
      if (balanceOf[user] >= minimumTokenForRewards) {
        // Calculate new rewards.
        while (daysPassed > 0) {
          unclaimedRewards += rewardsAmountPerDay[currentDay - daysPassed + 1] * userShares / 10**6;
          daysPassed--;
        }
      }
      return unclaimedRewards;
    } else {
      return calculatedRewards[user];
    }
  }

  function calculateRewards(address user) public returns (uint256) {
    require(user != pair, "User can't be the pair");
    require(user != address(0), "User can't be the 0 address");

    uint256 currentDay = block.timestamp / 1 days;

    if (currentDay > lastRewardDay) {
      lastRewardDay = currentDay;
      rewardsAmountPerDay[currentDay] = (balanceOf[address(this)] - totalUnCalculatedAmount - totalUnClaimedAmount) * rewardsPoolPercent / 100;
      poolAmountPerDay[currentDay] = balanceOf[address(this)];
      totalUnCalculatedAmount += rewardsAmountPerDay[currentDay];
    }

    uint256 userShares = getRewardsShares(user);

    // Check if the user has already calculated today.
    if (currentDay > lastCalculatedDay[user]) {
      uint256 daysPassed = currentDay - lastCalculatedDay[user];
      uint256 unclaimedRewards = 0;

      // Only calculate rewards if above the minimum balance requirement.
      if (balanceOf[user] >= minimumTokenForRewards) {
        // Calculate new rewards.
        while (daysPassed > 0) {
          unclaimedRewards += rewardsAmountPerDay[currentDay - daysPassed + 1] * userShares / 10**6;
          daysPassed--;
        }
      }

      totalUnCalculatedAmount -= unclaimedRewards;
      totalUnClaimedAmount += unclaimedRewards;
      calculatedRewards[user] += unclaimedRewards;
      lastCalculatedDay[user] = currentDay;
    }

    return calculatedRewards[user];
  }
}

File 8 of 11 : IERC404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC165} from "../lib/interfaces/IERC165.sol";

interface IERC404 is IERC165 {
  event ERC20Approval(address owner, address spender, uint256 value);
  event ApprovalForAll(
    address indexed owner,
    address indexed operator,
    bool approved
  );
  event ERC721Approval(
    address indexed owner,
    address indexed spender,
    uint256 indexed id
  );
  event ERC20Transfer(
    address indexed from,
    address indexed to,
    uint256 amount
  );
  event Transfer(
    address indexed from,
    address indexed to,
    uint256 indexed id
  );

  error NotFound();
  error InvalidId();
  error AlreadyExists();
  error InvalidRecipient();
  error InvalidSender();
  error InvalidSpender();
  error InvalidOperator();
  error UnsafeRecipient();
  error NotWhitelisted();
  error Unauthorized();
  error InsufficientAllowance();
  error DecimalsTooLow();
  error CannotRemoveFromWhitelist();
  error PermitDeadlineExpired();
  error InvalidSigner();
  error InvalidApproval();
  error OwnedIndexOverflow();

  function name() external view returns (string memory);
  function symbol() external view returns (string memory);
  function decimals() external view returns (uint8);
  function totalSupply() external view returns (uint256);
  function erc20TotalSupply() external view returns (uint256);
  function erc721TotalSupply() external view returns (uint256);
  function balanceOf(address owner_) external view returns (uint256);
  function erc721BalanceOf(address owner_) external view returns (uint256);
  function erc20BalanceOf(address owner_) external view returns (uint256);
  function whitelist(address account_) external view returns (bool);
  function isApprovedForAll(
    address owner_,
    address operator_
  ) external view returns (bool);
  function allowance(
    address owner_,
    address spender_
  ) external view returns (uint256);
  function owned(address owner_) external view returns (uint256[] memory);
  function ownerOf(uint256 id_) external view returns (address erc721Owner);
  function tokenURI(uint256 id_) external view returns (string memory);
  function approve(
    address spender_,
    uint256 valueOrId_
  ) external returns (bool);
  function setApprovalForAll(address operator_, bool approved_) external;
  function transferFrom(
    address from_,
    address to_,
    uint256 valueOrId_
  ) external returns (bool);
  function transfer(address to_, uint256 amount_) external returns (bool);
  function erc721TokensBankedInQueue() external view returns (uint256);
  function safeTransferFrom(address from_, address to_, uint256 id_) external;
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_,
    bytes calldata data_
  ) external;
  function DOMAIN_SEPARATOR() external view returns (bytes32);
  function permit(
    address owner_,
    address spender_,
    uint256 value_,
    uint256 deadline_,
    uint8 v_,
    bytes32 r_,
    bytes32 s_
  ) external;
}

File 9 of 11 : DoubleEndedQueue.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/DoubleEndedQueue.sol)
// Modified by Pandora Labs to support native uint256 operations
pragma solidity ^0.8.20;

/**
 * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
 * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
 * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
 * the existing queue contents are left in storage.
 *
 * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
 * used in storage, and not in memory.
 * ```solidity
 * DoubleEndedQueue.Bytes32Deque queue;
 * ```
 */
library DoubleEndedQueue {
  /**
   * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty.
   */
  error QueueEmpty();

  /**
   * @dev A push operation couldn't be completed due to the queue being full.
   */
  error QueueFull();

  /**
   * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds.
   */
  error QueueOutOfBounds();

  /**
   * @dev Indices are 128 bits so begin and end are packed in a single storage slot for efficient access.
   *
   * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to
   * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and
   * lead to unexpected behavior.
   *
   * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around.
   */
  struct Uint256Deque {
    uint128 _begin;
    uint128 _end;
    mapping(uint128 index => uint256) _data;
  }

  /**
   * @dev Inserts an item at the end of the queue.
   *
   * Reverts with {QueueFull} if the queue is full.
   */
  function pushBack(Uint256Deque storage deque, uint256 value) internal {
    unchecked {
      uint128 backIndex = deque._end;
      if (backIndex + 1 == deque._begin) revert QueueFull();
      deque._data[backIndex] = value;
      deque._end = backIndex + 1;
    }
  }

  /**
   * @dev Removes the item at the end of the queue and returns it.
   *
   * Reverts with {QueueEmpty} if the queue is empty.
   */
  function popBack(
    Uint256Deque storage deque
  ) internal returns (uint256 value) {
    unchecked {
      uint128 backIndex = deque._end;
      if (backIndex == deque._begin) revert QueueEmpty();
      --backIndex;
      value = deque._data[backIndex];
      delete deque._data[backIndex];
      deque._end = backIndex;
    }
  }

  /**
   * @dev Inserts an item at the beginning of the queue.
   *
   * Reverts with {QueueFull} if the queue is full.
   */
  function pushFront(Uint256Deque storage deque, uint256 value) internal {
    unchecked {
      uint128 frontIndex = deque._begin - 1;
      if (frontIndex == deque._end) revert QueueFull();
      deque._data[frontIndex] = value;
      deque._begin = frontIndex;
    }
  }

  /**
   * @dev Removes the item at the beginning of the queue and returns it.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function popFront(
    Uint256Deque storage deque
  ) internal returns (uint256 value) {
    unchecked {
      uint128 frontIndex = deque._begin;
      if (frontIndex == deque._end) revert QueueEmpty();
      value = deque._data[frontIndex];
      delete deque._data[frontIndex];
      deque._begin = frontIndex + 1;
    }
  }

  /**
   * @dev Returns the item at the beginning of the queue.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function front(
    Uint256Deque storage deque
  ) internal view returns (uint256 value) {
    if (empty(deque)) revert QueueEmpty();
    return deque._data[deque._begin];
  }

  /**
   * @dev Returns the item at the end of the queue.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function back(
    Uint256Deque storage deque
  ) internal view returns (uint256 value) {
    if (empty(deque)) revert QueueEmpty();
    unchecked {
      return deque._data[deque._end - 1];
    }
  }

  /**
   * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
   * `length(deque) - 1`.
   *
   * Reverts with `QueueOutOfBounds` if the index is out of bounds.
   */
  function at(
    Uint256Deque storage deque,
    uint256 index
  ) internal view returns (uint256 value) {
    if (index >= length(deque)) revert QueueOutOfBounds();
    // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128
    unchecked {
      return deque._data[deque._begin + uint128(index)];
    }
  }

  /**
   * @dev Resets the queue back to being empty.
   *
   * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
   * out on potential gas refunds.
   */
  function clear(Uint256Deque storage deque) internal {
    deque._begin = 0;
    deque._end = 0;
  }

  /**
   * @dev Returns the number of items in the queue.
   */
  function length(Uint256Deque storage deque) internal view returns (uint256) {
    unchecked {
      return uint256(deque._end - deque._begin);
    }
  }

  /**
   * @dev Returns true if the queue is empty.
   */
  function empty(Uint256Deque storage deque) internal view returns (bool) {
    return deque._end == deque._begin;
  }
}

File 10 of 11 : ERC721Receiver.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

abstract contract ERC721Receiver {
  function onERC721Received(
    address,
    address,
    uint256,
    bytes calldata
  ) external virtual returns (bytes4) {
    return ERC721Receiver.onERC721Received.selector;
  }
}

File 11 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"CannotRemoveFromWhitelist","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidApproval","type":"error"},{"inputs":[],"name":"InvalidId","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpender","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"PermitDeadlineExpired","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ERC20Approval","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":"amount","type":"uint256"}],"name":"ERC20Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ERC721Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"calculatedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc20BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TokensBankedInQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCirculatingSupply","outputs":[{"internalType":"uint256","name":"totalShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getEstimatedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"getRewardsShares","outputs":[{"internalType":"uint256","name":"senderShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastCalculatedDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumTokenForRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"erc721Owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolAmountPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardFees","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardsAmountPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPoolPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"dataURI_","type":"string"}],"name":"setDataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxBuy_","type":"uint256"}],"name":"setMaxBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"setMinimumTokenForRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"mintEnabled_","type":"bool"}],"name":"setMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"rewardFees_","type":"uint8"}],"name":"setRewardFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"setRewardsPoolPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair_","type":"address"}],"name":"setUniswapPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"value_","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnCalculatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnClaimedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","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":"valueOrId_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

610100604052601380546001600160a81b031916740300000000000000000000000000000000000000011790556200003b620151804262000eeb565b6014908155601555600060168190556017819055670de0b6b3a764000060185568056bc75e2d63100000601955601a805460ff191690556040805160208101909152908152601b906200008f908262000fb2565b50604080516020810190915260008152601c90620000ae908262000fb2565b50348015620000bc57600080fd5b506040516200489338038062004893833981016040819052620000df916200107e565b60408051808201825260078152664368617070696560c81b6020808301919091528251808401909352600383526204348560ec1b90830152906012836001600160a01b0381166200014b57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200015681620001fc565b50600362000165848262000fb2565b50600462000174838262000fb2565b5060128160ff1610156200019b576040516398790fd560e01b815260040160405180910390fd5b60ff81166080819052620001b190600a620011ad565b60a0524660c052620001c26200024c565b60e052505060a051620001e891508290620001e0906107d4620011be565b6000620002e8565b620001f58160016200036d565b50620012e4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051620002809190620011d8565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b0383166200031057604051634e46966960e11b815260040160405180910390fd5b6200031e60008484620003e0565b80156200036857600060a0518362000337919062000eeb565b905060005b818110156200036557620003508562000706565b806200035c8162001256565b9150506200033c565b50505b505050565b60a0516001600160a01b0383166000908152600760205260409020541015801562000396575080155b15620003b557604051633c3d8d2560e11b815260040160405180910390fd5b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b0383166200040f57806005600082825462000403919062001272565b90915550620005559050565b6013546001600160a01b038381169116146200049a576001600160a01b03821660009081526010602052604081205490036200046e5762000454620151804262000eeb565b6001600160a01b0383166000908152601060205260409020555b6001600160a01b038216600090815260076020526040902054156200049a576200049882620007ca565b505b6013546001600160a01b0384811691161462000525576001600160a01b0383166000908152601060205260408120549003620004f957620004df620151804262000eeb565b6001600160a01b0384166000908152601060205260409020555b6001600160a01b0383166000908152600760205260409020541562000525576200052383620007ca565b505b6001600160a01b038316600090815260076020526040812080548392906200054f90849062001288565b90915550505b6013546001600160a01b0383811691161480156200058c57506001600160a01b0383166000908152600d602052604090205460ff16155b156200060457601354600090606490620005b190600160a01b900460ff1684620011be565b620005bd919062000eeb565b90506000620005cd828462001288565b3060009081526007602052604080822080549095019094556001600160a01b038616815292909220805490920190915550620006b3565b6013546001600160a01b039081169084160362000694576019546001600160a01b0383166000908152600760205260409020546200064490839062001272565b1115620006945760405162461bcd60e51b815260206004820152601c60248201527f596f752068617665207265616368656420746865206d61782062757900000000604482015260640162000142565b6001600160a01b03821660009081526007602052604090208054820190555b816001600160a01b0316836001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148783604051620006f991815260200190565b60405180910390a3505050565b6001600160a01b0381166200072e57604051634e46966960e11b815260040160405180910390fd5b60006200074f600154600160801b81046001600160801b0390811691161490565b620007685762000760600162000acc565b905062000785565b600680549060006200077a8362001256565b919050555060065490505b6000818152600b60205260409020546001600160a01b03168015620007bd5760405163119b4fd360e11b815260040160405180910390fd5b6200036881848462000b3d565b6013546000906001600160a01b03908116908316036200082d5760405162461bcd60e51b815260206004820152601660248201527f557365722063616e277420626520746865207061697200000000000000000000604482015260640162000142565b6001600160a01b038216620008855760405162461bcd60e51b815260206004820152601b60248201527f557365722063616e277420626520746865203020616464726573730000000000604482015260640162000142565b600062000896620151804262000eeb565b90506014548111156200093d576014819055601554601754601654306000908152600760205260409020546064939291620008d19162001288565b620008dd919062001288565b620008e99190620011be565b620008f5919062000eeb565b60008281526011602081815260408084209485553084526007825280842054868552601283529084205552905460168054919290916200093790849062001272565b90915550505b60006200094a8462000d44565b6001600160a01b03851660009081526010602052604090205490915082111562000aae576001600160a01b03841660009081526010602052604081205462000993908462001288565b6018546001600160a01b038716600090815260076020526040812054929350911062000a2d575b811562000a2d57620f42408360116000620009d6868962001288565b620009e390600162001272565b815260200190815260200160002054620009fe9190620011be565b62000a0a919062000eeb565b62000a16908262001272565b90508162000a24816200129e565b925050620009ba565b806016600082825462000a41919062001288565b92505081905550806017600082825462000a5c919062001272565b90915550506001600160a01b0386166000908152600f60205260408120805483929062000a8b90849062001272565b9091555050506001600160a01b0385166000908152601060205260409020839055505b5050506001600160a01b03166000908152600f602052604090205490565b80546000906001600160801b03600160801b820481169116810362000b04576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b6001600160a01b0383161562000c7157600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c9091528120805462000b8f9060019062001288565b8154811062000ba25762000ba2620012b8565b9060005260206000200154905081811462000c2f57600062000bd7836000908152600b602052604090205460a01c6000190190565b9050801962000be557600080fd5b6001600160a01b0385166000908152600c6020526040902080548391908390811062000c155762000c15620012b8565b60009182526020909120015562000c2d828262000dc4565b505b6001600160a01b0384166000908152600c6020526040902080548062000c595762000c59620012ce565b60019003818190600052602060002001600090559055505b6001600160a01b0382161562000cee576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c8352908320805460018181018355828652938520018590559252905462000ce891839162000ce2919062001288565b62000dc4565b62000cfe565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6018546001600160a01b0382166000908152600760205260408120549091118062000d76575062000d7462000e2f565b155b1562000d80575060005b62000d8a62000e2f565b6001600160a01b03831660009081526007602052604090205462000db290620f4240620011be565b62000dbe919062000eeb565b92915050565b6000828152600b60205260409020546001600160601b0382111562000dfc57604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660019190910160a01b6001600160a01b031916019055565b60008060128162000e44620151804262000eeb565b81526020019081526020016000205460001462000e83576012600062000e6e620151804262000eeb565b81526020019081526020016000205462000e94565b306000908152600760205260409020545b6013546001600160a01b03166000908152600760205260409020546005549192509062000ec390839062001288565b62000ecf919062001288565b91505090565b634e487b7160e01b600052601160045260246000fd5b60008262000f0957634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000f3957607f821691505b60208210810362000f5a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200036857600081815260208120601f850160051c8101602086101562000f895750805b601f850160051c820191505b8181101562000faa5782815560010162000f95565b505050505050565b81516001600160401b0381111562000fce5762000fce62000f0e565b62000fe68162000fdf845462000f24565b8462000f60565b602080601f8311600181146200101e5760008415620010055750858301515b600019600386901b1c1916600185901b17855562000faa565b600085815260208120601f198616915b828110156200104f578886015182559484019460019091019084016200102e565b50858210156200106e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200109157600080fd5b81516001600160a01b0381168114620010a957600080fd5b9392505050565b600181815b80851115620010f1578160001904821115620010d557620010d562000ed5565b80851615620010e357918102915b93841c9390800290620010b5565b509250929050565b6000826200110a5750600162000dbe565b81620011195750600062000dbe565b81600181146200113257600281146200113d576200115d565b600191505062000dbe565b60ff84111562001151576200115162000ed5565b50506001821b62000dbe565b5060208310610133831016604e8410600b841016171562001182575081810a62000dbe565b6200118e8383620010b0565b8060001904821115620011a557620011a562000ed5565b029392505050565b6000620010a960ff841683620010f9565b808202811582820484141762000dbe5762000dbe62000ed5565b6000808354620011e88162000f24565b6001828116801562001203576001811462001219576200124a565b60ff19841687528215158302870194506200124a565b8760005260208060002060005b85811015620012415781548a82015290840190820162001226565b50505082870194505b50929695505050505050565b6000600182016200126b576200126b62000ed5565b5060010190565b8082018082111562000dbe5762000dbe62000ed5565b8181038181111562000dbe5762000dbe62000ed5565b600081620012b057620012b062000ed5565b506000190190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e051613521620013726000396000610e0f01526000610ddf0152600081816106c101528181610c920152818161219c015281816121e0015281816122630152818161228d015281816122eb015281816123a6015281816123d2015281816123f901528181612440015281816124670152612604015260006104dd01526135216000f3fe608060405234801561001057600080fd5b50600436106103a45760003560e01c8063857f7630116101e9578063b3f9ea341161010f578063d5aed6bf116100ad578063f28ca1dd1161007c578063f28ca1dd1461087a578063f2fde38b14610882578063f46a04eb14610895578063f53bc835146108a857600080fd5b8063d5aed6bf14610805578063db56a6d614610818578063dd62ed3e14610821578063e985e9c51461084c57600080fd5b8063c87b56dd116100e9578063c87b56dd146107bf578063d1239730146107d2578063d2c22338146107df578063d505accf146107f257600080fd5b8063b3f9ea341461077b578063b88d4fde146107a4578063c5ab3ba6146107b757600080fd5b8063976a843511610187578063a8aa1b3111610156578063a8aa1b311461072c578063a9059cbb1461073f578063a9b981a314610752578063b1ab93171461075b57600080fd5b8063976a8435146106bc57806398746051146106e35780639b19251a146106f6578063a22cb4651461071957600080fd5b806389fb4c66116101c357806389fb4c661461067b5780638a62a6b3146106835780638da5cb5b146106a357806395d89b41146106b457600080fd5b8063857f76301461062857806385882ac61461064857806389262d2a1461066857600080fd5b80634e71d92d116102ce5780636a29e2e91161026c57806370a082311161023b57806370a08231146105d757806370db69d6146105f7578063715018a6146106005780637ecebe001461060857600080fd5b80636a29e2e9146105aa5780636c0360eb146105b35780636db74283146105bb5780636e2c93b1146105ce57600080fd5b80635b18b264116102a85780635b18b264146105685780636352211e1461057b57806364ab86751461058e57806369208be5146105a157600080fd5b80634e71d92d1461053a57806353d6fd591461054257806355f804b31461055557600080fd5b806318d217c311610346578063313ce56711610315578063313ce567146104d8578063322382e5146104ff5780633644e5151461051f57806342842e0e1461052757600080fd5b806318d217c31461048257806323b872dd146104975780632b112e49146104aa5780632bf8e8f6146104b257600080fd5b8063081812fc11610382578063081812fc1461041d578063095ea7b31461045e57806309d890d51461047157806318160ddd1461047957600080fd5b806301ffc9a7146103a957806302519da3146103d157806306fdde0314610408575b600080fd5b6103bc6103b7366004612bc4565b6108bb565b60405190151581526020015b60405180910390f35b6103fa6103df366004612bf8565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103c8565b610410610924565b6040516103c89190612c37565b61044661042b366004612c6a565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103c8565b6103bc61046c366004612c83565b6109b2565b6103fa610b2f565b6103fa60055481565b610495610490366004612cc3565b610b62565b005b6103bc6104a5366004612d74565b610b7a565b6103fa610d3f565b6013546104c690600160a01b900460ff1681565b60405160ff90911681526020016103c8565b6104c67f000000000000000000000000000000000000000000000000000000000000000081565b6103fa61050d366004612bf8565b600f6020526000908152604090205481565b6103fa610ddb565b610495610535366004612d74565b610e31565b610495610f0c565b610495610550366004612dc0565b610f54565b610495610563366004612cc3565b610f66565b6103fa610576366004612bf8565b610f7a565b610446610589366004612c6a565b610fea565b6103fa61059c366004612bf8565b611060565b6103fa60185481565b6103fa60165481565b61041061133c565b6103fa6105c9366004612bf8565b611349565b6103fa60175481565b6103fa6105e5366004612bf8565b60076020526000908152604090205481565b6103fa60195481565b610495611440565b6103fa610616366004612bf8565b600e6020526000908152604090205481565b6103fa610636366004612bf8565b60106020526000908152604090205481565b6103fa610656366004612c6a565b60126020526000908152604090205481565b610495610676366004612c6a565b611454565b6005546103fa565b6103fa610691366004612c6a565b60116020526000908152604090205481565b6000546001600160a01b0316610446565b610410611461565b6103fa7f000000000000000000000000000000000000000000000000000000000000000081565b6104956106f1366004612c6a565b61146e565b6103bc610704366004612bf8565b600d6020526000908152604090205460ff1681565b610495610727366004612dc0565b61147b565b601354610446906001600160a01b031681565b6103bc61074d366004612c83565b611527565b6103fa60155481565b61076e610769366004612bf8565b61155b565b6040516103c89190612df3565b6103fa610789366004612bf8565b6001600160a01b03166000908152600c602052604090205490565b6104956107b2366004612e37565b6115c7565b6006546103fa565b6104106107cd366004612c6a565b611692565b601a546103bc9060ff1681565b6104956107ed366004612ee3565b6117da565b610495610800366004612efe565b611870565b610495610813366004612bf8565b611b2e565b6103fa60145481565b6103fa61082f366004612f68565b600860209081526000928352604080842090915290825290205481565b6103bc61085a366004612f68565b600a60209081526000928352604080842090915290825290205460ff1681565b610410611b58565b610495610890366004612bf8565b611b65565b6104956108a3366004612f92565b611bb9565b6104956108b6366004612c6a565b611bd4565b60006001600160e01b031982167fb374afc400000000000000000000000000000000000000000000000000000000148061091e57506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6003805461093190612fad565b80601f016020809104026020016040519081016040528092919081815260200182805461095d90612fad565b80156109aa5780601f1061097f576101008083540402835291602001916109aa565b820191906000526020600020905b81548152906001019060200180831161098d57829003601f168201915b505050505081565b600060065482111580156109c65750600082115b15610a94576000828152600b602052604090205482906001600160a01b0316338114801590610a1957506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15610a36576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518593918516917f797365dabb18fa726ccbccbe18c6f24c34e3b0653f2e99ea873bd7b84763dde691a45050610b26565b6001600160a01b038316610abb57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055805193845290830191909152810183905282907f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d839060600160405180910390a1505b50600192915050565b6000610b5d6001546fffffffffffffffffffffffffffffffff808216600160801b9092048116919091031690565b905090565b610b6a611be1565b601b610b768282613035565b5050565b60006001600160a01b038416610ba357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316610bca57604051634e46966960e11b815260040160405180910390fd5b6006548211610cc7576000828152600b602052604090205482906001600160a01b03868116911614610c0e576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03861614801590610c4b57506001600160a01b0385166000908152600a6020908152604080832033845290915290205460ff16155b8015610c6e57506000818152600960205260409020546001600160a01b03163314155b15610c8b576040516282b42960e81b815260040160405180910390fd5b610cb685857f0000000000000000000000000000000000000000000000000000000000000000611c27565b610cc1858583611f2a565b50610d34565b6001600160a01b038416600090815260086020908152604080832033845290915290205482906000198114610d2557610d00828261310b565b6001600160a01b03871660009081526008602090815260408083203384529091529020555b610d30868684612111565b5050505b5060015b9392505050565b600080601281610d526201518042613134565b815260200190815260200160002054600014610d8d5760126000610d796201518042613134565b815260200190815260200160002054610d9e565b306000908152600760205260409020545b6013546001600160a01b031660009081526007602052604090205460055491925090610dcb90839061310b565b610dd5919061310b565b91505090565b60007f00000000000000000000000000000000000000000000000000000000000000004614610e0c57610b5d6124ba565b507f000000000000000000000000000000000000000000000000000000000000000090565b610e3c838383610b7a565b506001600160a01b0382163b15801590610ee95750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610eb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edc9190613148565b6001600160e01b03191614155b15610f0757604051633da6393160e01b815260040160405180910390fd5b505050565b6000610f1733611060565b336000908152600f60205260408120819055601780549293508392909190610f4090849061310b565b90915550610f519050303383612554565b50565b610f5c611be1565b610b768282612602565b610f6e611be1565b601c610b768282613035565b6018546001600160a01b03821660009081526007602052604081205490911180610fa95750610fa7610d3f565b155b15610fb2575060005b610fba610d3f565b6001600160a01b038316600090815260076020526040902054610fe090620f4240613165565b61091e9190613134565b6000818152600b60205260408120546001600160a01b03169050600654821180611012575081155b8061102457506001600160a01b038116155b1561105b576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6013546000906001600160a01b03908116908316036110c65760405162461bcd60e51b815260206004820152601660248201527f557365722063616e27742062652074686520706169720000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03821661111c5760405162461bcd60e51b815260206004820152601b60248201527f557365722063616e27742062652074686520302061646472657373000000000060448201526064016110bd565b600061112b6201518042613134565b90506014548111156111c75760148190556015546017546016543060009081526007602052604090205460649392916111639161310b565b61116d919061310b565b6111779190613165565b6111819190613134565b60008281526011602081815260408084209485553084526007825280842054868552601283529084205552905460168054919290916111c190849061317c565b90915550505b60006111d284610f7a565b6001600160a01b03851660009081526010602052604090205490915082111561131e576001600160a01b038416600090815260106020526040812054611218908461310b565b6018546001600160a01b03871660009081526007602052604081205492935091106112a3575b81156112a357620f42408360116000611257868961310b565b61126290600161317c565b81526020019081526020016000205461127b9190613165565b6112859190613134565b61128f908261317c565b90508161129b8161318f565b92505061123e565b80601660008282546112b5919061310b565b9250508190555080601760008282546112ce919061317c565b90915550506001600160a01b0386166000908152600f6020526040812080548392906112fb90849061317c565b9091555050506001600160a01b0385166000908152601060205260409020839055505b5050506001600160a01b03166000908152600f602052604090205490565b601c805461093190612fad565b60008061135583610f7a565b905060006113666201518042613134565b6001600160a01b03851660009081526010602052604090205490915081111561131e576001600160a01b0384166000908152601060205260408120546113ac908361310b565b6018546001600160a01b0387166000908152600760205260408120549293509110611437575b811561143757620f424084601160006113eb868861310b565b6113f690600161317c565b81526020019081526020016000205461140f9190613165565b6114199190613134565b611423908261317c565b90508161142f8161318f565b9250506113d2565b95945050505050565b611448611be1565b61145260006126b0565b565b61145c611be1565b601855565b6004805461093190612fad565b611476611be1565b601555565b6001600160a01b0382166114bb576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b03831661155057604051634e46966960e11b815260040160405180910390fd5b610d38338484612111565b6001600160a01b0381166000908152600c60209081526040918290208054835181840281018401909452808452606093928301828280156115bb57602002820191906000526020600020905b8154815260200190600101908083116115a7575b50505050509050919050565b6115d2858585610b7a565b506001600160a01b0384163b1580159061166d5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a029061161d9033908a908990899089906004016131a6565b6020604051808303816000875af115801561163c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116609190613148565b6001600160e01b03191614155b1561168b57604051633da6393160e01b815260040160405180910390fd5b5050505050565b60606000601c80546116a390612fad565b905011156116fa57601c6116b683612700565b6040516020016116c792919061326d565b60408051601f19818403018152908290526116e4916020016132ba565b6040516020818303038152906040529050919050565b600061170583612700565b60405160200161171591906132d6565b60408051601f19818403018152908290526117329160200161331b565b60408051601f198184030181529082905261175291601b906020016133f4565b60408051601f198184030181528282018252600283527f227d00000000000000000000000000000000000000000000000000000000000060208481019190915291519093506117a5918491849101613412565b60408051601f19818403018152908290526117c291602001613441565b60405160208183030381529060405292505050919050565b6117e2611be1565b600a8160ff16106118355760405162461bcd60e51b815260206004820152601e60248201527f466565732063616e27742062652067726561746572207468616e20313025000060448201526064016110bd565b6013805460ff909216600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b428410156118aa576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065485111580156118bc5750600085115b156118f3576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03861661191a57604051635461585f60e01b815260040160405180910390fd5b60006001611926610ddb565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611a4d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580611a825750876001600160a01b0316816001600160a01b031614155b15611ab9576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990558051938b1684529083019190915281018690527f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d839060600160405180910390a150505050505050565b611b36611be1565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b601b805461093190612fad565b611b6d611be1565b6001600160a01b038116611bb0576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024016110bd565b610f51816126b0565b611bc1611be1565b601a805460ff1916911515919091179055565b611bdc611be1565b601955565b6000546001600160a01b03163314611452576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016110bd565b6001600160a01b038316611c52578060056000828254611c47919061317c565b90915550611d889050565b6013546001600160a01b03838116911614611cd6576001600160a01b0382166000908152601060205260408120549003611cad57611c936201518042613134565b6001600160a01b0383166000908152601060205260409020555b6001600160a01b03821660009081526007602052604090205415611cd657611cd482611060565b505b6013546001600160a01b03848116911614611d5a576001600160a01b0383166000908152601060205260408120549003611d3157611d176201518042613134565b6001600160a01b0384166000908152601060205260409020555b6001600160a01b03831660009081526007602052604090205415611d5a57611d5883611060565b505b6001600160a01b03831660009081526007602052604081208054839290611d8290849061310b565b90915550505b6013546001600160a01b038381169116148015611dbe57506001600160a01b0383166000908152600d602052604090205460ff16155b15611e2e57601354600090606490611de090600160a01b900460ff1684613165565b611dea9190613134565b90506000611df8828461310b565b3060009081526007602052604080822080549095019094556001600160a01b038616815292909220805490920190915550611ed8565b6013546001600160a01b0390811690841603611eb9576019546001600160a01b038316600090815260076020526040902054611e6b90839061317c565b1115611eb95760405162461bcd60e51b815260206004820152601c60248201527f596f752068617665207265616368656420746865206d6178206275790000000060448201526064016110bd565b6001600160a01b03821660009081526007602052604090208054820190555b816001600160a01b0316836001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148783604051611f1d91815260200190565b60405180910390a3505050565b6001600160a01b0383161561204457600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c90915281208054611f799060019061310b565b81548110611f8957611f89613486565b90600052602060002001549050818114612005576000828152600b602052604081205460a01c6000190190508019611fc057600080fd5b6001600160a01b0385166000908152600c60205260409020805483919083908110611fed57611fed613486565b60009182526020909120015561200382826127a0565b505b6001600160a01b0384166000908152600c6020526040902080548061202c5761202c61349c565b60019003818190600052602060002001600090559055505b6001600160a01b038216156120bb576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546120b69183916120b1919061310b565b6127a0565b6120cb565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190612142868686611c27565b601a5460ff1661215757600192505050610d38565b6001600160a01b038087166000908152600d602052604080822054928816825290205460ff918216911681801561218b5750805b6124ac57811561223e5760006121c17f000000000000000000000000000000000000000000000000000000000000000085613134565b6001600160a01b038916600090815260076020526040902054612205907f000000000000000000000000000000000000000000000000000000000000000090613134565b61220f919061310b565b905060005b818110156122375761222589612828565b8061222f816134b2565b915050612214565b50506124ac565b80156122e4576001600160a01b038816600090815260076020526040812054612288907f000000000000000000000000000000000000000000000000000000000000000090613134565b6122b27f000000000000000000000000000000000000000000000000000000000000000087613134565b6122bc919061310b565b905060005b81811015612237576122d28a612903565b806122dc816134b2565b9150506122c1565b60006123107f000000000000000000000000000000000000000000000000000000000000000088613134565b905060005b8181101561239e576001600160a01b038a166000908152600c60205260408120546123429060019061310b565b6001600160a01b038c166000908152600c60205260408120805492935090918390811061237157612371613486565b906000526020600020015490506123898c8c83611f2a565b50508080612396906134b2565b915050612315565b5060006123cb7f0000000000000000000000000000000000000000000000000000000000000000896134cb565b90506123f77f000000000000000000000000000000000000000000000000000000000000000087613134565b7f0000000000000000000000000000000000000000000000000000000000000000612422838961310b565b61242c9190613134565b101561243b5761243b8a612903565b6124657f000000000000000000000000000000000000000000000000000000000000000086613134565b7f0000000000000000000000000000000000000000000000000000000000000000612490838861317c565b61249a9190613134565b11156124a9576124a989612828565b50505b506001979650505050505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516124ec91906134df565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b03831661257f578060056000828254612574919061317c565b90915550611eb99050565b6001600160a01b038316600090815260076020526040812080548392906125a790849061310b565b90915550506001600160a01b03808316600081815260076020526040908190208054850190555190918516907fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148790611f1d9085815260200190565b7f0000000000000000000000000000000000000000000000000000000000000000612642836001600160a01b031660009081526007602052604090205490565b1015801561264e575080155b15612685576040517f787b1a4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600061270d83612984565b600101905060008167ffffffffffffffff81111561272d5761272d612cad565b6040519080825280601f01601f191660200182016040528015612757576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461276157509392505050565b6000828152600b60205260409020546bffffffffffffffffffffffff8211156127f5576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660019190910160a01b6001600160a01b031916019055565b6001600160a01b03811661284f57604051634e46966960e11b815260040160405180910390fd5b6000612878600154600160801b81046fffffffffffffffffffffffffffffffff90811691161490565b61288d576128866001612a66565b90506128a8565b6006805490600061289d836134b2565b919050555060065490505b6000818152600b60205260409020546001600160a01b031680156128f8576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f07818484611f2a565b6001600160a01b03811661292a57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c6020526040812080546129509060019061310b565b8154811061296057612960613486565b9060005260206000200154905061297982600083611f2a565b610b76600182612b01565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106129cd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106129f9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612a1757662386f26fc10000830492506010015b6305f5e1008310612a2f576305f5e100830492506008015b6127108310612a4357612710830492506004015b60648310612a55576064830492506002015b600a831061091e5760010192915050565b80546000906fffffffffffffffffffffffffffffffff600160801b8204811691168103612abf576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016fffffffffffffffffffffffffffffffff9081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546fffffffffffffffffffffffffffffffff8082166000190191600160801b9004811690821603612b5f576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6fffffffffffffffffffffffffffffffff16600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b031981168114610f5157600080fd5b600060208284031215612bd657600080fd5b8135610d3881612bae565b80356001600160a01b038116811461105b57600080fd5b600060208284031215612c0a57600080fd5b610d3882612be1565b60005b83811015612c2e578181015183820152602001612c16565b50506000910152565b6020815260008251806020840152612c56816040850160208701612c13565b601f01601f19169190910160400192915050565b600060208284031215612c7c57600080fd5b5035919050565b60008060408385031215612c9657600080fd5b612c9f83612be1565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215612cd557600080fd5b813567ffffffffffffffff80821115612ced57600080fd5b818401915084601f830112612d0157600080fd5b813581811115612d1357612d13612cad565b604051601f8201601f19908116603f01168101908382118183101715612d3b57612d3b612cad565b81604052828152876020848701011115612d5457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215612d8957600080fd5b612d9284612be1565b9250612da060208501612be1565b9150604084013590509250925092565b8035801515811461105b57600080fd5b60008060408385031215612dd357600080fd5b612ddc83612be1565b9150612dea60208401612db0565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612e2b57835183529284019291840191600101612e0f565b50909695505050505050565b600080600080600060808688031215612e4f57600080fd5b612e5886612be1565b9450612e6660208701612be1565b935060408601359250606086013567ffffffffffffffff80821115612e8a57600080fd5b818801915088601f830112612e9e57600080fd5b813581811115612ead57600080fd5b896020828501011115612ebf57600080fd5b9699959850939650602001949392505050565b803560ff8116811461105b57600080fd5b600060208284031215612ef557600080fd5b610d3882612ed2565b600080600080600080600060e0888a031215612f1957600080fd5b612f2288612be1565b9650612f3060208901612be1565b95506040880135945060608801359350612f4c60808901612ed2565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612f7b57600080fd5b612f8483612be1565b9150612dea60208401612be1565b600060208284031215612fa457600080fd5b610d3882612db0565b600181811c90821680612fc157607f821691505b602082108103612fe157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610f0757600081815260208120601f850160051c8101602086101561300e5750805b601f850160051c820191505b8181101561302d5782815560010161301a565b505050505050565b815167ffffffffffffffff81111561304f5761304f612cad565b6130638161305d8454612fad565b84612fe7565b602080601f83116001811461309857600084156130805750858301515b600019600386901b1c1916600185901b17855561302d565b600085815260208120601f198616915b828110156130c7578886015182559484019460019091019084016130a8565b50858210156130e55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8181038181111561091e5761091e6130f5565b634e487b7160e01b600052601260045260246000fd5b6000826131435761314361311e565b500490565b60006020828403121561315a57600080fd5b8151610d3881612bae565b808202811582820484141761091e5761091e6130f5565b8082018082111561091e5761091e6130f5565b60008161319e5761319e6130f5565b506000190190565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000815461320781612fad565b6001828116801561321f576001811461323457613263565b60ff1984168752821515830287019450613263565b8560005260208060002060005b8581101561325a5781548a820152908401908201613241565b50505082870194505b5050505092915050565b600061327982856131fa565b8351613289818360208801612c13565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600082516132cc818460208701612c13565b9190910192915050565b7f7b226e616d65223a20224368617070696520230000000000000000000000000081526000825161330e816013850160208701612c13565b9190910160130192915050565b6000825161332d818460208701612c13565b7f222c226465736372697074696f6e223a224348415050494520697320746865209201918252507f6669727374206578706572696d656e74616c204552432034303420444956494460208201527f454e4420746f6b656e206f6e20457468657265756d2e222c2265787465726e6160408201527f6c5f75726c223a2268747470733a2f2f636861707069652e6275696c64222c2260608201527f696d616765223a220000000000000000000000000000000000000000000000006080820152608801919050565b60008351613406818460208801612c13565b611437818401856131fa565b60008351613424818460208801612c13565b835190830190613438818360208801612c13565b01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161347981601b850160208701612c13565b91909101601b0192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000600182016134c4576134c46130f5565b5060010190565b6000826134da576134da61311e565b500690565b6000610d3882846131fa56fea26469706673582212205a4520c855bbadd0297c5f7d92d869813a7db432b2eb41ab27cd4478ddb7684764736f6c634300081400330000000000000000000000007c6ad8ef68278180e88055dd6e61caf92b9a899c

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103a45760003560e01c8063857f7630116101e9578063b3f9ea341161010f578063d5aed6bf116100ad578063f28ca1dd1161007c578063f28ca1dd1461087a578063f2fde38b14610882578063f46a04eb14610895578063f53bc835146108a857600080fd5b8063d5aed6bf14610805578063db56a6d614610818578063dd62ed3e14610821578063e985e9c51461084c57600080fd5b8063c87b56dd116100e9578063c87b56dd146107bf578063d1239730146107d2578063d2c22338146107df578063d505accf146107f257600080fd5b8063b3f9ea341461077b578063b88d4fde146107a4578063c5ab3ba6146107b757600080fd5b8063976a843511610187578063a8aa1b3111610156578063a8aa1b311461072c578063a9059cbb1461073f578063a9b981a314610752578063b1ab93171461075b57600080fd5b8063976a8435146106bc57806398746051146106e35780639b19251a146106f6578063a22cb4651461071957600080fd5b806389fb4c66116101c357806389fb4c661461067b5780638a62a6b3146106835780638da5cb5b146106a357806395d89b41146106b457600080fd5b8063857f76301461062857806385882ac61461064857806389262d2a1461066857600080fd5b80634e71d92d116102ce5780636a29e2e91161026c57806370a082311161023b57806370a08231146105d757806370db69d6146105f7578063715018a6146106005780637ecebe001461060857600080fd5b80636a29e2e9146105aa5780636c0360eb146105b35780636db74283146105bb5780636e2c93b1146105ce57600080fd5b80635b18b264116102a85780635b18b264146105685780636352211e1461057b57806364ab86751461058e57806369208be5146105a157600080fd5b80634e71d92d1461053a57806353d6fd591461054257806355f804b31461055557600080fd5b806318d217c311610346578063313ce56711610315578063313ce567146104d8578063322382e5146104ff5780633644e5151461051f57806342842e0e1461052757600080fd5b806318d217c31461048257806323b872dd146104975780632b112e49146104aa5780632bf8e8f6146104b257600080fd5b8063081812fc11610382578063081812fc1461041d578063095ea7b31461045e57806309d890d51461047157806318160ddd1461047957600080fd5b806301ffc9a7146103a957806302519da3146103d157806306fdde0314610408575b600080fd5b6103bc6103b7366004612bc4565b6108bb565b60405190151581526020015b60405180910390f35b6103fa6103df366004612bf8565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103c8565b610410610924565b6040516103c89190612c37565b61044661042b366004612c6a565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103c8565b6103bc61046c366004612c83565b6109b2565b6103fa610b2f565b6103fa60055481565b610495610490366004612cc3565b610b62565b005b6103bc6104a5366004612d74565b610b7a565b6103fa610d3f565b6013546104c690600160a01b900460ff1681565b60405160ff90911681526020016103c8565b6104c67f000000000000000000000000000000000000000000000000000000000000001281565b6103fa61050d366004612bf8565b600f6020526000908152604090205481565b6103fa610ddb565b610495610535366004612d74565b610e31565b610495610f0c565b610495610550366004612dc0565b610f54565b610495610563366004612cc3565b610f66565b6103fa610576366004612bf8565b610f7a565b610446610589366004612c6a565b610fea565b6103fa61059c366004612bf8565b611060565b6103fa60185481565b6103fa60165481565b61041061133c565b6103fa6105c9366004612bf8565b611349565b6103fa60175481565b6103fa6105e5366004612bf8565b60076020526000908152604090205481565b6103fa60195481565b610495611440565b6103fa610616366004612bf8565b600e6020526000908152604090205481565b6103fa610636366004612bf8565b60106020526000908152604090205481565b6103fa610656366004612c6a565b60126020526000908152604090205481565b610495610676366004612c6a565b611454565b6005546103fa565b6103fa610691366004612c6a565b60116020526000908152604090205481565b6000546001600160a01b0316610446565b610410611461565b6103fa7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b6104956106f1366004612c6a565b61146e565b6103bc610704366004612bf8565b600d6020526000908152604090205460ff1681565b610495610727366004612dc0565b61147b565b601354610446906001600160a01b031681565b6103bc61074d366004612c83565b611527565b6103fa60155481565b61076e610769366004612bf8565b61155b565b6040516103c89190612df3565b6103fa610789366004612bf8565b6001600160a01b03166000908152600c602052604090205490565b6104956107b2366004612e37565b6115c7565b6006546103fa565b6104106107cd366004612c6a565b611692565b601a546103bc9060ff1681565b6104956107ed366004612ee3565b6117da565b610495610800366004612efe565b611870565b610495610813366004612bf8565b611b2e565b6103fa60145481565b6103fa61082f366004612f68565b600860209081526000928352604080842090915290825290205481565b6103bc61085a366004612f68565b600a60209081526000928352604080842090915290825290205460ff1681565b610410611b58565b610495610890366004612bf8565b611b65565b6104956108a3366004612f92565b611bb9565b6104956108b6366004612c6a565b611bd4565b60006001600160e01b031982167fb374afc400000000000000000000000000000000000000000000000000000000148061091e57506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6003805461093190612fad565b80601f016020809104026020016040519081016040528092919081815260200182805461095d90612fad565b80156109aa5780601f1061097f576101008083540402835291602001916109aa565b820191906000526020600020905b81548152906001019060200180831161098d57829003601f168201915b505050505081565b600060065482111580156109c65750600082115b15610a94576000828152600b602052604090205482906001600160a01b0316338114801590610a1957506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15610a36576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518593918516917f797365dabb18fa726ccbccbe18c6f24c34e3b0653f2e99ea873bd7b84763dde691a45050610b26565b6001600160a01b038316610abb57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055805193845290830191909152810183905282907f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d839060600160405180910390a1505b50600192915050565b6000610b5d6001546fffffffffffffffffffffffffffffffff808216600160801b9092048116919091031690565b905090565b610b6a611be1565b601b610b768282613035565b5050565b60006001600160a01b038416610ba357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316610bca57604051634e46966960e11b815260040160405180910390fd5b6006548211610cc7576000828152600b602052604090205482906001600160a01b03868116911614610c0e576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03861614801590610c4b57506001600160a01b0385166000908152600a6020908152604080832033845290915290205460ff16155b8015610c6e57506000818152600960205260409020546001600160a01b03163314155b15610c8b576040516282b42960e81b815260040160405180910390fd5b610cb685857f0000000000000000000000000000000000000000000000000de0b6b3a7640000611c27565b610cc1858583611f2a565b50610d34565b6001600160a01b038416600090815260086020908152604080832033845290915290205482906000198114610d2557610d00828261310b565b6001600160a01b03871660009081526008602090815260408083203384529091529020555b610d30868684612111565b5050505b5060015b9392505050565b600080601281610d526201518042613134565b815260200190815260200160002054600014610d8d5760126000610d796201518042613134565b815260200190815260200160002054610d9e565b306000908152600760205260409020545b6013546001600160a01b031660009081526007602052604090205460055491925090610dcb90839061310b565b610dd5919061310b565b91505090565b60007f00000000000000000000000000000000000000000000000000000000000000014614610e0c57610b5d6124ba565b507f2a8d6b396eb5a90d2db4cbb95e2532b2816fd9c70a6d514d1f5b071b6a5861e990565b610e3c838383610b7a565b506001600160a01b0382163b15801590610ee95750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610eb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edc9190613148565b6001600160e01b03191614155b15610f0757604051633da6393160e01b815260040160405180910390fd5b505050565b6000610f1733611060565b336000908152600f60205260408120819055601780549293508392909190610f4090849061310b565b90915550610f519050303383612554565b50565b610f5c611be1565b610b768282612602565b610f6e611be1565b601c610b768282613035565b6018546001600160a01b03821660009081526007602052604081205490911180610fa95750610fa7610d3f565b155b15610fb2575060005b610fba610d3f565b6001600160a01b038316600090815260076020526040902054610fe090620f4240613165565b61091e9190613134565b6000818152600b60205260408120546001600160a01b03169050600654821180611012575081155b8061102457506001600160a01b038116155b1561105b576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6013546000906001600160a01b03908116908316036110c65760405162461bcd60e51b815260206004820152601660248201527f557365722063616e27742062652074686520706169720000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03821661111c5760405162461bcd60e51b815260206004820152601b60248201527f557365722063616e27742062652074686520302061646472657373000000000060448201526064016110bd565b600061112b6201518042613134565b90506014548111156111c75760148190556015546017546016543060009081526007602052604090205460649392916111639161310b565b61116d919061310b565b6111779190613165565b6111819190613134565b60008281526011602081815260408084209485553084526007825280842054868552601283529084205552905460168054919290916111c190849061317c565b90915550505b60006111d284610f7a565b6001600160a01b03851660009081526010602052604090205490915082111561131e576001600160a01b038416600090815260106020526040812054611218908461310b565b6018546001600160a01b03871660009081526007602052604081205492935091106112a3575b81156112a357620f42408360116000611257868961310b565b61126290600161317c565b81526020019081526020016000205461127b9190613165565b6112859190613134565b61128f908261317c565b90508161129b8161318f565b92505061123e565b80601660008282546112b5919061310b565b9250508190555080601760008282546112ce919061317c565b90915550506001600160a01b0386166000908152600f6020526040812080548392906112fb90849061317c565b9091555050506001600160a01b0385166000908152601060205260409020839055505b5050506001600160a01b03166000908152600f602052604090205490565b601c805461093190612fad565b60008061135583610f7a565b905060006113666201518042613134565b6001600160a01b03851660009081526010602052604090205490915081111561131e576001600160a01b0384166000908152601060205260408120546113ac908361310b565b6018546001600160a01b0387166000908152600760205260408120549293509110611437575b811561143757620f424084601160006113eb868861310b565b6113f690600161317c565b81526020019081526020016000205461140f9190613165565b6114199190613134565b611423908261317c565b90508161142f8161318f565b9250506113d2565b95945050505050565b611448611be1565b61145260006126b0565b565b61145c611be1565b601855565b6004805461093190612fad565b611476611be1565b601555565b6001600160a01b0382166114bb576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b03831661155057604051634e46966960e11b815260040160405180910390fd5b610d38338484612111565b6001600160a01b0381166000908152600c60209081526040918290208054835181840281018401909452808452606093928301828280156115bb57602002820191906000526020600020905b8154815260200190600101908083116115a7575b50505050509050919050565b6115d2858585610b7a565b506001600160a01b0384163b1580159061166d5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a029061161d9033908a908990899089906004016131a6565b6020604051808303816000875af115801561163c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116609190613148565b6001600160e01b03191614155b1561168b57604051633da6393160e01b815260040160405180910390fd5b5050505050565b60606000601c80546116a390612fad565b905011156116fa57601c6116b683612700565b6040516020016116c792919061326d565b60408051601f19818403018152908290526116e4916020016132ba565b6040516020818303038152906040529050919050565b600061170583612700565b60405160200161171591906132d6565b60408051601f19818403018152908290526117329160200161331b565b60408051601f198184030181529082905261175291601b906020016133f4565b60408051601f198184030181528282018252600283527f227d00000000000000000000000000000000000000000000000000000000000060208481019190915291519093506117a5918491849101613412565b60408051601f19818403018152908290526117c291602001613441565b60405160208183030381529060405292505050919050565b6117e2611be1565b600a8160ff16106118355760405162461bcd60e51b815260206004820152601e60248201527f466565732063616e27742062652067726561746572207468616e20313025000060448201526064016110bd565b6013805460ff909216600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b428410156118aa576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065485111580156118bc5750600085115b156118f3576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03861661191a57604051635461585f60e01b815260040160405180910390fd5b60006001611926610ddb565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611a4d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580611a825750876001600160a01b0316816001600160a01b031614155b15611ab9576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990558051938b1684529083019190915281018690527f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d839060600160405180910390a150505050505050565b611b36611be1565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b601b805461093190612fad565b611b6d611be1565b6001600160a01b038116611bb0576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024016110bd565b610f51816126b0565b611bc1611be1565b601a805460ff1916911515919091179055565b611bdc611be1565b601955565b6000546001600160a01b03163314611452576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016110bd565b6001600160a01b038316611c52578060056000828254611c47919061317c565b90915550611d889050565b6013546001600160a01b03838116911614611cd6576001600160a01b0382166000908152601060205260408120549003611cad57611c936201518042613134565b6001600160a01b0383166000908152601060205260409020555b6001600160a01b03821660009081526007602052604090205415611cd657611cd482611060565b505b6013546001600160a01b03848116911614611d5a576001600160a01b0383166000908152601060205260408120549003611d3157611d176201518042613134565b6001600160a01b0384166000908152601060205260409020555b6001600160a01b03831660009081526007602052604090205415611d5a57611d5883611060565b505b6001600160a01b03831660009081526007602052604081208054839290611d8290849061310b565b90915550505b6013546001600160a01b038381169116148015611dbe57506001600160a01b0383166000908152600d602052604090205460ff16155b15611e2e57601354600090606490611de090600160a01b900460ff1684613165565b611dea9190613134565b90506000611df8828461310b565b3060009081526007602052604080822080549095019094556001600160a01b038616815292909220805490920190915550611ed8565b6013546001600160a01b0390811690841603611eb9576019546001600160a01b038316600090815260076020526040902054611e6b90839061317c565b1115611eb95760405162461bcd60e51b815260206004820152601c60248201527f596f752068617665207265616368656420746865206d6178206275790000000060448201526064016110bd565b6001600160a01b03821660009081526007602052604090208054820190555b816001600160a01b0316836001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148783604051611f1d91815260200190565b60405180910390a3505050565b6001600160a01b0383161561204457600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c90915281208054611f799060019061310b565b81548110611f8957611f89613486565b90600052602060002001549050818114612005576000828152600b602052604081205460a01c6000190190508019611fc057600080fd5b6001600160a01b0385166000908152600c60205260409020805483919083908110611fed57611fed613486565b60009182526020909120015561200382826127a0565b505b6001600160a01b0384166000908152600c6020526040902080548061202c5761202c61349c565b60019003818190600052602060002001600090559055505b6001600160a01b038216156120bb576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546120b69183916120b1919061310b565b6127a0565b6120cb565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190612142868686611c27565b601a5460ff1661215757600192505050610d38565b6001600160a01b038087166000908152600d602052604080822054928816825290205460ff918216911681801561218b5750805b6124ac57811561223e5760006121c17f0000000000000000000000000000000000000000000000000de0b6b3a764000085613134565b6001600160a01b038916600090815260076020526040902054612205907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613134565b61220f919061310b565b905060005b818110156122375761222589612828565b8061222f816134b2565b915050612214565b50506124ac565b80156122e4576001600160a01b038816600090815260076020526040812054612288907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613134565b6122b27f0000000000000000000000000000000000000000000000000de0b6b3a764000087613134565b6122bc919061310b565b905060005b81811015612237576122d28a612903565b806122dc816134b2565b9150506122c1565b60006123107f0000000000000000000000000000000000000000000000000de0b6b3a764000088613134565b905060005b8181101561239e576001600160a01b038a166000908152600c60205260408120546123429060019061310b565b6001600160a01b038c166000908152600c60205260408120805492935090918390811061237157612371613486565b906000526020600020015490506123898c8c83611f2a565b50508080612396906134b2565b915050612315565b5060006123cb7f0000000000000000000000000000000000000000000000000de0b6b3a7640000896134cb565b90506123f77f0000000000000000000000000000000000000000000000000de0b6b3a764000087613134565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612422838961310b565b61242c9190613134565b101561243b5761243b8a612903565b6124657f0000000000000000000000000000000000000000000000000de0b6b3a764000086613134565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612490838861317c565b61249a9190613134565b11156124a9576124a989612828565b50505b506001979650505050505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516124ec91906134df565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b03831661257f578060056000828254612574919061317c565b90915550611eb99050565b6001600160a01b038316600090815260076020526040812080548392906125a790849061310b565b90915550506001600160a01b03808316600081815260076020526040908190208054850190555190918516907fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148790611f1d9085815260200190565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612642836001600160a01b031660009081526007602052604090205490565b1015801561264e575080155b15612685576040517f787b1a4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600061270d83612984565b600101905060008167ffffffffffffffff81111561272d5761272d612cad565b6040519080825280601f01601f191660200182016040528015612757576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461276157509392505050565b6000828152600b60205260409020546bffffffffffffffffffffffff8211156127f5576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660019190910160a01b6001600160a01b031916019055565b6001600160a01b03811661284f57604051634e46966960e11b815260040160405180910390fd5b6000612878600154600160801b81046fffffffffffffffffffffffffffffffff90811691161490565b61288d576128866001612a66565b90506128a8565b6006805490600061289d836134b2565b919050555060065490505b6000818152600b60205260409020546001600160a01b031680156128f8576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f07818484611f2a565b6001600160a01b03811661292a57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c6020526040812080546129509060019061310b565b8154811061296057612960613486565b9060005260206000200154905061297982600083611f2a565b610b76600182612b01565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106129cd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106129f9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612a1757662386f26fc10000830492506010015b6305f5e1008310612a2f576305f5e100830492506008015b6127108310612a4357612710830492506004015b60648310612a55576064830492506002015b600a831061091e5760010192915050565b80546000906fffffffffffffffffffffffffffffffff600160801b8204811691168103612abf576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016fffffffffffffffffffffffffffffffff9081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546fffffffffffffffffffffffffffffffff8082166000190191600160801b9004811690821603612b5f576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6fffffffffffffffffffffffffffffffff16600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b031981168114610f5157600080fd5b600060208284031215612bd657600080fd5b8135610d3881612bae565b80356001600160a01b038116811461105b57600080fd5b600060208284031215612c0a57600080fd5b610d3882612be1565b60005b83811015612c2e578181015183820152602001612c16565b50506000910152565b6020815260008251806020840152612c56816040850160208701612c13565b601f01601f19169190910160400192915050565b600060208284031215612c7c57600080fd5b5035919050565b60008060408385031215612c9657600080fd5b612c9f83612be1565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215612cd557600080fd5b813567ffffffffffffffff80821115612ced57600080fd5b818401915084601f830112612d0157600080fd5b813581811115612d1357612d13612cad565b604051601f8201601f19908116603f01168101908382118183101715612d3b57612d3b612cad565b81604052828152876020848701011115612d5457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215612d8957600080fd5b612d9284612be1565b9250612da060208501612be1565b9150604084013590509250925092565b8035801515811461105b57600080fd5b60008060408385031215612dd357600080fd5b612ddc83612be1565b9150612dea60208401612db0565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612e2b57835183529284019291840191600101612e0f565b50909695505050505050565b600080600080600060808688031215612e4f57600080fd5b612e5886612be1565b9450612e6660208701612be1565b935060408601359250606086013567ffffffffffffffff80821115612e8a57600080fd5b818801915088601f830112612e9e57600080fd5b813581811115612ead57600080fd5b896020828501011115612ebf57600080fd5b9699959850939650602001949392505050565b803560ff8116811461105b57600080fd5b600060208284031215612ef557600080fd5b610d3882612ed2565b600080600080600080600060e0888a031215612f1957600080fd5b612f2288612be1565b9650612f3060208901612be1565b95506040880135945060608801359350612f4c60808901612ed2565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612f7b57600080fd5b612f8483612be1565b9150612dea60208401612be1565b600060208284031215612fa457600080fd5b610d3882612db0565b600181811c90821680612fc157607f821691505b602082108103612fe157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610f0757600081815260208120601f850160051c8101602086101561300e5750805b601f850160051c820191505b8181101561302d5782815560010161301a565b505050505050565b815167ffffffffffffffff81111561304f5761304f612cad565b6130638161305d8454612fad565b84612fe7565b602080601f83116001811461309857600084156130805750858301515b600019600386901b1c1916600185901b17855561302d565b600085815260208120601f198616915b828110156130c7578886015182559484019460019091019084016130a8565b50858210156130e55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8181038181111561091e5761091e6130f5565b634e487b7160e01b600052601260045260246000fd5b6000826131435761314361311e565b500490565b60006020828403121561315a57600080fd5b8151610d3881612bae565b808202811582820484141761091e5761091e6130f5565b8082018082111561091e5761091e6130f5565b60008161319e5761319e6130f5565b506000190190565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000815461320781612fad565b6001828116801561321f576001811461323457613263565b60ff1984168752821515830287019450613263565b8560005260208060002060005b8581101561325a5781548a820152908401908201613241565b50505082870194505b5050505092915050565b600061327982856131fa565b8351613289818360208801612c13565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600082516132cc818460208701612c13565b9190910192915050565b7f7b226e616d65223a20224368617070696520230000000000000000000000000081526000825161330e816013850160208701612c13565b9190910160130192915050565b6000825161332d818460208701612c13565b7f222c226465736372697074696f6e223a224348415050494520697320746865209201918252507f6669727374206578706572696d656e74616c204552432034303420444956494460208201527f454e4420746f6b656e206f6e20457468657265756d2e222c2265787465726e6160408201527f6c5f75726c223a2268747470733a2f2f636861707069652e6275696c64222c2260608201527f696d616765223a220000000000000000000000000000000000000000000000006080820152608801919050565b60008351613406818460208801612c13565b611437818401856131fa565b60008351613424818460208801612c13565b835190830190613438818360208801612c13565b01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161347981601b850160208701612c13565b91909101601b0192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000600182016134c4576134c46130f5565b5060010190565b6000826134da576134da61311e565b500690565b6000610d3882846131fa56fea26469706673582212205a4520c855bbadd0297c5f7d92d869813a7db432b2eb41ab27cd4478ddb7684764736f6c63430008140033

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

0000000000000000000000007c6ad8ef68278180e88055dd6e61caf92b9a899c

-----Decoded View---------------
Arg [0] : _owner (address): 0x7C6ad8eF68278180E88055dD6e61CAF92B9A899c

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007c6ad8ef68278180e88055dd6e61caf92b9a899c


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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