ETH Price: $2,514.84 (+1.87%)

Contract

0x9d6125A1a14744966461a21692450cF3a20FBd10
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer197363742024-04-26 1:51:23130 days ago1714096283IN
0x9d6125A1...3a20FBd10
0 ETH0.010180135.81860636
Transfer192712622024-02-20 20:22:35195 days ago1708460555IN
0x9d6125A1...3a20FBd10
0 ETH0.0531123239.00359175
Approve192712492024-02-20 20:19:59195 days ago1708460399IN
0x9d6125A1...3a20FBd10
0 ETH0.00608787125.02829903
Transfer192272432024-02-14 15:58:59201 days ago1707926339IN
0x9d6125A1...3a20FBd10
0 ETH0.0327547941.64044739
Transfer191898642024-02-09 10:05:47206 days ago1707473147IN
0x9d6125A1...3a20FBd10
0 ETH0.0014117246.23143172
Approve191883672024-02-09 5:02:59207 days ago1707454979IN
0x9d6125A1...3a20FBd10
0 ETH0.0013492446.95969315
Approve191851772024-02-08 18:18:23207 days ago1707416303IN
0x9d6125A1...3a20FBd10
0 ETH0.0044055890.59017449
Approve191850982024-02-08 18:02:35207 days ago1707415355IN
0x9d6125A1...3a20FBd10
0 ETH0.0043247188.92727791
Approve191850652024-02-08 17:55:47207 days ago1707414947IN
0x9d6125A1...3a20FBd10
0 ETH0.0043414289.27092177
Approve191850552024-02-08 17:53:35207 days ago1707414815IN
0x9d6125A1...3a20FBd10
0 ETH0.00518839106.68682245
Approve191850552024-02-08 17:53:35207 days ago1707414815IN
0x9d6125A1...3a20FBd10
0 ETH0.00518839106.68682245
Approve191850542024-02-08 17:53:23207 days ago1707414803IN
0x9d6125A1...3a20FBd10
0 ETH0.00516528106.2115894
Approve191850542024-02-08 17:53:23207 days ago1707414803IN
0x9d6125A1...3a20FBd10
0 ETH0.00534207109.7115894
Approve191850532024-02-08 17:53:11207 days ago1707414791IN
0x9d6125A1...3a20FBd10
0 ETH0.00539883111.01408866
Approve191850532024-02-08 17:53:11207 days ago1707414791IN
0x9d6125A1...3a20FBd10
0 ETH0.00550288113.01408866
Approve191850512024-02-08 17:52:47207 days ago1707414767IN
0x9d6125A1...3a20FBd10
0 ETH0.00544738112.56786025
Approve191850502024-02-08 17:52:35207 days ago1707414755IN
0x9d6125A1...3a20FBd10
0 ETH0.00521411107.21582196
Approve191850502024-02-08 17:52:35207 days ago1707414755IN
0x9d6125A1...3a20FBd10
0 ETH0.00535913110.19780536
Approve191850482024-02-08 17:52:11207 days ago1707414731IN
0x9d6125A1...3a20FBd10
0 ETH0.00526072108.17409419
Approve191850472024-02-08 17:51:59207 days ago1707414719IN
0x9d6125A1...3a20FBd10
0 ETH0.00539448110.92450508
Approve191850462024-02-08 17:51:47207 days ago1707414707IN
0x9d6125A1...3a20FBd10
0 ETH0.00508518105.08309778
Approve191850462024-02-08 17:51:47207 days ago1707414707IN
0x9d6125A1...3a20FBd10
0 ETH0.00536769110.23778715
Approve191850442024-02-08 17:51:23207 days ago1707414683IN
0x9d6125A1...3a20FBd10
0 ETH0.00538291110.68668206
Approve191850442024-02-08 17:51:23207 days ago1707414683IN
0x9d6125A1...3a20FBd10
0 ETH0.00538291110.68668206
Approve191850432024-02-08 17:51:11207 days ago1707414671IN
0x9d6125A1...3a20FBd10
0 ETH0.00505856104.63687355
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:
Engine404

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 10 : Engine404.sol
/**
 * @title Engine404 as the first protocol to introduce utility to ERC404 standard tokens, presents a distinctive feature with a total supply limited to only 1000 tokens.
 * @dev Engine404 is a ERC404 standard
 * 
 * Website: https://engine404.com
 * Twitter: https://twitter.com/engine_404
 * Portal: https://t.me/engine404_portal
 * News: https://t.me/engine404_channel
 */

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {ERC404} from "./ERC404.sol";
import {IUniswapV3Factory} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

contract Engine404 is ERC404 {
    string public dataURI;

    constructor() ERC404("Engine404", "ENGINE", 18, 1_000 * 1e18) {
        address WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

        whitelist[_msgSender()] = true;
        address pair = IUniswapV3Factory(
            0x1F98431c8aD98523631AE4a59f267346ea31F984
        ).createPool(address(this), WETH9, 10000);
        whitelist[pair] = true;
        whitelist[0xC36442b4a4522E871399CD717aBDD847Ab11FE88] = true; // NonfungiblePositionManager
        balanceOf[_msgSender()] = totalSupply;
    }

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

    function tokenURI(uint256 id) public view override returns (string memory) {
        if (bytes(baseTokenURI).length > 0) {
            return string.concat(baseTokenURI, Strings.toString(id));
        } else {
            Rarity rare = rarity[id];
            string memory rareString;
            string memory image;

            if (rare == Rarity.Common) {
                rareString = "Common";
                image = "common.png";
            } else if (rare == Rarity.Uncommon) {
                rareString = "Uncommon";
                image = "uncommon.png";
            } else if (rare == Rarity.Rare) {
                rareString = "Rare";
                image = "rare.png";
            } else if (rare == Rarity.Epic) {
                rareString = "Epic";
                image = "epic.png";
            } else if (rare == Rarity.Legendary) {
                rareString = "Legendary";
                image = "legendary.png";
            }
            string memory jsonPreImage = string.concat(
                string.concat(
                    string.concat(
                        '{"name": "Engine404 #',
                        Strings.toString(id)
                    ),
                    '","description":"Engine404 as the first protocol to introduce utility to ERC404 standard tokens, presents a distinctive feature with a total supply limited to only 1000 tokens","external_url":"https://engine404.com","image":"'
                ),
                string.concat(dataURI, image)
            );
            string memory jsonPostImage = string.concat(
                '","attributes":[{"trait_type":"Rarity","value":"',
                rareString
            );
            string memory jsonPostTraits = '"}]}';

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

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

File 4 of 10 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (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; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                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.
            require(denominator > prod1, "Math: mulDiv overflow");

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            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 (rounding == Rounding.Up && 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 down.
     *
     * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 5 of 10 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @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 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        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), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(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) {
        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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

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

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

File 7 of 10 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

File 8 of 10 : IUniswapV3Factory.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    /// @notice Emitted when a pool is created
    /// @param token0 The first token of the pool by address sort order
    /// @param token1 The second token of the pool by address sort order
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks
    /// @param pool The address of the created pool
    event PoolCreated(
        address indexed token0,
        address indexed token1,
        uint24 indexed fee,
        int24 tickSpacing,
        address pool
    );

    /// @notice Emitted when a new fee amount is enabled for pool creation via the factory
    /// @param fee The enabled fee, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);

    /// @notice Returns the current owner of the factory
    /// @dev Can be changed by the current owner via setOwner
    /// @return The address of the factory owner
    function owner() external view returns (address);

    /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
    /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
    /// @return The tick spacing
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);

    /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
    /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The pool address
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);

    /// @notice Creates a pool for the given two tokens and fee
    /// @param tokenA One of the two tokens in the desired pool
    /// @param tokenB The other of the two tokens in the desired pool
    /// @param fee The desired fee for the pool
    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
    /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
    /// are invalid.
    /// @return pool The address of the newly created pool
    function createPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external returns (address pool);

    /// @notice Updates the owner of the factory
    /// @dev Must be called by the current owner
    /// @param _owner The new owner of the factory
    function setOwner(address _owner) external;

    /// @notice Enables a fee amount with the given tickSpacing
    /// @dev Fee amounts may never be removed once enabled
    /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
    /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}

File 9 of 10 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 10 of 10 : ERC404.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.21;

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

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

contract ERC404 is Ownable {
    // Events
    event ERC20Transfer(
        address indexed from,
        address indexed to,
        uint256 amount
    );
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 amount
    );
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 indexed id
    );
    event ERC721Approval(
        address indexed owner,
        address indexed spender,
        uint256 indexed id
    );
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );

    // Errors
    error TokenNotFound();
    error AlreadyExists();
    error InvalidRecipient();
    error InvalidSender();
    error UnsafeRecipient();
    error InvalidId();
    error IdNotAssigned();
    error PoolIsEmpty();
    error InvalidSetWhitelistCondition();
    error Unauthorized();
    error InvalidOwner();

    enum Rarity {
        NA,
        Common,
        Uncommon,
        Rare,
        Epic,
        Legendary
    }

    // Metadata
    /// @dev Token name
    string public name;

    /// @dev Token symbol
    string public symbol;

    /// @dev Decimals for fractional representation
    uint8 public immutable decimals = 18;

    /// @dev Total supply in fractionalized representation
    uint256 public immutable totalSupply;

    /// NFT Metadata
    /// @dev Base URI for token metadata
    string public baseTokenURI;
    /// max supply of native tokens
    uint256 public erc721totalSupply;
    /// @dev Array of available ids
    uint256[] public tokenIdPool;

    /// @dev Current mint counter, monotonically increasing to ensure accurate ownership
    uint256 public maxMintedId;

    // Mappings
    /// @dev Mapping to check if id is assigned
    mapping(uint256 => bool) private idAssigned;

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

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

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

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

    /// @dev Owner of id in native representation
    mapping(uint256 => address) internal _ownerOf;

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

    /// @dev Tracks indices for the _owned mapping
    mapping(uint256 => uint256) internal _ownedIndex;

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

    /// @dev rarity of the token
    mapping(uint256 => Rarity) public rarity;

    // Constructor
    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals,
        uint256 _totalNativeSupply
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
        erc721totalSupply = _totalNativeSupply / (10 ** _decimals);
        totalSupply = _totalNativeSupply;
    }

    /// @notice Initialization function to set pairs / etc
    ///         saving gas by avoiding mint / burn on unnecessary targets
    function setWhitelist(address target, bool state) public onlyOwner {
        /// only can set whitelist when target has no balance
        if (balanceOf[target] > 0) {
            revert InvalidSetWhitelistCondition();
        }
        whitelist[target] = state;
    }

    /// @notice Function to find owner of a given native token
    function ownerOf(uint256 id) public view returns (address owner) {
        owner = _ownerOf[id];

        if (owner == address(0)) {
            revert TokenNotFound();
        }
    }

    function setTokenURI(string memory _tokenURI) public onlyOwner {
        baseTokenURI = _tokenURI;
    }

    function tokenURI(uint256 id) public virtual returns (string memory) {
        if (id >= totalSupply || id <= 0) {
            revert InvalidId();
        }
        return string.concat(baseTokenURI, Strings.toString(id));
    }

    /// @notice Function for token approvals
    /// @dev This function assumes id / native if amount less than or equal to current max id
    function approve(
        address spender,
        uint256 amountOrId
    ) public returns (bool) {
        if (amountOrId <= maxMintedId && amountOrId > 0) {
            address owner = _ownerOf[amountOrId];

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

            getApproved[amountOrId] = spender;

            emit Approval(owner, spender, amountOrId);
        } else {
            allowance[msg.sender][spender] = amountOrId;

            emit Approval(msg.sender, spender, amountOrId);
        }

        return true;
    }

    /// @notice Function native approvals
    function setApprovalForAll(address operator, bool approved) public {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /// @notice Function same as setApprovalForAll but for all tokens fixed metamask new version
    function setApprovalAllERC404(address operator, bool approved) public {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /// @notice Function for mixed transfers
    /// @dev This function assumes id / native if amount less than or equal to current max id
    function transferFrom(address from, address to, uint256 amountOrId) public {
        if (amountOrId <= erc721totalSupply) {
            if (from != _ownerOf[amountOrId]) {
                revert InvalidSender();
            }

            if (to == address(0)) {
                revert InvalidRecipient();
            }

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

            balanceOf[from] -= _getUnit();

            unchecked {
                balanceOf[to] += _getUnit();
            }

            _ownerOf[amountOrId] = to;
            delete getApproved[amountOrId];

            // update _owned for sender
            uint256 updatedId = _owned[from][_owned[from].length - 1];
            _owned[from][_ownedIndex[amountOrId]] = updatedId;
            // pop
            _owned[from].pop();
            // update index for the moved id
            _ownedIndex[updatedId] = _ownedIndex[amountOrId];
            // push token to to owned
            _owned[to].push(amountOrId);
            // update index for to owned
            _ownedIndex[amountOrId] = _owned[to].length - 1;

            emit Transfer(from, to, amountOrId);
            emit ERC20Transfer(from, to, _getUnit());
        } else {
            uint256 allowed = allowance[from][msg.sender];

            if (allowed != type(uint256).max)
                allowance[from][msg.sender] = allowed - amountOrId;

            _transfer(from, to, amountOrId);
        }
    }

    /// @notice Function for fractional transfers
    function transfer(address to, uint256 amount) public returns (bool) {
        return _transfer(msg.sender, to, amount);
    }

    /// @notice Function for native transfers with contract support
    function safeTransferFrom(address from, address to, uint256 id) public {
        transferFrom(from, to, id);

        if (
            to.code.length != 0 &&
            ERC721Receiver(to).onERC721Received(msg.sender, from, id, "") !=
            ERC721Receiver.onERC721Received.selector
        ) {
            revert UnsafeRecipient();
        }
    }

    /// @notice Function for native transfers with contract support and callback data
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes calldata data
    ) public {
        transferFrom(from, to, id);

        if (
            to.code.length != 0 &&
            ERC721Receiver(to).onERC721Received(msg.sender, from, id, data) !=
            ERC721Receiver.onERC721Received.selector
        ) {
            revert UnsafeRecipient();
        }
    }

    /// @notice Internal function for fractional transfers
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal returns (bool) {
        uint256 unit = _getUnit();
        uint256 balanceBeforeSender = balanceOf[from];
        uint256 balanceBeforeReceiver = balanceOf[to];

        balanceOf[from] -= amount;

        unchecked {
            balanceOf[to] += amount;
        }

        // Skip burn for certain addresses to save gas
        if (!whitelist[from]) {
            uint256 tokens_to_burn = (balanceBeforeSender / unit) -
                (balanceOf[from] / unit);
            for (uint256 i = 0; i < tokens_to_burn; i++) {
                _burn(from);
            }
        }

        // Skip minting for certain addresses to save gas
        if (!whitelist[to]) {
            uint256 tokens_to_mint = (balanceOf[to] / unit) -
                (balanceBeforeReceiver / unit);
            for (uint256 i = 0; i < tokens_to_mint; i++) {
                _mint(to);
            }
        }

        emit ERC20Transfer(from, to, amount);
        return true;
    }

    // Internal utility logic
    function _getUnit() internal pure returns (uint256) {
        return 10 ** decimals;
    }

    function _getIdFromPool() private returns (uint256) {
        if (tokenIdPool.length == 0) {
            revert PoolIsEmpty();
        }
        uint256 randomIndex = uint256(
            keccak256(
                abi.encodePacked(
                    block.timestamp,
                    msg.sender,
                    tokenIdPool.length
                )
            )
        ) % tokenIdPool.length;
        uint256 id = tokenIdPool[randomIndex];
        tokenIdPool[randomIndex] = tokenIdPool[tokenIdPool.length - 1];
        tokenIdPool.pop();
        idAssigned[id] = true;
        return id;
    }

    function _returnIdToPool(uint256 id) private {
        if (!idAssigned[id]) {
            revert IdNotAssigned();
        }
        tokenIdPool.push(id);
        idAssigned[id] = false;
    }

    function _mint(address to) internal {
        if (to == address(0)) {
            revert InvalidRecipient();
        }

        uint256 id;

        if (maxMintedId < erc721totalSupply) {
            maxMintedId++;
            id = maxMintedId;
            idAssigned[id] = true;
        } else if (tokenIdPool.length > 0) {
            id = _getIdFromPool();
        } else {
            revert PoolIsEmpty();
        }

        if (rarity[id] == Rarity.NA) {
            uint seed = generateRandomNumber(id);
            // Common,      40%
            // Uncommon,    25%
            // Rare,        20%
            // Epic,        10%
            // Legendary    5%
            if (seed <= 400) {
                rarity[id] = Rarity.Common;
            } else if (seed <= 650) {
                rarity[id] = Rarity.Uncommon;
            } else if (seed <= 850) {
                rarity[id] = Rarity.Rare;
            } else if (seed <= 950) {
                rarity[id] = Rarity.Epic;
            } else {
                rarity[id] = Rarity.Legendary;
            }
        }
        _ownerOf[id] = to;
        _owned[to].push(id);
        _ownedIndex[id] = _owned[to].length - 1;

        emit Transfer(address(0), to, id);
    }

    function tokensOfOwner(
        address owner
    ) public view returns (uint256[] memory) {
        return _owned[owner];
    }

    function tokenOfIndex(
        address owner,
        uint256 index
    ) public view returns (uint256) {
        return _owned[owner][index];
    }

    function generateRandomNumber(
        uint256 _tokenId
    ) private view returns (uint) {
        uint randomNumber = uint(
            keccak256(
                abi.encodePacked(
                    blockhash(block.number - 1),
                    block.timestamp + _tokenId
                )
            )
        );
        return (randomNumber % 1000);
    }

    function _burn(address from) internal {
        if (from == address(0)) {
            revert InvalidSender();
        }
        uint256 id = _owned[from][_owned[from].length - 1];
        _returnIdToPool(id);
        _owned[from].pop();
        delete _ownedIndex[id];
        delete _ownerOf[id];
        delete getApproved[id];

        emit Transfer(from, address(0), id);
    }

    function getBurnedToken() public view returns (uint256[] memory) {
        return tokenIdPool;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"IdNotAssigned","type":"error"},{"inputs":[],"name":"InvalidId","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSetWhitelistCondition","type":"error"},{"inputs":[],"name":"PoolIsEmpty","type":"error"},{"inputs":[],"name":"TokenNotFound","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":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"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":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":[{"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":"amountOrId","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":[],"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":"getBurnedToken","outputs":[{"internalType":"uint256[]","name":"","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":[],"name":"maxMintedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarity","outputs":[{"internalType":"enum ERC404.Rarity","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"setApprovalAllERC404","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":"_dataURI","type":"string"}],"name":"setDataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountOrId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c060405260126080523480156200001657600080fd5b5060405180604001604052806009815260200168115b99da5b994d0c0d60ba1b81525060405180604001604052806006815260200165454e47494e4560d01b8152506012683635c9adc5dea000006200007e620000786200022660201b60201c565b6200022a565b60016200008c85826200031f565b5060026200009b84826200031f565b5060ff8216608052620000b082600a62000500565b620000bc908262000518565b600490815560a091909152336000908152600f60209081526040808320805460ff19166001179055805163a167129560e01b8152309481019490945273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26024850181905261271060448601529051909650919450731f98431c8ad98523631ae4a59f267346ea31f984935063a16712959260648082019391829003018187875af115801562000163573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200018991906200053b565b6001600160a01b0381166000908152600f602052604081208054600160ff19918216811790925573c36442b4a4522e871399cd717abdd847ab11fe8883527f2025ab860bb5b290ac0a08fbfe3ef7540f544a49e89b288ca86d45d7f837d3198054909116909117905560a051919250600890620002033390565b6001600160a01b0316815260208101919091526040016000205550620005669050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002a557607f821691505b602082108103620002c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200031a57600081815260208120601f850160051c81016020861015620002f55750805b601f850160051c820191505b81811015620003165782815560010162000301565b5050505b505050565b81516001600160401b038111156200033b576200033b6200027a565b62000353816200034c845462000290565b84620002cc565b602080601f8311600181146200038b5760008415620003725750858301515b600019600386901b1c1916600185901b17855562000316565b600085815260208120601f198616915b82811015620003bc578886015182559484019460019091019084016200039b565b5085821015620003db5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000442578160001904821115620004265762000426620003eb565b808516156200043457918102915b93841c939080029062000406565b509250929050565b6000826200045b57506001620004fa565b816200046a57506000620004fa565b81600181146200048357600281146200048e57620004ae565b6001915050620004fa565b60ff841115620004a257620004a2620003eb565b50506001821b620004fa565b5060208310610133831016604e8410600b8410161715620004d3575081810a620004fa565b620004df838362000401565b8060001904821115620004f657620004f6620003eb565b0290505b92915050565b60006200051160ff8416836200044a565b9392505050565b6000826200053657634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200054e57600080fd5b81516001600160a01b03811681146200051157600080fd5b60805160a0516125f962000593600039600061029e0152600081816102f6015261132e01526125f96000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638b58c5691161011a578063c87b56dd116100ad578063dd62ed3e1161007c578063dd62ed3e14610499578063e0df5b6f146104c4578063e985e9c5146104d7578063f28ca1dd14610505578063f2fde38b1461050d57600080fd5b8063c87b56dd1461046b578063ca4c0e091461047e578063d547cfb714610491578063dbcbe33c1461041f57600080fd5b8063a22cb465116100e9578063a22cb4651461041f578063a9059cbb14610432578063b88d4fde14610445578063c592e6f61461045857600080fd5b80638b58c569146103b35780638da5cb5b146103e357806395d89b41146103f45780639b19251a146103fc57600080fd5b8063313ce5671161019257806369562e821161016157806369562e821461036357806370a0823114610378578063715018a6146103985780638462151c146103a057600080fd5b8063313ce567146102f157806342842e0e1461032a57806353d6fd591461033d5780636352211e1461035057600080fd5b806318160ddd116101ce57806318160ddd1461029957806318d217c3146102c057806323b872dd146102d55780632c88797e146102e857600080fd5b806306fdde031461020057806307c560011461021e578063081812fc14610235578063095ea7b314610276575b600080fd5b610208610520565b6040516102159190611c57565b60405180910390f35b61022760065481565b604051908152602001610215565b61025e610243366004611c8a565b600a602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610215565b610289610284366004611cba565b6105ae565b6040519015158152602001610215565b6102277f000000000000000000000000000000000000000000000000000000000000000081565b6102d36102ce366004611cfa565b6106ff565b005b6102d36102e3366004611dab565b610717565b61022760045481565b6103187f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610215565b6102d3610338366004611dab565b610aa0565b6102d361034b366004611de7565b610b75565b61025e61035e366004611c8a565b610bdf565b61036b610c1a565b6040516102159190611e23565b610227610386366004611e67565b60086020526000908152604090205481565b6102d3610c72565b61036b6103ae366004611e67565b610c86565b6103d66103c1366004611c8a565b60106020526000908152604090205460ff1681565b6040516102159190611e98565b6000546001600160a01b031661025e565b610208610cf2565b61028961040a366004611e67565b600f6020526000908152604090205460ff1681565b6102d361042d366004611de7565b610cff565b610289610440366004611cba565b610d6b565b6102d3610453366004611ec0565b610d7f565b610227610466366004611cba565b610e42565b610208610479366004611c8a565b610e7f565b61022761048c366004611c8a565b611200565b610208611221565b6102276104a7366004611f5b565b600960209081526000928352604080842090915290825290205481565b6102d36104d2366004611cfa565b61122e565b6102896104e5366004611f5b565b600b60209081526000928352604080842090915290825290205460ff1681565b610208611242565b6102d361051b366004611e67565b61124f565b6001805461052d90611f8e565b80601f016020809104026020016040519081016040528092919081815260200182805461055990611f8e565b80156105a65780601f1061057b576101008083540402835291602001916105a6565b820191906000526020600020905b81548152906001019060200180831161058957829003601f168201915b505050505081565b600060065482111580156105c25750600082115b15610699576000828152600c60205260409020546001600160a01b031633811480159061061357506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff16155b15610630576040516282b42960e81b815260040160405180910390fd5b6000838152600a602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506106f5565b3360008181526009602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6107076112cd565b60116107138282612016565b5050565b6004548111610a31576000818152600c60205260409020546001600160a01b0384811691161461075a57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03821661078157604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038416148015906107be57506001600160a01b0383166000908152600b6020908152604080832033845290915290205460ff16155b80156107e157506000818152600a60205260409020546001600160a01b03163314155b156107fe576040516282b42960e81b815260040160405180910390fd5b610806611327565b6001600160a01b0384166000908152600860205260408120805490919061082e9084906120ec565b9091555061083c9050611327565b6001600160a01b0380841660008181526008602090815260408083208054909601909555858252600c815284822080546001600160a01b03199081169094179055600a815284822080549093169092559186168252600d905290812080546108a6906001906120ec565b815481106108b6576108b66120ff565b60009182526020808320909101546001600160a01b0387168352600d82526040808420868552600e909352909220548154929350839281106108fa576108fa6120ff565b60009182526020808320909101929092556001600160a01b0386168152600d9091526040902080548061092f5761092f612115565b600082815260208082208301600019908101839055909201909255838252600e8152604080832054848452818420556001600160a01b038616808452600d8352908320805460018181018355828652938520018690559252905461099391906120ec565b6000838152600e602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487610a1a611327565b60405190815260200160405180910390a350505050565b6001600160a01b03831660009081526009602090815260408083203384529091529020546000198114610a8d57610a6882826120ec565b6001600160a01b03851660009081526009602090815260408083203384529091529020555b610a98848484611359565b50505b505050565b610aab838383610717565b6001600160a01b0382163b15801590610b575750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4a919061212b565b6001600160e01b03191614155b15610a9b57604051633da6393160e01b815260040160405180910390fd5b610b7d6112cd565b6001600160a01b03821660009081526008602052604090205415610bb457604051632f57ef6960e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b6000818152600c60205260409020546001600160a01b031680610c1557604051630cbdb7b360e41b815260040160405180910390fd5b919050565b60606005805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191906000526020600020905b815481526020019060010190808311610c54575b5050505050905090565b610c7a6112cd565b610c84600061151b565b565b6001600160a01b0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610ce657602002820191906000526020600020905b815481526020019060010190808311610cd2575b50505050509050919050565b6002805461052d90611f8e565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610d78338484611359565b9392505050565b610d8a858585610717565b6001600160a01b0384163b15801590610e245750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610dd49033908a90899089908990600401612155565b6020604051808303816000875af1158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e17919061212b565b6001600160e01b03191614155b15610a9857604051633da6393160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600d60205260408120805483908110610e6c57610e6c6120ff565b9060005260206000200154905092915050565b6060600060038054610e9090611f8e565b90501115610eca576003610ea38361156b565b604051602001610eb49291906121a9565b6040516020818303038152906040529050919050565b60008281526010602052604090205460ff166060806001836005811115610ef357610ef3611e82565b03610f43576040518060400160405280600681526020016521b7b6b6b7b760d11b81525091506040518060400160405280600a815260200169636f6d6d6f6e2e706e6760b01b81525090506110d1565b6002836005811115610f5757610f57611e82565b03610fab57604051806040016040528060088152602001672ab731b7b6b6b7b760c11b81525091506040518060400160405280600c81526020016b756e636f6d6d6f6e2e706e6760a01b81525090506110d1565b6003836005811115610fbf57610fbf611e82565b0361100b57604051806040016040528060048152602001635261726560e01b815250915060405180604001604052806008815260200167726172652e706e6760c01b81525090506110d1565b600483600581111561101f5761101f611e82565b0361106b57604051806040016040528060048152602001634570696360e01b815250915060405180604001604052806008815260200167657069632e706e6760c01b81525090506110d1565b600583600581111561107f5761107f611e82565b036110d157604051806040016040528060098152602001684c6567656e6461727960b81b81525091506040518060400160405280600d81526020016c6c6567656e646172792e706e6760981b81525090505b60006110dc8661156b565b6040516020016110ec9190612230565b60408051601f19818403018152908290526111099160200161226e565b60405160208183030381529060405260118360405160200161112c9291906121a9565b60408051601f198184030181529082905261114a929160200161239d565b604051602081830303815290604052905060008360405160200161116e91906123c3565b60408051601f1981840301815282820182526004835263227d5d7d60e01b60208481019190915291519093506111a891859185910161239d565b60408051601f19818403018152908290526111c791839060200161239d565b60408051601f19818403018152908290526111e491602001612421565b6040516020818303038152906040529650505050505050919050565b6005818154811061121057600080fd5b600091825260209091200154905081565b6003805461052d90611f8e565b6112366112cd565b60036107138282612016565b6011805461052d90611f8e565b6112576112cd565b6001600160a01b0381166112c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6112ca8161151b565b50565b6000546001600160a01b03163314610c845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112b8565b60006113547f0000000000000000000000000000000000000000000000000000000000000000600a61254a565b905090565b600080611364611327565b6001600160a01b038087166000818152600860205260408082208054948a16835290822054928252939450919290918691906113a083866120ec565b90915550506001600160a01b03808716600090815260086020908152604080832080548a019055928a168252600f9052205460ff1661143c576001600160a01b0387166000908152600860205260408120546113fd90859061256f565b611407858561256f565b61141191906120ec565b905060005b8181101561143957611427896115fe565b8061143181612583565b915050611416565b50505b6001600160a01b0386166000908152600f602052604090205460ff166114c1576000611468848361256f565b6001600160a01b03881660009081526008602052604090205461148c90869061256f565b61149691906120ec565b905060005b818110156114be576114ac88611722565b806114b681612583565b91505061149b565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314878760405161150691815260200190565b60405180910390a35060019695505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060006115788361195c565b600101905060008167ffffffffffffffff81111561159857611598611ce4565b6040519080825280601f01601f1916602001820160405280156115c2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115cc57509392505050565b6001600160a01b03811661162557604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600d60205260408120805461164b906001906120ec565b8154811061165b5761165b6120ff565b9060005260206000200154905061167181611a34565b6001600160a01b0382166000908152600d6020526040902080548061169857611698612115565b600082815260208082208301600019908101839055909201909255828252600e81526040808320839055600c825280832080546001600160a01b0319908116909155600a9092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661174957604051634e46966960e11b815260040160405180910390fd5b6000600454600654101561178f576006805490600061176783612583565b90915550506006546000818152600760205260409020805460ff1916600117905590506117bf565b600554156117a65761179f611aab565b90506117bf565b60405163ed4421ad60e01b815260040160405180910390fd5b60008181526010602052604081205460ff1660058111156117e2576117e2611e82565b036118b95760006117f282611be2565b9050610190811161182257600082815260106020526040902080546001919060ff191682805b02179055506118b7565b61028a811161184b57600082815260106020526040902080546002919060ff1916600183611818565b610352811161187457600082815260106020526040902080546003919060ff1916600183611818565b6103b6811161189d57600082815260106020526040902080546004919060ff1916600183611818565b6000828152601060205260409020805460ff191660051790555b505b6000818152600c6020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600d8352908320805460018181018355828652938520018590559252905461191191906120ec565b6000828152600e602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061199b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106119c7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106119e557662386f26fc10000830492506010015b6305f5e10083106119fd576305f5e100830492506008015b6127108310611a1157612710830492506004015b60648310611a23576064830492506002015b600a83106106f95760010192915050565b60008181526007602052604090205460ff16611a63576040516335c0139560e21b815260040160405180910390fd5b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190556000908152600760205260409020805460ff19169055565b6005546000908103611ad05760405163ed4421ad60e01b815260040160405180910390fd5b600554604080514260208201526bffffffffffffffffffffffff193360601b169181019190915260548101829052600091906074016040516020818303038152906040528051906020012060001c611b28919061259c565b9050600060058281548110611b3f57611b3f6120ff565b9060005260206000200154905060056001600580549050611b6091906120ec565b81548110611b7057611b706120ff565b906000526020600020015460058381548110611b8e57611b8e6120ff565b6000918252602090912001556005805480611bab57611bab612115565b6000828152602080822083016000199081018390559092019092558282526007905260409020805460ff1916600117905592915050565b600080611bf06001436120ec565b40611bfb84426125b0565b60408051602081019390935282015260600160408051601f1981840301815291905280516020909101209050610d786103e88261259c565b60005b83811015611c4e578181015183820152602001611c36565b50506000910152565b6020815260008251806020840152611c76816040850160208701611c33565b601f01601f19169190910160400192915050565b600060208284031215611c9c57600080fd5b5035919050565b80356001600160a01b0381168114610c1557600080fd5b60008060408385031215611ccd57600080fd5b611cd683611ca3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611d0c57600080fd5b813567ffffffffffffffff80821115611d2457600080fd5b818401915084601f830112611d3857600080fd5b813581811115611d4a57611d4a611ce4565b604051601f8201601f19908116603f01168101908382118183101715611d7257611d72611ce4565b81604052828152876020848701011115611d8b57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215611dc057600080fd5b611dc984611ca3565b9250611dd760208501611ca3565b9150604084013590509250925092565b60008060408385031215611dfa57600080fd5b611e0383611ca3565b915060208301358015158114611e1857600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611e5b57835183529284019291840191600101611e3f565b50909695505050505050565b600060208284031215611e7957600080fd5b610d7882611ca3565b634e487b7160e01b600052602160045260246000fd5b6020810160068310611eba57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600060808688031215611ed857600080fd5b611ee186611ca3565b9450611eef60208701611ca3565b935060408601359250606086013567ffffffffffffffff80821115611f1357600080fd5b818801915088601f830112611f2757600080fd5b813581811115611f3657600080fd5b896020828501011115611f4857600080fd5b9699959850939650602001949392505050565b60008060408385031215611f6e57600080fd5b611f7783611ca3565b9150611f8560208401611ca3565b90509250929050565b600181811c90821680611fa257607f821691505b602082108103611fc257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610a9b57600081815260208120601f850160051c81016020861015611fef5750805b601f850160051c820191505b8181101561200e57828155600101611ffb565b505050505050565b815167ffffffffffffffff81111561203057612030611ce4565b6120448161203e8454611f8e565b84611fc8565b602080601f83116001811461207957600084156120615750858301515b600019600386901b1c1916600185901b17855561200e565b600085815260208120601f198616915b828110156120a857888601518255948401946001909101908401612089565b50858210156120c65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b818103818111156106f9576106f96120d6565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006020828403121561213d57600080fd5b81516001600160e01b031981168114610d7857600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60008084546121b781611f8e565b600182811680156121cf57600181146121e457612213565b60ff1984168752821515830287019450612213565b8860005260208060002060005b8581101561220a5781548a8201529084019082016121f1565b50505082870194505b505050508351612227818360208801611c33565b01949350505050565b747b226e616d65223a2022456e67696e65343034202360581b81528151600090612261816015850160208701611c33565b9190910160150192915050565b60008251612280818460208701611c33565b7f222c226465736372697074696f6e223a22456e67696e653430342061732074689201918252507f652066697273742070726f746f636f6c20746f20696e74726f6475636520757460208201527f696c69747920746f20455243343034207374616e6461726420746f6b656e732c60408201527f2070726573656e747320612064697374696e637469766520666561747572652060608201527f77697468206120746f74616c20737570706c79206c696d6974656420746f206f60808201527f6e6c79203130303020746f6b656e73222c2265787465726e616c5f75726c223a60a08201527f2268747470733a2f2f656e67696e653430342e636f6d222c22696d616765223a60c0820152601160f91b60e082015260e101919050565b600083516123af818460208801611c33565b835190830190612227818360208801611c33565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a225281526f30b934ba3c9116113b30b63ab2911d1160811b602082015260008251612414816030850160208701611c33565b9190910160300192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161245981601b850160208701611c33565b91909101601b0192915050565b600181815b808511156124a1578160001904821115612487576124876120d6565b8085161561249457918102915b93841c939080029061246b565b509250929050565b6000826124b8575060016106f9565b816124c5575060006106f9565b81600181146124db57600281146124e557612501565b60019150506106f9565b60ff8411156124f6576124f66120d6565b50506001821b6106f9565b5060208310610133831016604e8410600b8410161715612524575081810a6106f9565b61252e8383612466565b8060001904821115612542576125426120d6565b029392505050565b6000610d7860ff8416836124a9565b634e487b7160e01b600052601260045260246000fd5b60008261257e5761257e612559565b500490565b600060018201612595576125956120d6565b5060010190565b6000826125ab576125ab612559565b500690565b808201808211156106f9576106f96120d656fea2646970667358221220ff2ec89d6dd80431fb81174e0fdfaf02e0d775a8277d61d96ddd11630f2ee44664736f6c63430008150033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638b58c5691161011a578063c87b56dd116100ad578063dd62ed3e1161007c578063dd62ed3e14610499578063e0df5b6f146104c4578063e985e9c5146104d7578063f28ca1dd14610505578063f2fde38b1461050d57600080fd5b8063c87b56dd1461046b578063ca4c0e091461047e578063d547cfb714610491578063dbcbe33c1461041f57600080fd5b8063a22cb465116100e9578063a22cb4651461041f578063a9059cbb14610432578063b88d4fde14610445578063c592e6f61461045857600080fd5b80638b58c569146103b35780638da5cb5b146103e357806395d89b41146103f45780639b19251a146103fc57600080fd5b8063313ce5671161019257806369562e821161016157806369562e821461036357806370a0823114610378578063715018a6146103985780638462151c146103a057600080fd5b8063313ce567146102f157806342842e0e1461032a57806353d6fd591461033d5780636352211e1461035057600080fd5b806318160ddd116101ce57806318160ddd1461029957806318d217c3146102c057806323b872dd146102d55780632c88797e146102e857600080fd5b806306fdde031461020057806307c560011461021e578063081812fc14610235578063095ea7b314610276575b600080fd5b610208610520565b6040516102159190611c57565b60405180910390f35b61022760065481565b604051908152602001610215565b61025e610243366004611c8a565b600a602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610215565b610289610284366004611cba565b6105ae565b6040519015158152602001610215565b6102277f00000000000000000000000000000000000000000000003635c9adc5dea0000081565b6102d36102ce366004611cfa565b6106ff565b005b6102d36102e3366004611dab565b610717565b61022760045481565b6103187f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610215565b6102d3610338366004611dab565b610aa0565b6102d361034b366004611de7565b610b75565b61025e61035e366004611c8a565b610bdf565b61036b610c1a565b6040516102159190611e23565b610227610386366004611e67565b60086020526000908152604090205481565b6102d3610c72565b61036b6103ae366004611e67565b610c86565b6103d66103c1366004611c8a565b60106020526000908152604090205460ff1681565b6040516102159190611e98565b6000546001600160a01b031661025e565b610208610cf2565b61028961040a366004611e67565b600f6020526000908152604090205460ff1681565b6102d361042d366004611de7565b610cff565b610289610440366004611cba565b610d6b565b6102d3610453366004611ec0565b610d7f565b610227610466366004611cba565b610e42565b610208610479366004611c8a565b610e7f565b61022761048c366004611c8a565b611200565b610208611221565b6102276104a7366004611f5b565b600960209081526000928352604080842090915290825290205481565b6102d36104d2366004611cfa565b61122e565b6102896104e5366004611f5b565b600b60209081526000928352604080842090915290825290205460ff1681565b610208611242565b6102d361051b366004611e67565b61124f565b6001805461052d90611f8e565b80601f016020809104026020016040519081016040528092919081815260200182805461055990611f8e565b80156105a65780601f1061057b576101008083540402835291602001916105a6565b820191906000526020600020905b81548152906001019060200180831161058957829003601f168201915b505050505081565b600060065482111580156105c25750600082115b15610699576000828152600c60205260409020546001600160a01b031633811480159061061357506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff16155b15610630576040516282b42960e81b815260040160405180910390fd5b6000838152600a602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506106f5565b3360008181526009602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6107076112cd565b60116107138282612016565b5050565b6004548111610a31576000818152600c60205260409020546001600160a01b0384811691161461075a57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03821661078157604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038416148015906107be57506001600160a01b0383166000908152600b6020908152604080832033845290915290205460ff16155b80156107e157506000818152600a60205260409020546001600160a01b03163314155b156107fe576040516282b42960e81b815260040160405180910390fd5b610806611327565b6001600160a01b0384166000908152600860205260408120805490919061082e9084906120ec565b9091555061083c9050611327565b6001600160a01b0380841660008181526008602090815260408083208054909601909555858252600c815284822080546001600160a01b03199081169094179055600a815284822080549093169092559186168252600d905290812080546108a6906001906120ec565b815481106108b6576108b66120ff565b60009182526020808320909101546001600160a01b0387168352600d82526040808420868552600e909352909220548154929350839281106108fa576108fa6120ff565b60009182526020808320909101929092556001600160a01b0386168152600d9091526040902080548061092f5761092f612115565b600082815260208082208301600019908101839055909201909255838252600e8152604080832054848452818420556001600160a01b038616808452600d8352908320805460018181018355828652938520018690559252905461099391906120ec565b6000838152600e602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487610a1a611327565b60405190815260200160405180910390a350505050565b6001600160a01b03831660009081526009602090815260408083203384529091529020546000198114610a8d57610a6882826120ec565b6001600160a01b03851660009081526009602090815260408083203384529091529020555b610a98848484611359565b50505b505050565b610aab838383610717565b6001600160a01b0382163b15801590610b575750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4a919061212b565b6001600160e01b03191614155b15610a9b57604051633da6393160e01b815260040160405180910390fd5b610b7d6112cd565b6001600160a01b03821660009081526008602052604090205415610bb457604051632f57ef6960e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b6000818152600c60205260409020546001600160a01b031680610c1557604051630cbdb7b360e41b815260040160405180910390fd5b919050565b60606005805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191906000526020600020905b815481526020019060010190808311610c54575b5050505050905090565b610c7a6112cd565b610c84600061151b565b565b6001600160a01b0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610ce657602002820191906000526020600020905b815481526020019060010190808311610cd2575b50505050509050919050565b6002805461052d90611f8e565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610d78338484611359565b9392505050565b610d8a858585610717565b6001600160a01b0384163b15801590610e245750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610dd49033908a90899089908990600401612155565b6020604051808303816000875af1158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e17919061212b565b6001600160e01b03191614155b15610a9857604051633da6393160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600d60205260408120805483908110610e6c57610e6c6120ff565b9060005260206000200154905092915050565b6060600060038054610e9090611f8e565b90501115610eca576003610ea38361156b565b604051602001610eb49291906121a9565b6040516020818303038152906040529050919050565b60008281526010602052604090205460ff166060806001836005811115610ef357610ef3611e82565b03610f43576040518060400160405280600681526020016521b7b6b6b7b760d11b81525091506040518060400160405280600a815260200169636f6d6d6f6e2e706e6760b01b81525090506110d1565b6002836005811115610f5757610f57611e82565b03610fab57604051806040016040528060088152602001672ab731b7b6b6b7b760c11b81525091506040518060400160405280600c81526020016b756e636f6d6d6f6e2e706e6760a01b81525090506110d1565b6003836005811115610fbf57610fbf611e82565b0361100b57604051806040016040528060048152602001635261726560e01b815250915060405180604001604052806008815260200167726172652e706e6760c01b81525090506110d1565b600483600581111561101f5761101f611e82565b0361106b57604051806040016040528060048152602001634570696360e01b815250915060405180604001604052806008815260200167657069632e706e6760c01b81525090506110d1565b600583600581111561107f5761107f611e82565b036110d157604051806040016040528060098152602001684c6567656e6461727960b81b81525091506040518060400160405280600d81526020016c6c6567656e646172792e706e6760981b81525090505b60006110dc8661156b565b6040516020016110ec9190612230565b60408051601f19818403018152908290526111099160200161226e565b60405160208183030381529060405260118360405160200161112c9291906121a9565b60408051601f198184030181529082905261114a929160200161239d565b604051602081830303815290604052905060008360405160200161116e91906123c3565b60408051601f1981840301815282820182526004835263227d5d7d60e01b60208481019190915291519093506111a891859185910161239d565b60408051601f19818403018152908290526111c791839060200161239d565b60408051601f19818403018152908290526111e491602001612421565b6040516020818303038152906040529650505050505050919050565b6005818154811061121057600080fd5b600091825260209091200154905081565b6003805461052d90611f8e565b6112366112cd565b60036107138282612016565b6011805461052d90611f8e565b6112576112cd565b6001600160a01b0381166112c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6112ca8161151b565b50565b6000546001600160a01b03163314610c845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112b8565b60006113547f0000000000000000000000000000000000000000000000000000000000000012600a61254a565b905090565b600080611364611327565b6001600160a01b038087166000818152600860205260408082208054948a16835290822054928252939450919290918691906113a083866120ec565b90915550506001600160a01b03808716600090815260086020908152604080832080548a019055928a168252600f9052205460ff1661143c576001600160a01b0387166000908152600860205260408120546113fd90859061256f565b611407858561256f565b61141191906120ec565b905060005b8181101561143957611427896115fe565b8061143181612583565b915050611416565b50505b6001600160a01b0386166000908152600f602052604090205460ff166114c1576000611468848361256f565b6001600160a01b03881660009081526008602052604090205461148c90869061256f565b61149691906120ec565b905060005b818110156114be576114ac88611722565b806114b681612583565b91505061149b565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314878760405161150691815260200190565b60405180910390a35060019695505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060006115788361195c565b600101905060008167ffffffffffffffff81111561159857611598611ce4565b6040519080825280601f01601f1916602001820160405280156115c2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115cc57509392505050565b6001600160a01b03811661162557604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600d60205260408120805461164b906001906120ec565b8154811061165b5761165b6120ff565b9060005260206000200154905061167181611a34565b6001600160a01b0382166000908152600d6020526040902080548061169857611698612115565b600082815260208082208301600019908101839055909201909255828252600e81526040808320839055600c825280832080546001600160a01b0319908116909155600a9092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661174957604051634e46966960e11b815260040160405180910390fd5b6000600454600654101561178f576006805490600061176783612583565b90915550506006546000818152600760205260409020805460ff1916600117905590506117bf565b600554156117a65761179f611aab565b90506117bf565b60405163ed4421ad60e01b815260040160405180910390fd5b60008181526010602052604081205460ff1660058111156117e2576117e2611e82565b036118b95760006117f282611be2565b9050610190811161182257600082815260106020526040902080546001919060ff191682805b02179055506118b7565b61028a811161184b57600082815260106020526040902080546002919060ff1916600183611818565b610352811161187457600082815260106020526040902080546003919060ff1916600183611818565b6103b6811161189d57600082815260106020526040902080546004919060ff1916600183611818565b6000828152601060205260409020805460ff191660051790555b505b6000818152600c6020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600d8352908320805460018181018355828652938520018590559252905461191191906120ec565b6000828152600e602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061199b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106119c7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106119e557662386f26fc10000830492506010015b6305f5e10083106119fd576305f5e100830492506008015b6127108310611a1157612710830492506004015b60648310611a23576064830492506002015b600a83106106f95760010192915050565b60008181526007602052604090205460ff16611a63576040516335c0139560e21b815260040160405180910390fd5b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190556000908152600760205260409020805460ff19169055565b6005546000908103611ad05760405163ed4421ad60e01b815260040160405180910390fd5b600554604080514260208201526bffffffffffffffffffffffff193360601b169181019190915260548101829052600091906074016040516020818303038152906040528051906020012060001c611b28919061259c565b9050600060058281548110611b3f57611b3f6120ff565b9060005260206000200154905060056001600580549050611b6091906120ec565b81548110611b7057611b706120ff565b906000526020600020015460058381548110611b8e57611b8e6120ff565b6000918252602090912001556005805480611bab57611bab612115565b6000828152602080822083016000199081018390559092019092558282526007905260409020805460ff1916600117905592915050565b600080611bf06001436120ec565b40611bfb84426125b0565b60408051602081019390935282015260600160408051601f1981840301815291905280516020909101209050610d786103e88261259c565b60005b83811015611c4e578181015183820152602001611c36565b50506000910152565b6020815260008251806020840152611c76816040850160208701611c33565b601f01601f19169190910160400192915050565b600060208284031215611c9c57600080fd5b5035919050565b80356001600160a01b0381168114610c1557600080fd5b60008060408385031215611ccd57600080fd5b611cd683611ca3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611d0c57600080fd5b813567ffffffffffffffff80821115611d2457600080fd5b818401915084601f830112611d3857600080fd5b813581811115611d4a57611d4a611ce4565b604051601f8201601f19908116603f01168101908382118183101715611d7257611d72611ce4565b81604052828152876020848701011115611d8b57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215611dc057600080fd5b611dc984611ca3565b9250611dd760208501611ca3565b9150604084013590509250925092565b60008060408385031215611dfa57600080fd5b611e0383611ca3565b915060208301358015158114611e1857600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611e5b57835183529284019291840191600101611e3f565b50909695505050505050565b600060208284031215611e7957600080fd5b610d7882611ca3565b634e487b7160e01b600052602160045260246000fd5b6020810160068310611eba57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600060808688031215611ed857600080fd5b611ee186611ca3565b9450611eef60208701611ca3565b935060408601359250606086013567ffffffffffffffff80821115611f1357600080fd5b818801915088601f830112611f2757600080fd5b813581811115611f3657600080fd5b896020828501011115611f4857600080fd5b9699959850939650602001949392505050565b60008060408385031215611f6e57600080fd5b611f7783611ca3565b9150611f8560208401611ca3565b90509250929050565b600181811c90821680611fa257607f821691505b602082108103611fc257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610a9b57600081815260208120601f850160051c81016020861015611fef5750805b601f850160051c820191505b8181101561200e57828155600101611ffb565b505050505050565b815167ffffffffffffffff81111561203057612030611ce4565b6120448161203e8454611f8e565b84611fc8565b602080601f83116001811461207957600084156120615750858301515b600019600386901b1c1916600185901b17855561200e565b600085815260208120601f198616915b828110156120a857888601518255948401946001909101908401612089565b50858210156120c65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b818103818111156106f9576106f96120d6565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006020828403121561213d57600080fd5b81516001600160e01b031981168114610d7857600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60008084546121b781611f8e565b600182811680156121cf57600181146121e457612213565b60ff1984168752821515830287019450612213565b8860005260208060002060005b8581101561220a5781548a8201529084019082016121f1565b50505082870194505b505050508351612227818360208801611c33565b01949350505050565b747b226e616d65223a2022456e67696e65343034202360581b81528151600090612261816015850160208701611c33565b9190910160150192915050565b60008251612280818460208701611c33565b7f222c226465736372697074696f6e223a22456e67696e653430342061732074689201918252507f652066697273742070726f746f636f6c20746f20696e74726f6475636520757460208201527f696c69747920746f20455243343034207374616e6461726420746f6b656e732c60408201527f2070726573656e747320612064697374696e637469766520666561747572652060608201527f77697468206120746f74616c20737570706c79206c696d6974656420746f206f60808201527f6e6c79203130303020746f6b656e73222c2265787465726e616c5f75726c223a60a08201527f2268747470733a2f2f656e67696e653430342e636f6d222c22696d616765223a60c0820152601160f91b60e082015260e101919050565b600083516123af818460208801611c33565b835190830190612227818360208801611c33565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a225281526f30b934ba3c9116113b30b63ab2911d1160811b602082015260008251612414816030850160208701611c33565b9190910160300192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161245981601b850160208701611c33565b91909101601b0192915050565b600181815b808511156124a1578160001904821115612487576124876120d6565b8085161561249457918102915b93841c939080029061246b565b509250929050565b6000826124b8575060016106f9565b816124c5575060006106f9565b81600181146124db57600281146124e557612501565b60019150506106f9565b60ff8411156124f6576124f66120d6565b50506001821b6106f9565b5060208310610133831016604e8410600b8410161715612524575081810a6106f9565b61252e8383612466565b8060001904821115612542576125426120d6565b029392505050565b6000610d7860ff8416836124a9565b634e487b7160e01b600052601260045260246000fd5b60008261257e5761257e612559565b500490565b600060018201612595576125956120d6565b5060010190565b6000826125ab576125ab612559565b500690565b808201808211156106f9576106f96120d656fea2646970667358221220ff2ec89d6dd80431fb81174e0fdfaf02e0d775a8277d61d96ddd11630f2ee44664736f6c63430008150033

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.