ETH Price: $2,939.31 (-0.48%)
 

Overview

Max Total Supply

100,000 VEX

Holders

871 (0.00%)

Market

Price

$0.1389 @ 0.000047 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

$0.00

Other Info

Token Contract (WITH 18 Decimals)

Balance
3.625898425555943204 VEX

Value
$0.50 ( ~0.000170108160145367 ETH) [0.0036%]
0xfe9326c8df460ddc073078bcf982ab172b8c2f95
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The first staking protocol using 404 on Base. Vex Aeterna seeks to provide a gamified platform, leveraging tokens with 404 technology.

Contract Source Code Verified (Exact Match)

Contract Name:
VexAeterna

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
 * 
 * 
 * 
____    ____  _______ ___   ___         ___       _______ .___________. _______ .______      .__   __.      ___      
\   \  /   / |   ____|\  \ /  /        /   \     |   ____||           ||   ____||   _  \     |  \ |  |     /   \     
 \   \/   /  |  |__    \  V  /        /  ^  \    |  |__   `---|  |----`|  |__   |  |_)  |    |   \|  |    /  ^  \    
  \      /   |   __|    >   <        /  /_\  \   |   __|      |  |     |   __|  |      /     |  . `  |   /  /_\  \   
   \    /    |  |____  /  .  \      /  _____  \  |  |____     |  |     |  |____ |  |\  \----.|  |\   |  /  _____  \  
    \__/     |_______|/__/ \__\    /__/     \__\ |_______|    |__|     |_______|| _| `._____||__| \__| /__/     \__\ 
 *
 *
 * Telegram : https://t.me/vexaeterna
 * Twitter  : https://twitter.com/VexAeterna
 * Warpcast : https://warpcast.com/vexaeterna
 * Website  : https://vexaeterna.com/                                                                                                                   
 * 
 * Powered by ERC-404 Pandora V2 (https://github.com/Pandora-Labs-Org/erc404)
 * 
 */

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

contract VexAeterna is Ownable, ERC404, ERC404UniswapV3Exempt {
    string public baseTokenURI;
    string public imageURI;

    enum Rarity {
        COMMON,
        UNCOMMON,
        RARE,
        EPIC,
        LEGENDARY,
        MYTHICAL
    }

    uint16[6] public atomicValues;
    string[6] public colors;
    string[6] public materials;

    error InvalidRarity();

    constructor(
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        uint256 maxTotalSupplyERC721_,
        address initialOwner_,
        address initialMintRecipient_,
        address uniswapSwapRouter_,
        address uniswapV3NonfungiblePositionManager_
    )
        ERC404(name_, symbol_, decimals_)
        Ownable(initialOwner_)
        ERC404UniswapV3Exempt(
            uniswapSwapRouter_,
            uniswapV3NonfungiblePositionManager_
        )
    {
        _setERC721TransferExempt(initialMintRecipient_, true);
        _mintERC20(initialMintRecipient_, maxTotalSupplyERC721_ * units);

        colors[uint(Rarity.COMMON)] = "Mystic Frost";
        colors[uint(Rarity.UNCOMMON)] = "Verdant Pulse";
        colors[uint(Rarity.RARE)] = "Skyrift Gleam";
        colors[uint(Rarity.EPIC)] = "Orange Vex";
        colors[uint(Rarity.LEGENDARY)] = "Nebula Pink";
        colors[uint(Rarity.MYTHICAL)] = "Sunbeam Radiance";

        materials[uint(Rarity.COMMON)] = "Vexodium";
        materials[uint(Rarity.UNCOMMON)] = "Vexite";
        materials[uint(Rarity.RARE)] = "Vexolite";
        materials[uint(Rarity.EPIC)] = "Vexorium";
        materials[uint(Rarity.LEGENDARY)] = "Vexillium";
        materials[uint(Rarity.MYTHICAL)] = "Vexorite";

        atomicValues[uint(Rarity.COMMON)] = 1;
        atomicValues[uint(Rarity.UNCOMMON)] = 2;
        atomicValues[uint(Rarity.RARE)] = 4;
        atomicValues[uint(Rarity.EPIC)] = 7;
        atomicValues[uint(Rarity.LEGENDARY)] = 25;
        atomicValues[uint(Rarity.MYTHICAL)] = 625;
    }

    receive() external payable {}

    function setERC721TransferExempt(
        address account_,
        bool value_
    ) external onlyOwner {
        _setERC721TransferExempt(account_, value_);
    }

    function batchTransferERC721(
        address from_,
        address to_,
        uint256[] calldata tokenIds
    ) external {
        require(
            to_ != address(0) || from_ != address(0),
            "Cannot transfer to 0 address"
        );
        uint256 length = tokenIds.length;
        for (uint i = 0; i < length; i++) {
            erc721TransferFrom(from_, to_, tokenIds[i]);
        }
    }

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

    function setImageURI(string memory _imageURI) external onlyOwner {
        imageURI = _imageURI;
    }

    function setAtomicValue(uint8 r, uint16 _newValue) external onlyOwner {
        require(
            uint8(getHighestRarity()) >= r && uint8(getLowestRarity()) <= r,
            "Rarity does not exists"
        );
        atomicValues[r] = _newValue;
    }

    function withdraw() external onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0, "No balance to withdraw");
        (bool sent, ) = owner().call{value: balance}("");
        require(sent, "Failed to send Ether");
    }

    function erc721TransferByRarity(
        address _from,
        address _to,
        uint256 _amount,
        uint8 _rarity
    ) external {
        uint256 _fromBalance = balanceOfByRarity(_from, _rarity);
        require(_fromBalance >= _amount, "Not enough of these energy stones");
        uint256[] memory _fromTokenIds = owned(_from);
        uint256 transferCount;
        for (uint256 i = 0; i < _fromTokenIds.length; i++) {
            uint256 tokenIdToTransfer = _fromTokenIds[i];
            uint8 currentRarity = uint8(
                getRarityByTokenId(decodedTokenId(tokenIdToTransfer))
            );
            if (currentRarity == _rarity) {
                erc721TransferFrom(_from, _to, tokenIdToTransfer);
                transferCount++;
                if (transferCount == _amount) {
                    break;
                }
            }
        }
    }

    function getHighestRarity() public pure returns (Rarity) {
        return type(Rarity).max;
    }

    function getLowestRarity() public pure returns (Rarity) {
        return type(Rarity).min;
    }

    function tokenURI(
        uint256 id_
    ) public view override returns (string memory) {
        uint256 tokenId = decodedTokenId(id_);
        if (bytes(baseTokenURI).length > 0) {
            return string.concat(baseTokenURI, Strings.toString(tokenId));
        } else {
            uint8 rarity = uint8(getRarityByTokenId(tokenId));
            string memory uri = _generateJsonMetadata(rarity, tokenId);
            return uri;
        }
    }

    function balanceOfByRarity(
        address _owner,
        uint8 _rarity
    ) public view returns (uint256) {
        if (
            _rarity > uint8(getHighestRarity()) ||
            _rarity < uint8(getLowestRarity())
        ) {
            revert InvalidRarity();
        }
        uint256[] memory ownerTokenIds = owned(_owner);
        uint256 totalOwned = ownerTokenIds.length;
        if (totalOwned > 0) {
            uint256 count = 0;
            for (uint256 i = 0; i < totalOwned; i++) {
                uint256 tokenId = decodedTokenId(ownerTokenIds[i]);
                uint8 computedRarity = uint8(getRarityByTokenId(tokenId));
                if (_rarity == computedRarity) {
                    count++;
                }
            }
            return count;
        } else {
            return 0;
        }
    }

    function balancesOfByRarity(
        address _owner
    ) public view returns (uint256[6] memory balances) {
        for (
            uint8 i = uint8(getLowestRarity());
            i <= uint8(getHighestRarity());
            i++
        ) {
            uint256 rarityCount = balanceOfByRarity(_owner, i);
            balances[i] = rarityCount;
        }
    }

    function decodedTokenId(uint256 _tokenId) public pure returns (uint256) {
        if (_tokenId <= (1 << 255)) revert InvalidTokenId();
        return _tokenId - (1 << 255);
    }

    function getRarityByTokenId(uint256 _tokenId) public pure returns (Rarity) {
        uint256 hash = uint256(keccak256(abi.encodePacked(_tokenId)));
        uint256 effectiveId = (hash % 100000) + 1;

        if (effectiveId <= 50000) {
            return Rarity.COMMON;
        } else if (effectiveId <= 75000) {
            return Rarity.UNCOMMON;
        } else if (effectiveId <= 91000) {
            return Rarity.RARE;
        } else if (effectiveId <= 98000) {
            return Rarity.EPIC;
        } else if (effectiveId <= 99900) {
            return Rarity.LEGENDARY;
        } else {
            return Rarity.MYTHICAL;
        }
    }

    function _generateJsonAttributes(
        uint8 _index
    ) internal view returns (string memory) {
        string memory materialAttr = string.concat(
            '"attributes": [{"trait_type": "Material", "value": "',
            materials[_index]
        );
        string memory colorAttr = string.concat(
            materialAttr,
            string.concat(
                '"}, {"trait_type": "Color", "value": "',
                colors[_index]
            )
        );

        string memory atomicValueAttr = string.concat(
            colorAttr,
            string.concat(
                string.concat('"}, {"trait_type": "Atomic Value", "value": '),
                Strings.toString(atomicValues[_index]),
                "}]}"
            )
        );
        return atomicValueAttr;
    }

    function _generateJsonDescription() internal view returns (string memory) {
        return
            string.concat(
                string.concat(
                    '","description": "A collection of ',
                    Strings.toString(totalSupply / (10 ** decimals))
                ),
                ' digital collectible enabled by ERC404, an experimental token standard.", "external_url": "https://vexaeterna.com/'
            );
    }

    function _generateJsonImage(
        uint8 _index
    ) internal view returns (string memory) {
        return
            string.concat(
                string.concat(
                    '", "image": "',
                    string.concat(
                        imageURI,
                        string.concat(materials[_index], '.png", ')
                    )
                )
            );
    }

    function _generateJsonNameAndCreator(
        uint8 _index,
        uint256 _tokenId
    ) internal view returns (string memory) {
        string memory _name = string.concat(
            '{"name": "',
            string.concat(
                materials[_index],
                string.concat(" - ", Strings.toString(_tokenId))
            )
        );
        return string.concat(_name, string.concat('", "created_by": "', name));
    }

    function _generateJsonMetadata(
        uint8 _r,
        uint256 _tokenId
    ) internal view returns (string memory uri) {
        string memory _nameAndCreator = _generateJsonNameAndCreator(
            _r,
            _tokenId
        );
        string memory _description = _generateJsonDescription();
        string memory _image = _generateJsonImage(_r);
        string memory _attributes = _generateJsonAttributes(_r);

        return
            string.concat(
                "data:application/json;utf8,",
                string.concat(
                    _nameAndCreator,
                    string.concat(
                        _description,
                        string.concat(_image, _attributes)
                    )
                )
            );
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 4 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol)

pragma solidity ^0.8.20;

import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol";

File 5 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

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

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

pragma solidity ^0.8.20;

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

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

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

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

pragma solidity ^0.8.20;

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

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

pragma solidity ^0.8.20;

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

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

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Immutable state
/// @notice Functions that return immutable state of the router
interface IPeripheryImmutableState {
    /// @return Returns the address of the Uniswap V3 factory
    function factory() external view returns (address);

    /// @return Returns the address of WETH9
    function WETH9() external view returns (address);
}

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

import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IERC404} from "./interfaces/IERC404.sol";
import {DoubleEndedQueue} from "./lib/DoubleEndedQueue.sol";
import {ERC721Events} from "./lib/ERC721Events.sol";
import {ERC20Events} from "./lib/ERC20Events.sol";

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

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

    /// @dev Token name
    string public name;

    /// @dev Token symbol
    string public symbol;

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

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

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

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

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

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

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

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

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

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

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

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

    /// @dev Addresses that are exempt from ERC-721 transfer, typically for gas savings (pairs, routers, etc)
    mapping(address => bool) internal _erc721TransferExempt;

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

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

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

    /// @dev Constant for token id encoding
    uint256 public constant ID_ENCODING_PREFIX = 1 << 255;

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

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

        decimals = decimals_;
        units = 10 ** decimals;

        // EIP-2612 initialization
        _INITIAL_CHAIN_ID = block.chainid;
        _INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator();
    }

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

        if (!_isValidTokenId(id_)) {
            revert InvalidTokenId();
        }

        if (erc721Owner == address(0)) {
            revert NotFound();
        }
    }

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

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

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

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

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

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

    function getERC721TokensInQueue(
        uint256 start_,
        uint256 count_
    ) public view virtual returns (uint256[] memory) {
        uint256[] memory tokensInQueue = new uint256[](count_);

        for (uint256 i = start_; i < start_ + count_; ) {
            tokensInQueue[i - start_] = _storedERC721Ids.at(i);

            unchecked {
                ++i;
            }
        }

        return tokensInQueue;
    }

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

    /// @notice Function for token approvals
    /// @dev This function assumes the operator is attempting to approve
    ///      an ERC-721 if valueOrId_ is a possibly valid ERC-721 token id.
    ///      Unlike setApprovalForAll, spender_ must be allowed to be 0x0 so
    ///      that approval can be revoked.
    function approve(
        address spender_,
        uint256 valueOrId_
    ) public virtual returns (bool) {
        if (_isValidTokenId(valueOrId_)) {
            erc721Approve(spender_, valueOrId_);
        } else {
            return erc20Approve(spender_, valueOrId_);
        }

        return true;
    }

    function erc721Approve(address spender_, uint256 id_) public virtual {
        // Intention is to approve as ERC-721 token (id).
        address erc721Owner = _getOwnerOf(id_);

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

        getApproved[id_] = spender_;

        emit ERC721Events.Approval(erc721Owner, spender_, id_);
    }

    /// @dev Providing type(uint256).max for approval value results in an
    ///      unlimited approval that is not deducted from on transfers.
    function erc20Approve(
        address spender_,
        uint256 value_
    ) public virtual returns (bool) {
        // Prevent granting 0x0 an ERC-20 allowance.
        if (spender_ == address(0)) {
            revert InvalidSpender();
        }

        allowance[msg.sender][spender_] = value_;

        emit ERC20Events.Approval(msg.sender, spender_, value_);

        return true;
    }

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

    /// @notice Function for mixed transfers from an operator that may be different than 'from'.
    /// @dev This function assumes the operator is attempting to transfer an ERC-721
    ///      if valueOrId is a possible valid token id.
    function transferFrom(
        address from_,
        address to_,
        uint256 valueOrId_
    ) public virtual returns (bool) {
        if (_isValidTokenId(valueOrId_)) {
            erc721TransferFrom(from_, to_, valueOrId_);
        } else {
            // Intention is to transfer as ERC-20 token (value).
            return erc20TransferFrom(from_, to_, valueOrId_);
        }

        return true;
    }

    /// @notice Function for ERC-721 transfers from.
    /// @dev This function is recommended for ERC721 transfers.
    function erc721TransferFrom(
        address from_,
        address to_,
        uint256 id_
    ) public virtual {
        // Prevent minting tokens from 0x0.
        if (from_ == address(0)) {
            revert InvalidSender();
        }

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

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

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

        // We only need to check ERC-721 transfer exempt status for the recipient
        // since the sender being ERC-721 transfer exempt means they have already
        // had their ERC-721s stripped away during the rebalancing process.
        if (erc721TransferExempt(to_)) {
            revert RecipientIsERC721TransferExempt();
        }

        // Transfer 1 * units ERC-20 and 1 ERC-721 token.
        // ERC-721 transfer exemptions handled above. Can't make it to this point if either is transfer exempt.
        _transferERC20(from_, to_, units);
        _transferERC721(from_, to_, id_);
    }

    /// @notice Function for ERC-20 transfers from.
    /// @dev This function is recommended for ERC20 transfers
    function erc20TransferFrom(
        address from_,
        address to_,
        uint256 value_
    ) public virtual returns (bool) {
        // Prevent minting tokens from 0x0.
        if (from_ == address(0)) {
            revert InvalidSender();
        }

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

        uint256 allowed = allowance[from_][msg.sender];

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

        // Transferring ERC-20s directly requires the _transferERC20WithERC721 function.
        // Handles ERC-721 exemptions internally.
        return _transferERC20WithERC721(from_, to_, value_);
    }

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

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

    /// @notice Function for ERC-721 transfers with contract support.
    /// This function only supports moving valid ERC-721 ids, as it does not exist on the ERC-20
    /// spec and will revert otherwise.
    function safeTransferFrom(
        address from_,
        address to_,
        uint256 id_
    ) public virtual {
        safeTransferFrom(from_, to_, id_, "");
    }

    /// @notice Function for ERC-721 transfers with contract support and callback data.
    /// This function only supports moving valid ERC-721 ids, as it does not exist on the
    /// ERC-20 spec and will revert otherwise.
    function safeTransferFrom(
        address from_,
        address to_,
        uint256 id_,
        bytes memory data_
    ) public virtual {
        if (!_isValidTokenId(id_)) {
            revert InvalidTokenId();
        }

        transferFrom(from_, to_, id_);

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

    /// @notice Function for EIP-2612 permits (ERC-20 only).
    /// @dev Providing type(uint256).max for permit value results in an
    ///      unlimited approval that is not deducted from on transfers.
    function permit(
        address owner_,
        address spender_,
        uint256 value_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) public virtual {
        if (deadline_ < block.timestamp) {
            revert PermitDeadlineExpired();
        }

        // permit cannot be used for ERC-721 token approvals, so ensure
        // the value does not fall within the valid range of ERC-721 token ids.
        if (_isValidTokenId(value_)) {
            revert InvalidApproval();
        }

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

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

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

            allowance[recoveredAddress][spender_] = value_;
        }

        emit ERC20Events.Approval(owner_, spender_, value_);
    }

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

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

    /// @notice Function for self-exemption
    function setSelfERC721TransferExempt(bool state_) public virtual {
        _setERC721TransferExempt(msg.sender, state_);
    }

    /// @notice Function to check if address is transfer exempt
    function erc721TransferExempt(
        address target_
    ) public view virtual returns (bool) {
        return target_ == address(0) || _erc721TransferExempt[target_];
    }

    /// @notice For a token token id to be considered valid, it just needs
    ///         to fall within the range of possible token ids, it does not
    ///         necessarily have to be minted yet.
    function _isValidTokenId(uint256 id_) internal pure returns (bool) {
        return id_ > ID_ENCODING_PREFIX && id_ != type(uint256).max;
    }

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

    /// @notice This is the lowest level ERC-20 transfer function, which
    ///         should be used for both normal ERC-20 transfers as well as minting.
    /// Note that this function allows transfers to and from 0x0.
    function _transferERC20(
        address from_,
        address to_,
        uint256 value_
    ) internal virtual {
        // Minting is a special case for which we should not check the balance of
        // the sender, and we should increase the total supply.
        if (from_ == address(0)) {
            totalSupply += value_;
        } else {
            // Deduct value from sender's balance.
            balanceOf[from_] -= value_;
        }

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

        emit ERC20Events.Transfer(from_, to_, value_);
    }

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

            uint256 updatedId = _owned[from_][_owned[from_].length - 1];
            if (updatedId != id_) {
                uint256 updatedIndex = _getOwnedIndex(id_);
                // update _owned for sender
                _owned[from_][updatedIndex] = updatedId;
                // update index for the moved id
                _setOwnedIndex(updatedId, updatedIndex);
            }

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

        // Check if this is a burn.
        if (to_ != address(0)) {
            // If not a burn, update the owner of the token to the new owner.
            // Update owner of the token to the new owner.
            _setOwnerOf(id_, to_);
            // Push token onto the new owner's stack.
            _owned[to_].push(id_);
            // Update index for new owner's stack.
            _setOwnedIndex(id_, _owned[to_].length - 1);
        } else {
            // If this is a burn, reset the owner of the token to 0x0 by deleting the token from _ownedData.
            delete _ownedData[id_];
        }

        emit ERC721Events.Transfer(from_, to_, id_);
    }

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

        _transferERC20(from_, to_, value_);

        // Preload for gas savings on branches
        bool isFromERC721TransferExempt = erc721TransferExempt(from_);
        bool isToERC721TransferExempt = erc721TransferExempt(to_);

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

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

            // If the transfer changes either the sender or the recipient's holdings from a fractional to a non-fractional
            // amount (or vice versa), adjust ERC-721s.

            // First check if the send causes the sender to lose a whole token that was represented by an ERC-721
            // due to a fractional part being transferred.
            //
            // Process:
            // Take the difference between the whole number of tokens before and after the transfer for the sender.
            // If that difference is greater than the number of ERC-721s transferred (whole units), then there was
            // an additional ERC-721 lost due to the fractional portion of the transfer.
            // If this is a self-send and the before and after balances are equal (not always the case but often),
            // then no ERC-721s will be lost here.
            if (
                erc20BalanceOfSenderBefore /
                    units -
                    erc20BalanceOf(from_) /
                    units >
                nftsToTransfer
            ) {
                _withdrawAndStoreERC721(from_);
            }

            // Then, check if the transfer causes the receiver to gain a whole new token which requires gaining
            // an additional ERC-721.
            //
            // Process:
            // Take the difference between the whole number of tokens before and after the transfer for the recipient.
            // If that difference is greater than the number of ERC-721s transferred (whole units), then there was
            // an additional ERC-721 gained due to the fractional portion of the transfer.
            // Again, for self-sends where the before and after balances are equal, no ERC-721s will be gained here.
            if (
                erc20BalanceOf(to_) /
                    units -
                    erc20BalanceOfReceiverBefore /
                    units >
                nftsToTransfer
            ) {
                _retrieveOrMintERC721(to_);
            }
        }

        return true;
    }

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

        if (totalSupply + value_ > ID_ENCODING_PREFIX) {
            revert MintLimitReached();
        }

        _transferERC20WithERC721(address(0), to_, value_);
    }

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

        uint256 id;

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

            // Reserve max uint256 for approvals
            if (minted == type(uint256).max) {
                revert MintLimitReached();
            }

            id = ID_ENCODING_PREFIX + minted;
        }

        address erc721Owner = _getOwnerOf(id);

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

        // Transfer the token to the recipient, either transferring from the contract's bank or minting.
        // Does not handle ERC-721 exemptions.
        _transferERC721(erc721Owner, to_, id);
    }

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

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

        // Transfer to 0x0.
        // Does not handle ERC-721 exemptions.
        _transferERC721(from_, address(0), id);

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

    /// @notice Initialization function to set pairs / etc, saving gas by avoiding mint / burn on unnecessary targets
    function _setERC721TransferExempt(
        address target_,
        bool state_
    ) internal virtual {
        if (target_ == address(0)) {
            revert InvalidExemption();
        }

        // Adjust the ERC721 balances of the target to respect exemption rules.
        // Despite this logic, it is still recommended practice to exempt prior to the target
        // having an active balance.
        if (state_) {
            _clearERC721Balance(target_);
        } else {
            _reinstateERC721Balance(target_);
        }

        _erc721TransferExempt[target_] = state_;
    }

    /// @notice Function to reinstate balance on exemption removal
    function _reinstateERC721Balance(address target_) private {
        uint256 expectedERC721Balance = erc20BalanceOf(target_) / units;
        uint256 actualERC721Balance = erc721BalanceOf(target_);

        for (uint256 i = 0; i < expectedERC721Balance - actualERC721Balance; ) {
            // Transfer ERC721 balance in from pool
            _retrieveOrMintERC721(target_);
            unchecked {
                ++i;
            }
        }
    }

    /// @notice Function to clear balance on exemption inclusion
    function _clearERC721Balance(address target_) private {
        uint256 erc721Balance = erc721BalanceOf(target_);

        for (uint256 i = 0; i < erc721Balance; ) {
            // Transfer out ERC721 balance
            _withdrawAndStoreERC721(target_);
            unchecked {
                ++i;
            }
        }
    }

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

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

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

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

        _ownedData[id_] = data;
    }

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

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

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

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

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

        _ownedData[id_] = data;
    }
}

File 13 of 17 : ERC404UniswapV3Exempt.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC404} from "../ERC404.sol";
import {IPeripheryImmutableState} from "@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol";

abstract contract ERC404UniswapV3Exempt is ERC404 {
    error ERC404UniswapV3ExemptFactoryMismatch();
    error ERC404UniswapV3ExemptWETH9Mismatch();

    constructor(
        address uniswapV3Router_,
        address uniswapV3NonfungiblePositionManager_
    ) {
        IPeripheryImmutableState uniswapV3Router = IPeripheryImmutableState(
            uniswapV3Router_
        );

        // Set the Uniswap v3 swap router as exempt.
        _setERC721TransferExempt(uniswapV3Router_, true);

        IPeripheryImmutableState uniswapV3NonfungiblePositionManager = IPeripheryImmutableState(
                uniswapV3NonfungiblePositionManager_
            );

        // Set the Uniswap v3 nonfungible position manager as exempt.
        _setERC721TransferExempt(uniswapV3NonfungiblePositionManager_, true);

        // Require the Uniswap v3 factory from the position manager and the swap router to be the same.
        if (
            uniswapV3Router.factory() !=
            uniswapV3NonfungiblePositionManager.factory()
        ) {
            revert ERC404UniswapV3ExemptFactoryMismatch();
        }

        // Require the Uniswap v3 WETH9 from the position manager and the swap router to be the same.
        if (
            uniswapV3Router.WETH9() !=
            uniswapV3NonfungiblePositionManager.WETH9()
        ) {
            revert ERC404UniswapV3ExemptWETH9Mismatch();
        }

        uint24[4] memory feeTiers = [
            uint24(100),
            uint24(500),
            uint24(3_000),
            uint24(10_000)
        ];

        // Determine the Uniswap v3 pair address for this token.
        for (uint256 i = 0; i < feeTiers.length; ) {
            address uniswapV3Pair = _getUniswapV3Pair(
                uniswapV3Router.factory(),
                uniswapV3Router.WETH9(),
                feeTiers[i]
            );

            // Set the Uniswap v3 pair as exempt.
            _setERC721TransferExempt(uniswapV3Pair, true);

            unchecked {
                ++i;
            }
        }
    }

    function _getUniswapV3Pair(
        address uniswapV3Factory_,
        address weth_,
        uint24 fee_
    ) private view returns (address) {
        address thisAddress = address(this);

        (address token0, address token1) = thisAddress < weth_
            ? (thisAddress, weth_)
            : (weth_, thisAddress);

        return
            address(
                uint160(
                    uint256(
                        keccak256(
                            abi.encodePacked(
                                hex"ff",
                                uniswapV3Factory_,
                                keccak256(abi.encode(token0, token1, fee_)),
                                hex"e34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54"
                            )
                        )
                    )
                )
            );
    }
}

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

import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";

interface IERC404 is IERC165 {
  error NotFound();
  error InvalidTokenId();
  error AlreadyExists();
  error InvalidRecipient();
  error InvalidSender();
  error InvalidSpender();
  error InvalidOperator();
  error UnsafeRecipient();
  error RecipientIsERC721TransferExempt();
  error Unauthorized();
  error InsufficientAllowance();
  error DecimalsTooLow();
  error PermitDeadlineExpired();
  error InvalidSigner();
  error InvalidApproval();
  error OwnedIndexOverflow();
  error MintLimitReached();
  error InvalidExemption();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 16 of 17 : ERC20Events.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

library ERC20Events {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 amount);
}

File 17 of 17 : ERC721Events.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

library ERC721Events {
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 indexed id
    );
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 indexed id
    );
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"maxTotalSupplyERC721_","type":"uint256"},{"internalType":"address","name":"initialOwner_","type":"address"},{"internalType":"address","name":"initialMintRecipient_","type":"address"},{"internalType":"address","name":"uniswapSwapRouter_","type":"address"},{"internalType":"address","name":"uniswapV3NonfungiblePositionManager_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[],"name":"ERC404UniswapV3ExemptFactoryMismatch","type":"error"},{"inputs":[],"name":"ERC404UniswapV3ExemptWETH9Mismatch","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidApproval","type":"error"},{"inputs":[],"name":"InvalidExemption","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidRarity","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpender","type":"error"},{"inputs":[],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"PermitDeadlineExpired","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","type":"error"},{"inputs":[],"name":"QueueOutOfBounds","type":"error"},{"inputs":[],"name":"RecipientIsERC721TransferExempt","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":"value","type":"uint256"}],"name":"Approval","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":"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":"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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ID_ENCODING_PREFIX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"atomicValues","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint8","name":"_rarity","type":"uint8"}],"name":"balanceOfByRarity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balancesOfByRarity","outputs":[{"internalType":"uint256[6]","name":"balances","type":"uint256[6]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchTransferERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"colors","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"decodedTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20Approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc20BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20TransferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_rarity","type":"uint8"}],"name":"erc721TransferByRarity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"}],"name":"erc721TransferExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721TransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getERC721QueueLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"count_","type":"uint256"}],"name":"getERC721TokensInQueue","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHighestRarity","outputs":[{"internalType":"enum VexAeterna.Rarity","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getLowestRarity","outputs":[{"internalType":"enum VexAeterna.Rarity","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRarityByTokenId","outputs":[{"internalType":"enum VexAeterna.Rarity","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"imageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"materials","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"erc721Owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"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":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"r","type":"uint8"},{"internalType":"uint16","name":"_newValue","type":"uint16"}],"name":"setAtomicValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"value_","type":"bool"}],"name":"setERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_imageURI","type":"string"}],"name":"setImageURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state_","type":"bool"}],"name":"setSelfERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b5060405162005487380380620054878339810160408190526200003591620013a5565b8181898989886001600160a01b0381166200006a57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200007581620006e8565b5060036200008484826200150e565b5060046200009383826200150e565b5060128160ff161015620000ba576040516398790fd560e01b815260040160405180910390fd5b60ff81166080819052620000d090600a620016ed565b60a0524660c052620000e162000738565b60e05250839150620000f79050816001620007d4565b8162000105816001620007d4565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000144573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016a919062001705565b6001600160a01b0316826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d8919062001705565b6001600160a01b0316146200020057604051633338041760e01b815260040160405180910390fd5b806001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200023f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000265919062001705565b6001600160a01b0316826001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002ad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d3919062001705565b6001600160a01b031614620002fb576040516376a731bf60e01b815260040160405180910390fd5b60408051608081018252606481526101f46020820152610bb891810191909152612710606082015260005b60048110156200043957600062000420856001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000375573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200039b919062001705565b866001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003da573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000400919062001705565b85856004811062000415576200041562001723565b60200201516200084a565b90506200042f816001620007d4565b5060010162000326565b50505050505062000452836001620007d460201b60201c565b6200046d8360a0518762000467919062001739565b6200094c565b60408051808201909152600c81526b135e5cdd1a58c8119c9bdcdd60a21b60208201526012906200049f90826200150e565b5060408051808201909152600d81526c56657264616e742050756c736560981b6020820152601390620004d390826200150e565b5060408051808201909152600d81526c536b797269667420476c65616d60981b60208201526014906200050790826200150e565b5060408051808201909152600a81526909ee4c2dcceca40accaf60b31b60208201526015906200053890826200150e565b5060408051808201909152600b81526a4e6562756c612050696e6b60a81b60208201526016906200056a90826200150e565b5060408051808201909152601081526f53756e6265616d2052616469616e636560801b6020820152601790620005a190826200150e565b506040805180820190915260088152675665786f6469756d60c01b6020820152601890620005d090826200150e565b5060408051808201909152600681526556657869746560d01b6020820152601990620005fd90826200150e565b506040805180820190915260088152675665786f6c69746560c01b6020820152601a906200062c90826200150e565b506040805180820190915260088152675665786f7269756d60c01b6020820152601b906200065b90826200150e565b50604080518082019091526009815268566578696c6c69756d60b81b6020820152601c906200068b90826200150e565b506040805180820190915260088152675665786f7269746560c01b6020820152601d90620006ba90826200150e565b5050601180546001600160601b0319166b027100190007000400020001179055506200185295505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516200076c919062001753565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216620007fc5760405163a41e3d3f60e01b815260040160405180910390fd5b801562000814576200080e82620009bc565b6200081f565b6200081f82620009f4565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b60003081806001600160a01b0386168310620008685785836200086b565b82865b604080516001600160a01b03808516602083015283169181019190915262ffffff881660608201529193509150879060800160405160208183030381529060405280519060200120604051602001620009299291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b6001600160601b031916600183015260158201527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54603582015260550190565b60408051601f198184030181529190528051602090910120979650505050505050565b6001600160a01b0382166200097457604051634e46966960e11b815260040160405180910390fd5b600160ff1b81600554620009899190620017d1565b1115620009a95760405163303b682f60e01b815260040160405180910390fd5b620009b76000838362000a7d565b505050565b6001600160a01b0381166000908152600c6020526040812054905b81811015620009b757620009eb8362000d2c565b600101620009d7565b60a05160009062000a1a836001600160a01b031660009081526007602052604090205490565b62000a269190620017e7565b9050600062000a4a836001600160a01b03166000908152600c602052604090205490565b905060005b62000a5b82846200180a565b81101562000a775762000a6e8462000dc1565b60010162000a4f565b50505050565b6001600160a01b0383811660009081526007602052604080822054928516825281205490919062000ab086868662000eb7565b600062000abd8762000f69565b9050600062000acc8762000f69565b905081801562000ad95750805b62000d1e57811562000b5557600060a0518462000af79190620017e7565b60a0516001600160a01b038a1660009081526007602052604090205462000b1f9190620017e7565b62000b2b91906200180a565b905060005b8181101562000b4d5762000b448962000dc1565b60010162000b30565b505062000d1e565b801562000bc25760a0516001600160a01b038916600090815260076020526040812054909162000b8591620017e7565b60a05162000b949087620017e7565b62000ba091906200180a565b905060005b8181101562000b4d5762000bb98a62000d2c565b60010162000ba5565b600060a0518762000bd49190620017e7565b905060005b8181101562000c66576001600160a01b038a166000908152600c602052604081205462000c09906001906200180a565b6001600160a01b038c166000908152600c60205260408120805492935090918390811062000c3b5762000c3b62001723565b9060005260206000200154905062000c5b8c8c8362000fa060201b60201c565b505060010162000bd9565b5060a051819062000c8c8b6001600160a01b031660009081526007602052604090205490565b62000c989190620017e7565b60a05162000ca79088620017e7565b62000cb391906200180a565b111562000cc55762000cc58962000d2c565b8060a0518562000cd69190620017e7565b60a0516001600160a01b038b1660009081526007602052604090205462000cfe9190620017e7565b62000d0a91906200180a565b111562000d1c5762000d1c8862000dc1565b505b506001979650505050505050565b6001600160a01b03811662000d5457604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c60205260408120805462000d7c906001906200180a565b8154811062000d8f5762000d8f62001723565b9060005260206000200154905062000db08260008362000fa060201b60201c565b62000dbd6001826200117c565b5050565b6001600160a01b03811662000de957604051634e46966960e11b815260040160405180910390fd5b600062000e0a600154600160801b81046001600160801b0390811691161490565b62000e235762000e1b6001620011e7565b905062000e72565b60066000815462000e349062001820565b9091555060065460010162000e5c5760405163303b682f60e01b815260040160405180910390fd5b60065462000e6f90600160ff1b620017d1565b90505b6000818152600b60205260409020546001600160a01b0316801562000eaa5760405163119b4fd360e11b815260040160405180910390fd5b620009b781848462000fa0565b6001600160a01b03831662000ee657806005600082825462000eda9190620017d1565b9091555062000f169050565b6001600160a01b0383166000908152600760205260408120805483929062000f109084906200180a565b90915550505b6001600160a01b0380831660008181526007602052604090819020805485019055519091851690600080516020620054678339815191529062000f5c9085815260200190565b60405180910390a3505050565b60006001600160a01b038216158062000f9a57506001600160a01b0382166000908152600d602052604090205460ff165b92915050565b6001600160a01b03831615620010ba57600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c9091528120805462000ff2906001906200180a565b8154811062001005576200100562001723565b9060005260206000200154905081811462001078576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c6020526040902080549192508391839081106200105e576200105e62001723565b60009182526020909120015562001076828262001258565b505b6001600160a01b0384166000908152600c60205260409020805480620010a257620010a26200183c565b60019003818190600052602060002001600090559055505b6001600160a01b0382161562001137576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c83529083208054600181810183558286529385200185905592529054620011319183916200112b91906200180a565b62001258565b62001147565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03166000805160206200546783398151915260405160405180910390a4505050565b81546001600160801b038082166000190191600160801b9004811690821603620011b957604051638acb5f2760e01b815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581546001600160801b031916179055565b80546000906001600160801b03600160801b82048116911681036200121f576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b6000828152600b60205260409020546001600160601b038211156200129057604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620012e857600080fd5b81516001600160401b0380821115620013055762001305620012c0565b604051601f8301601f19908116603f01168101908282118183101715620013305762001330620012c0565b81604052838152602092508660208588010111156200134e57600080fd5b600091505b8382101562001372578582018301518183018401529082019062001353565b6000602085830101528094505050505092915050565b80516001600160a01b0381168114620013a057600080fd5b919050565b600080600080600080600080610100898b031215620013c357600080fd5b88516001600160401b0380821115620013db57600080fd5b620013e98c838d01620012d6565b995060208b01519150808211156200140057600080fd5b506200140f8b828c01620012d6565b975050604089015160ff811681146200142757600080fd5b60608a015190965094506200143f60808a0162001388565b93506200144f60a08a0162001388565b92506200145f60c08a0162001388565b91506200146f60e08a0162001388565b90509295985092959890939650565b600181811c908216806200149357607f821691505b602082108103620014b457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620009b7576000816000526020600020601f850160051c81016020861015620014e55750805b601f850160051c820191505b818110156200150657828155600101620014f1565b505050505050565b81516001600160401b038111156200152a576200152a620012c0565b62001542816200153b84546200147e565b84620014ba565b602080601f8311600181146200157a5760008415620015615750858301515b600019600386901b1c1916600185901b17855562001506565b600085815260208120601f198616915b82811015620015ab578886015182559484019460019091019084016200158a565b5085821015620015ca5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562001631578160001904821115620016155762001615620015da565b808516156200162357918102915b93841c9390800290620015f5565b509250929050565b6000826200164a5750600162000f9a565b81620016595750600062000f9a565b81600181146200167257600281146200167d576200169d565b600191505062000f9a565b60ff841115620016915762001691620015da565b50506001821b62000f9a565b5060208310610133831016604e8410600b8410161715620016c2575081810a62000f9a565b620016ce8383620015f0565b8060001904821115620016e557620016e5620015da565b029392505050565b6000620016fe60ff84168362001639565b9392505050565b6000602082840312156200171857600080fd5b620016fe8262001388565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141762000f9a5762000f9a620015da565b600080835462001763816200147e565b600182811680156200177e57600181146200179457620017c5565b60ff1984168752821515830287019450620017c5565b8760005260208060002060005b85811015620017bc5781548a820152908401908201620017a1565b50505082870194505b50929695505050505050565b8082018082111562000f9a5762000f9a620015da565b6000826200180557634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111562000f9a5762000f9a620015da565b600060018201620018355762001835620015da565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e051613b87620018e06000396000610ea701526000610e7701526000818161084001528181611afe01528181611f3501528181611f7901528181611ff20152818161201c015281816120700152818161211c01528181612169015281816121ad015281816121d401526126e90152600081816105a40152612a6c0152613b876000f3fe60806040526004361061037a5760003560e01c806379673feb116101d1578063bd11f69d11610102578063dd62ed3e116100a0578063e985e9c51161006f578063e985e9c514610aa7578063f2fde38b14610ae2578063f3f7c8d514610b02578063f780bc1a14610b2f57600080fd5b8063dd62ed3e14610a0f578063dd63769914610a47578063dfabc03314610a67578063e0df5b6f14610a8757600080fd5b8063c87b56dd116100dc578063c87b56dd1461099a578063d505accf146109ba578063d547cfb7146109da578063d96ca0b9146109ef57600080fd5b8063bd11f69d14610945578063c5ab3ba614610965578063c6e672b91461097a57600080fd5b8063976a84351161016f578063a9059cbb11610149578063a9059cbb146108a2578063b1ab9317146108c2578063b3f9ea34146108ef578063b88d4fde1461092557600080fd5b8063976a84351461082e578063a22cb46514610862578063a8308ebc1461088257600080fd5b806389fb4c66116101ab57806389fb4c66146107c65780638a696e50146107db5780638da5cb5b146107fb57806395d89b411461081957600080fd5b806379673feb146107595780637a8e8526146107795780637ecebe001461079957600080fd5b8063313ce567116102ab578063518efcb71161024957806370a082311161022357806370a08231146106c4578063715018a6146106f1578063721da4c11461070657806373bdf2151461073957600080fd5b8063518efcb7146106785780636352211e1461068c5780636e8f624b146106ac57600080fd5b80633ccfd60b116102855780633ccfd60b1461060d57806342842e0e146106225780634d966072146106425780634f02c4201461066257600080fd5b8063313ce567146105925780633644e515146105d85780633b52d421146105ed57600080fd5b806309674eb0116103185780631815ae79116102f25780631815ae791461051b57806318160ddd1461054857806323b872dd1461055e5780632945fc2c1461057e57600080fd5b806309674eb0146104d157806309f0ef65146104e6578063135d088d1461050657600080fd5b806306fdde031161035457806306fdde0314610421578063081812fc14610443578063081d536f14610491578063095ea7b3146104b157600080fd5b806301ffc9a71461038657806302519da3146103bb57806304787ca2146103ff57600080fd5b3661038157005b600080fd5b34801561039257600080fd5b506103a66103a1366004612e74565b610b4f565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103f16103d6366004612ea8565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103b2565b34801561040b57600080fd5b5061041f61041a366004612f4f565b610b86565b005b34801561042d57600080fd5b50610436610b9e565b6040516103b29190612ff0565b34801561044f57600080fd5b5061047961045e366004613003565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103b2565b34801561049d57600080fd5b5061041f6104ac36600461301c565b610c2c565b3480156104bd57600080fd5b506103a66104cc3660046130ad565b610cdb565b3480156104dd57600080fd5b506103f1610d14565b3480156104f257600080fd5b506103a6610501366004612ea8565b610d3e565b34801561051257600080fd5b50610436610d70565b34801561052757600080fd5b5061053b610536366004613003565b610d7d565b6040516103b291906130ed565b34801561055457600080fd5b506103f160055481565b34801561056a57600080fd5b506103a6610579366004613115565b610e36565b34801561058a57600080fd5b50600061053b565b34801561059e57600080fd5b506105c67f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016103b2565b3480156105e457600080fd5b506103f1610e73565b3480156105f957600080fd5b506103f1610608366004613003565b610ec9565b34801561061957600080fd5b5061041f610efd565b34801561062e57600080fd5b5061041f61063d366004613115565b610fe6565b34801561064e57600080fd5b506103a661065d3660046130ad565b611006565b34801561066e57600080fd5b506103f160065481565b34801561068457600080fd5b50600561053b565b34801561069857600080fd5b506104796106a7366004613003565b611093565b3480156106b857600080fd5b506103f1600160ff1b81565b3480156106d057600080fd5b506103f16106df366004612ea8565b60076020526000908152604090205481565b3480156106fd57600080fd5b5061041f6110fd565b34801561071257600080fd5b50610726610721366004613003565b611111565b60405161ffff90911681526020016103b2565b34801561074557600080fd5b5061041f610754366004613162565b61113f565b34801561076557600080fd5b506103f16107743660046131a0565b6111de565b34801561078557600080fd5b50610436610794366004613003565b6112af565b3480156107a557600080fd5b506103f16107b4366004612ea8565b600e6020526000908152604090205481565b3480156107d257600080fd5b506005546103f1565b3480156107e757600080fd5b5061041f6107f63660046131e3565b6112ce565b34801561080757600080fd5b506000546001600160a01b0316610479565b34801561082557600080fd5b506104366112db565b34801561083a57600080fd5b506103f17f000000000000000000000000000000000000000000000000000000000000000081565b34801561086e57600080fd5b5061041f61087d3660046131fe565b6112e8565b34801561088e57600080fd5b5061041f61089d366004613228565b61137b565b3480156108ae57600080fd5b506103a66108bd3660046130ad565b611483565b3480156108ce57600080fd5b506108e26108dd366004612ea8565b6114b7565b6040516103b29190613275565b3480156108fb57600080fd5b506103f161090a366004612ea8565b6001600160a01b03166000908152600c602052604090205490565b34801561093157600080fd5b5061041f6109403660046132b9565b611523565b34801561095157600080fd5b50610436610960366004613003565b611611565b34801561097157600080fd5b506006546103f1565b34801561098657600080fd5b5061041f6109953660046131fe565b611621565b3480156109a657600080fd5b506104366109b5366004613003565b611633565b3480156109c657600080fd5b5061041f6109d5366004613335565b6116c5565b3480156109e657600080fd5b50610436611908565b3480156109fb57600080fd5b506103a6610a0a366004613115565b611915565b348015610a1b57600080fd5b506103f1610a2a36600461339f565b600860209081526000928352604080842090915290825290205481565b348015610a5357600080fd5b5061041f610a62366004613115565b6119cc565b348015610a7357600080fd5b5061041f610a823660046130ad565b611b2d565b348015610a9357600080fd5b5061041f610aa2366004612f4f565b611bf2565b348015610ab357600080fd5b506103a6610ac236600461339f565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610aee57600080fd5b5061041f610afd366004612ea8565b611c06565b348015610b0e57600080fd5b50610b22610b1d366004612ea8565b611c41565b6040516103b291906133c9565b348015610b3b57600080fd5b506108e2610b4a3660046133fa565b611c93565b60006001600160e01b0319821663caf91ff560e01b1480610b8057506001600160e01b031982166301ffc9a760e01b145b92915050565b610b8e611d30565b6010610b9a8282613498565b5050565b60038054610bab9061341c565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd79061341c565b8015610c245780601f10610bf957610100808354040283529160200191610c24565b820191906000526020600020905b815481529060010190602001808311610c0757829003601f168201915b505050505081565b6001600160a01b038316151580610c4b57506001600160a01b03841615155b610c9c5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74207472616e7366657220746f203020616464726573730000000060448201526064015b60405180910390fd5b8060005b81811015610cd357610ccb8686868685818110610cbf57610cbf613558565b905060200201356119cc565b600101610ca0565b505050505050565b6000610ce682611d5d565b15610cfa57610cf58383611b2d565b610d0b565b610d048383611006565b9050610b80565b50600192915050565b6000610d396001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610b805750506001600160a01b03166000908152600d602052604090205460ff1690565b60108054610bab9061341c565b60008082604051602001610d9391815260200190565b60408051601f19818403018152919052805160209091012090506000610dbc620186a083613584565b610dc79060016135ae565b905061c3508111610ddc575060009392505050565b620124f88111610df0575060019392505050565b620163788111610e04575060029392505050565b62017ed08111610e18575060039392505050565b6201863c8111610e2c575060049392505050565b5060059392505050565b6000610e4182611d5d565b15610e5657610e518484846119cc565b610e68565b610e61848484611915565b9050610e6c565b5060015b9392505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610ea457610d39611d76565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000600160ff1b8211610eef576040516307ed98ed60e31b815260040160405180910390fd5b610b80600160ff1b836135c1565b610f05611d30565b4780610f4c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610c93565b600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114610f99576040519150601f19603f3d011682016040523d82523d6000602084013e610f9e565b606091505b5050905080610b9a5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610c93565b61100183838360405180602001604052806000815250611523565b505050565b60006001600160a01b03831661102f57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b6000818152600b60205260409020546001600160a01b03166110b482611d5d565b6110d1576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b0381166110f85760405163c5723b5160e01b815260040160405180910390fd5b919050565b611105611d30565b61110f6000611e10565b565b6011816006811061112157600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b611147611d30565b60ff8216600510801590611159575060015b61119e5760405162461bcd60e51b815260206004820152601660248201527552617269747920646f6573206e6f742065786973747360501b6044820152606401610c93565b8060118360ff16600681106111b5576111b5613558565b601091828204019190066002026101000a81548161ffff021916908361ffff1602179055505050565b6000600560ff831611806111f0575060005b1561120e5760405163013ebdc960e51b815260040160405180910390fd5b6000611219846114b7565b805190915080156112a4576000805b8281101561129957600061125485838151811061124757611247613558565b6020026020010151610ec9565b9050600061126182610d7d565b6005811115611272576112726130d7565b90508060ff168860ff160361128f578361128b816135d4565b9450505b5050600101611228565b509250610b80915050565b600092505050610b80565b601881600681106112bf57600080fd5b018054909150610bab9061341c565b6112d83382611e60565b50565b60048054610bab9061341c565b6001600160a01b03821661130f5760405163ccea9e6f60e01b815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061138785836111de565b9050828110156113e35760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f756768206f6620746865736520656e657267792073746f6e656044820152607360f81b6064820152608401610c93565b60006113ee866114b7565b90506000805b825181101561147957600083828151811061141157611411613558565b60200260200101519050600061142961053683610ec9565b600581111561143a5761143a6130d7565b90508660ff168160ff160361146f576114548a8a846119cc565b8361145e816135d4565b94505087840361146f575050611479565b50506001016113f4565b5050505050505050565b60006001600160a01b0383166114ac57604051634e46966960e11b815260040160405180910390fd5b610e6c338484611ecf565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561151757602002820191906000526020600020905b815481526020019060010190808311611503575b50505050509050919050565b61152c82611d5d565b611549576040516307ed98ed60e31b815260040160405180910390fd5b611554848484610e36565b506001600160a01b0383163b158015906115ed5750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a029061159d9033908990889088906004016135ed565b6020604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e0919061362a565b6001600160e01b03191614155b1561160b57604051633da6393160e01b815260040160405180910390fd5b50505050565b601281600681106112bf57600080fd5b611629611d30565b610b9a8282611e60565b6060600061164083610ec9565b90506000600f80546116519061341c565b9050111561168c57600f61166482612245565b6040516020016116759291906136ba565b604051602081830303815290604052915050919050565b600061169782610d7d565b60058111156116a8576116a86130d7565b905060006116b682846122d8565b95945050505050565b50919050565b428410156116e6576040516305787bdf60e01b815260040160405180910390fd5b6116ef85611d5d565b1561170d576040516303e7c1bd60e31b815260040160405180910390fd5b6001600160a01b03861661173457604051635461585f60e01b815260040160405180910390fd5b60006001611740610e73565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561184c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615806118815750876001600160a01b0316816001600160a01b031614155b1561189f57604051632057875960e21b815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600f8054610bab9061341c565b60006001600160a01b03841661193e57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03831661196557604051634e46966960e11b815260040160405180910390fd5b6001600160a01b038416600090815260086020908152604080832033845290915290205460001981146119c15761199c83826135c1565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b6116b6858585611ecf565b6001600160a01b0383166119f357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216611a1a57604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b03848116911614611a53576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590611a9057506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b8015611ab357506000818152600960205260409020546001600160a01b03163314155b15611ad0576040516282b42960e81b815260040160405180910390fd5b611ad982610d3e565b15611af757604051635ce7539760e01b815260040160405180910390fd5b611b2283837f0000000000000000000000000000000000000000000000000000000000000000612397565b611001838383612453565b6000818152600b60205260409020546001600160a01b0316338114801590611b7957506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15611b96576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611bfa611d30565b600f610b9a8282613498565b611c0e611d30565b6001600160a01b038116611c3857604051631e4fbdf760e01b815260006004820152602401610c93565b6112d881611e10565b611c49612e40565b60005b600560ff8216116116bf576000611c6384836111de565b905080838360ff1660068110611c7b57611c7b613558565b60200201525080611c8b816136df565b915050611c4c565b606060008267ffffffffffffffff811115611cb057611cb0612ec3565b604051908082528060200260200182016040528015611cd9578160200160208202803683370190505b509050835b611ce884866135ae565b811015611d2857611cfa60018261262b565b82611d0587846135c1565b81518110611d1557611d15613558565b6020908102919091010152600101611cde565b509392505050565b6000546001600160a01b0316331461110f5760405163118cdaa760e01b8152336004820152602401610c93565b6000600160ff1b82118015610b80575050600019141590565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051611da891906136fe565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216611e875760405163a41e3d3f60e01b815260040160405180910390fd5b8015611e9b57611e9682612696565b611ea4565b611ea4826126ca565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190611f00868686612397565b6000611f0b87610d3e565b90506000611f1887610d3e565b9050818015611f245750805b612237578115611fcd576000611f5a7f00000000000000000000000000000000000000000000000000000000000000008561370a565b6001600160a01b038916600090815260076020526040902054611f9e907f00000000000000000000000000000000000000000000000000000000000000009061370a565b611fa891906135c1565b905060005b81811015611fc657611fbe89612758565b600101611fad565b5050612237565b8015612069576001600160a01b038816600090815260076020526040812054612017907f00000000000000000000000000000000000000000000000000000000000000009061370a565b6120417f00000000000000000000000000000000000000000000000000000000000000008761370a565b61204b91906135c1565b905060005b81811015611fc6576120618a612840565b600101612050565b60006120957f00000000000000000000000000000000000000000000000000000000000000008861370a565b905060005b81811015612118576001600160a01b038a166000908152600c60205260408120546120c7906001906135c1565b6001600160a01b038c166000908152600c6020526040812080549293509091839081106120f6576120f6613558565b9060005260206000200154905061210e8c8c83612453565b505060010161209a565b50807f000000000000000000000000000000000000000000000000000000000000000061215a8b6001600160a01b031660009081526007602052604090205490565b612164919061370a565b61218e7f00000000000000000000000000000000000000000000000000000000000000008861370a565b61219891906135c1565b11156121a7576121a789612840565b806121d27f00000000000000000000000000000000000000000000000000000000000000008661370a565b7f00000000000000000000000000000000000000000000000000000000000000006122128b6001600160a01b031660009081526007602052604090205490565b61221c919061370a565b61222691906135c1565b11156122355761223588612758565b505b506001979650505050505050565b60606000612252836128c1565b600101905060008167ffffffffffffffff81111561227257612272612ec3565b6040519080825280601f01601f19166020018201604052801561229c576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122a657509392505050565b606060006122e68484612999565b905060006122f2612a62565b905060006122ff86612ae5565b9050600061230c87612b7e565b90508383838360405160200161232392919061371e565b60408051601f1981840301815290829052612341929160200161371e565b60408051601f198184030181529082905261235f929160200161371e565b60408051601f198184030181529082905261237c91602001613744565b60405160208183030381529060405294505050505092915050565b6001600160a01b0383166123c25780600560008282546123b791906135ae565b909155506123f09050565b6001600160a01b038316600090815260076020526040812080548392906123ea9084906135c1565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906124469085815260200190565b60405180910390a3505050565b6001600160a01b0383161561255e57600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546124a2906001906135c1565b815481106124b2576124b2613558565b9060005260206000200154905081811461251f576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c60205260409020805491925083918390811061250757612507613558565b60009182526020909120015561251d8282612cf1565b505b6001600160a01b0384166000908152600c6020526040902080548061254657612546613789565b60019003818190600052602060002001600090559055505b6001600160a01b038216156125d5576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546125d09183916125cb91906135c1565b612cf1565b6125e5565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061264f83546001600160801b03808216600160801b9092048116919091031690565b821061266e5760405163580821e760e01b815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b81811015611001576126c283612840565b6001016126b1565b6001600160a01b03811660009081526007602052604081205461270e907f00000000000000000000000000000000000000000000000000000000000000009061370a565b90506000612731836001600160a01b03166000908152600c602052604090205490565b905060005b61274082846135c1565b81101561160b5761275084612758565b600101612736565b6001600160a01b03811661277f57604051634e46966960e11b815260040160405180910390fd5b600061279f600154600160801b81046001600160801b0390811691161490565b6127b4576127ad6001612d5d565b90506127fe565b6006600081546127c3906135d4565b909155506006546001016127ea5760405163303b682f60e01b815260040160405180910390fd5b6006546127fb90600160ff1b6135ae565b90505b6000818152600b60205260409020546001600160a01b031680156128355760405163119b4fd360e11b815260040160405180910390fd5b611001818484612453565b6001600160a01b03811661286757604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c60205260408120805461288d906001906135c1565b8154811061289d5761289d613558565b906000526020600020015490506128b682600083612453565b610b9a600182612dcd565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106129005772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061292c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061294a57662386f26fc10000830492506010015b6305f5e1008310612962576305f5e100830492506008015b612710831061297657612710830492506004015b60648310612988576064830492506002015b600a8310610b805760010192915050565b6060600060188460ff16600681106129b3576129b3613558565b016129bd84612245565b6040516020016129cd919061379f565b60408051601f19818403018152908290526129eb92916020016136ba565b60408051601f1981840301815290829052612a08916020016137ca565b6040516020818303038152906040529050806003604051602001612a2c91906137fd565b60408051601f1981840301815290829052612a4a929160200161371e565b60405160208183030381529060405291505092915050565b6060612aa4612a927f0000000000000000000000000000000000000000000000000000000000000000600a613908565b600554612a9f919061370a565b612245565b604051602001612ab49190613917565b60408051601f1981840301815290829052612ad191602001613967565b604051602081830303815290604052905090565b6060601060188360ff1660068110612aff57612aff613558565b01604051602001612b109190613a0f565b60408051601f1981840301815290829052612b2e92916020016136ba565b60408051601f1981840301815290829052612b4b91602001613a32565b60408051601f1981840301815290829052612b6891602001613a68565b6040516020818303038152906040529050919050565b6060600060188360ff1660068110612b9857612b98613558565b01604051602001612ba99190613a84565b604051602081830303815290604052905060008160128560ff1660068110612bd357612bd3613558565b01604051602001612be49190613ad3565b60408051601f1981840301815290829052612c02929160200161371e565b6040516020818303038152906040529050600081604051602001612c5e907f227d2c207b2274726169745f74797065223a202241746f6d69632056616c756581526b0111610113b30b63ab2911d160a51b6020820152602c0190565b604051602081830303815290604052612ca960118860ff1660068110612c8657612c86613558565b601091828204019190066002029054906101000a900461ffff1661ffff16612245565b604051602001612cba929190613b14565b60408051601f1981840301815290829052612cd8929160200161371e565b60408051601f1981840301815291905295945050505050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115612d2d57604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b8204811691168103612d94576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b9004811690821603612e0957604051638acb5f2760e01b815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581546fffffffffffffffffffffffffffffffff1916179055565b6040518060c001604052806006906020820280368337509192915050565b6001600160e01b0319811681146112d857600080fd5b600060208284031215612e8657600080fd5b8135610e6c81612e5e565b80356001600160a01b03811681146110f857600080fd5b600060208284031215612eba57600080fd5b610e6c82612e91565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612ef457612ef4612ec3565b604051601f8501601f19908116603f01168101908282118183101715612f1c57612f1c612ec3565b81604052809350858152868686011115612f3557600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612f6157600080fd5b813567ffffffffffffffff811115612f7857600080fd5b8201601f81018413612f8957600080fd5b612f9884823560208401612ed9565b949350505050565b60005b83811015612fbb578181015183820152602001612fa3565b50506000910152565b60008151808452612fdc816020860160208601612fa0565b601f01601f19169290920160200192915050565b602081526000610e6c6020830184612fc4565b60006020828403121561301557600080fd5b5035919050565b6000806000806060858703121561303257600080fd5b61303b85612e91565b935061304960208601612e91565b9250604085013567ffffffffffffffff8082111561306657600080fd5b818701915087601f83011261307a57600080fd5b81358181111561308957600080fd5b8860208260051b850101111561309e57600080fd5b95989497505060200194505050565b600080604083850312156130c057600080fd5b6130c983612e91565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b602081016006831061310f57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561312a57600080fd5b61313384612e91565b925061314160208501612e91565b9150604084013590509250925092565b803560ff811681146110f857600080fd5b6000806040838503121561317557600080fd5b61317e83613151565b9150602083013561ffff8116811461319557600080fd5b809150509250929050565b600080604083850312156131b357600080fd5b6131bc83612e91565b91506131ca60208401613151565b90509250929050565b803580151581146110f857600080fd5b6000602082840312156131f557600080fd5b610e6c826131d3565b6000806040838503121561321157600080fd5b61321a83612e91565b91506131ca602084016131d3565b6000806000806080858703121561323e57600080fd5b61324785612e91565b935061325560208601612e91565b92506040850135915061326a60608601613151565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156132ad57835183529284019291840191600101613291565b50909695505050505050565b600080600080608085870312156132cf57600080fd5b6132d885612e91565b93506132e660208601612e91565b925060408501359150606085013567ffffffffffffffff81111561330957600080fd5b8501601f8101871361331a57600080fd5b61332987823560208401612ed9565b91505092959194509250565b600080600080600080600060e0888a03121561335057600080fd5b61335988612e91565b965061336760208901612e91565b9550604088013594506060880135935061338360808901613151565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156133b257600080fd5b6133bb83612e91565b91506131ca60208401612e91565b60c08101818360005b60068110156133f15781518352602092830192909101906001016133d2565b50505092915050565b6000806040838503121561340d57600080fd5b50508035926020909101359150565b600181811c9082168061343057607f821691505b6020821081036116bf57634e487b7160e01b600052602260045260246000fd5b601f821115611001576000816000526020600020601f850160051c810160208610156134795750805b601f850160051c820191505b81811015610cd357828155600101613485565b815167ffffffffffffffff8111156134b2576134b2612ec3565b6134c6816134c0845461341c565b84613450565b602080601f8311600181146134fb57600084156134e35750858301515b600019600386901b1c1916600185901b178555610cd3565b600085815260208120601f198616915b8281101561352a5788860151825594840194600190910190840161350b565b50858210156135485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826135935761359361356e565b500690565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b8057610b80613598565b81810381811115610b8057610b80613598565b6000600182016135e6576135e6613598565b5060010190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061362090830184612fc4565b9695505050505050565b60006020828403121561363c57600080fd5b8151610e6c81612e5e565b600081546136548161341c565b6001828116801561366c5760018114613681576136b0565b60ff19841687528215158302870194506136b0565b8560005260208060002060005b858110156136a75781548a82015290840190820161368e565b50505082870194505b5050505092915050565b60006136c68285613647565b83516136d6818360208801612fa0565b01949350505050565b600060ff821660ff81036136f5576136f5613598565b60010192915050565b6000610e6c8284613647565b6000826137195761371961356e565b500490565b60008351613730818460208801612fa0565b8351908301906136d6818360208801612fa0565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161377c81601b850160208701612fa0565b91909101601b0192915050565b634e487b7160e01b600052603160045260246000fd5b6201016960ed1b8152600082516137bd816003850160208701612fa0565b9190910160030192915050565b693d913730b6b2911d101160b11b815281516000906137f081600a850160208701612fa0565b91909101600a0192915050565b711116101131b932b0ba32b22fb13c911d101160711b81526000610e6c6012830184613647565b600181815b8085111561385f57816000190482111561384557613845613598565b8085161561385257918102915b93841c9390800290613829565b509250929050565b60008261387657506001610b80565b8161388357506000610b80565b816001811461389957600281146138a3576138bf565b6001915050610b80565b60ff8411156138b4576138b4613598565b50506001821b610b80565b5060208310610133831016604e8410600b84101617156138e2575081810a610b80565b6138ec8383613824565b806000190482111561390057613900613598565b029392505050565b6000610e6c60ff841683613867565b7f222c226465736372697074696f6e223a20224120636f6c6c656374696f6e206f815261033160f51b60208201526000825161395a816022850160208701612fa0565b9190910160220192915050565b60008251613979818460208701612fa0565b7f206469676974616c20636f6c6c65637469626c6520656e61626c6564206279209201918252507f4552433430342c20616e206578706572696d656e74616c20746f6b656e20737460208201527f616e646172642e222c202265787465726e616c5f75726c223a202268747470736040820152713a2f2f76657861657465726e612e636f6d2f60701b6060820152607201919050565b6000613a1b8284613647565b660173837339116160cd1b81526007019392505050565b6c1116101134b6b0b3b2911d101160991b81528151600090613a5b81600d850160208701612fa0565b91909101600d0192915050565b60008251613a7a818460208701612fa0565b9190910192915050565b7f2261747472696275746573223a205b7b2274726169745f74797065223a20224d81527330ba32b934b0b6111610113b30b63ab2911d101160611b60208201526000610e6c6034830184613647565b7f227d2c207b2274726169745f74797065223a2022436f6c6f72222c202276616c8152653ab2911d101160d11b60208201526000610e6c6026830184613647565b60008351613b26818460208801612fa0565b835190830190613b3a818360208801612fa0565b627d5d7d60e81b910190815260030194935050505056fea264697066735822122080dade468ce1721eb421e7c3fc94f196fc4cac7dbdf447d4252bf3573c054b6e64736f6c63430008180033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000186a00000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed74318220000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed74318220000000000000000000000002626664c2603336e57b271c5c0b26f421741e48100000000000000000000000003a520b32c04bf3beef7beb72e919cf822ed34f1000000000000000000000000000000000000000000000000000000000000000b5665782041657465726e6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035645580000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061037a5760003560e01c806379673feb116101d1578063bd11f69d11610102578063dd62ed3e116100a0578063e985e9c51161006f578063e985e9c514610aa7578063f2fde38b14610ae2578063f3f7c8d514610b02578063f780bc1a14610b2f57600080fd5b8063dd62ed3e14610a0f578063dd63769914610a47578063dfabc03314610a67578063e0df5b6f14610a8757600080fd5b8063c87b56dd116100dc578063c87b56dd1461099a578063d505accf146109ba578063d547cfb7146109da578063d96ca0b9146109ef57600080fd5b8063bd11f69d14610945578063c5ab3ba614610965578063c6e672b91461097a57600080fd5b8063976a84351161016f578063a9059cbb11610149578063a9059cbb146108a2578063b1ab9317146108c2578063b3f9ea34146108ef578063b88d4fde1461092557600080fd5b8063976a84351461082e578063a22cb46514610862578063a8308ebc1461088257600080fd5b806389fb4c66116101ab57806389fb4c66146107c65780638a696e50146107db5780638da5cb5b146107fb57806395d89b411461081957600080fd5b806379673feb146107595780637a8e8526146107795780637ecebe001461079957600080fd5b8063313ce567116102ab578063518efcb71161024957806370a082311161022357806370a08231146106c4578063715018a6146106f1578063721da4c11461070657806373bdf2151461073957600080fd5b8063518efcb7146106785780636352211e1461068c5780636e8f624b146106ac57600080fd5b80633ccfd60b116102855780633ccfd60b1461060d57806342842e0e146106225780634d966072146106425780634f02c4201461066257600080fd5b8063313ce567146105925780633644e515146105d85780633b52d421146105ed57600080fd5b806309674eb0116103185780631815ae79116102f25780631815ae791461051b57806318160ddd1461054857806323b872dd1461055e5780632945fc2c1461057e57600080fd5b806309674eb0146104d157806309f0ef65146104e6578063135d088d1461050657600080fd5b806306fdde031161035457806306fdde0314610421578063081812fc14610443578063081d536f14610491578063095ea7b3146104b157600080fd5b806301ffc9a71461038657806302519da3146103bb57806304787ca2146103ff57600080fd5b3661038157005b600080fd5b34801561039257600080fd5b506103a66103a1366004612e74565b610b4f565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103f16103d6366004612ea8565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103b2565b34801561040b57600080fd5b5061041f61041a366004612f4f565b610b86565b005b34801561042d57600080fd5b50610436610b9e565b6040516103b29190612ff0565b34801561044f57600080fd5b5061047961045e366004613003565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103b2565b34801561049d57600080fd5b5061041f6104ac36600461301c565b610c2c565b3480156104bd57600080fd5b506103a66104cc3660046130ad565b610cdb565b3480156104dd57600080fd5b506103f1610d14565b3480156104f257600080fd5b506103a6610501366004612ea8565b610d3e565b34801561051257600080fd5b50610436610d70565b34801561052757600080fd5b5061053b610536366004613003565b610d7d565b6040516103b291906130ed565b34801561055457600080fd5b506103f160055481565b34801561056a57600080fd5b506103a6610579366004613115565b610e36565b34801561058a57600080fd5b50600061053b565b34801561059e57600080fd5b506105c67f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016103b2565b3480156105e457600080fd5b506103f1610e73565b3480156105f957600080fd5b506103f1610608366004613003565b610ec9565b34801561061957600080fd5b5061041f610efd565b34801561062e57600080fd5b5061041f61063d366004613115565b610fe6565b34801561064e57600080fd5b506103a661065d3660046130ad565b611006565b34801561066e57600080fd5b506103f160065481565b34801561068457600080fd5b50600561053b565b34801561069857600080fd5b506104796106a7366004613003565b611093565b3480156106b857600080fd5b506103f1600160ff1b81565b3480156106d057600080fd5b506103f16106df366004612ea8565b60076020526000908152604090205481565b3480156106fd57600080fd5b5061041f6110fd565b34801561071257600080fd5b50610726610721366004613003565b611111565b60405161ffff90911681526020016103b2565b34801561074557600080fd5b5061041f610754366004613162565b61113f565b34801561076557600080fd5b506103f16107743660046131a0565b6111de565b34801561078557600080fd5b50610436610794366004613003565b6112af565b3480156107a557600080fd5b506103f16107b4366004612ea8565b600e6020526000908152604090205481565b3480156107d257600080fd5b506005546103f1565b3480156107e757600080fd5b5061041f6107f63660046131e3565b6112ce565b34801561080757600080fd5b506000546001600160a01b0316610479565b34801561082557600080fd5b506104366112db565b34801561083a57600080fd5b506103f17f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b34801561086e57600080fd5b5061041f61087d3660046131fe565b6112e8565b34801561088e57600080fd5b5061041f61089d366004613228565b61137b565b3480156108ae57600080fd5b506103a66108bd3660046130ad565b611483565b3480156108ce57600080fd5b506108e26108dd366004612ea8565b6114b7565b6040516103b29190613275565b3480156108fb57600080fd5b506103f161090a366004612ea8565b6001600160a01b03166000908152600c602052604090205490565b34801561093157600080fd5b5061041f6109403660046132b9565b611523565b34801561095157600080fd5b50610436610960366004613003565b611611565b34801561097157600080fd5b506006546103f1565b34801561098657600080fd5b5061041f6109953660046131fe565b611621565b3480156109a657600080fd5b506104366109b5366004613003565b611633565b3480156109c657600080fd5b5061041f6109d5366004613335565b6116c5565b3480156109e657600080fd5b50610436611908565b3480156109fb57600080fd5b506103a6610a0a366004613115565b611915565b348015610a1b57600080fd5b506103f1610a2a36600461339f565b600860209081526000928352604080842090915290825290205481565b348015610a5357600080fd5b5061041f610a62366004613115565b6119cc565b348015610a7357600080fd5b5061041f610a823660046130ad565b611b2d565b348015610a9357600080fd5b5061041f610aa2366004612f4f565b611bf2565b348015610ab357600080fd5b506103a6610ac236600461339f565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610aee57600080fd5b5061041f610afd366004612ea8565b611c06565b348015610b0e57600080fd5b50610b22610b1d366004612ea8565b611c41565b6040516103b291906133c9565b348015610b3b57600080fd5b506108e2610b4a3660046133fa565b611c93565b60006001600160e01b0319821663caf91ff560e01b1480610b8057506001600160e01b031982166301ffc9a760e01b145b92915050565b610b8e611d30565b6010610b9a8282613498565b5050565b60038054610bab9061341c565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd79061341c565b8015610c245780601f10610bf957610100808354040283529160200191610c24565b820191906000526020600020905b815481529060010190602001808311610c0757829003601f168201915b505050505081565b6001600160a01b038316151580610c4b57506001600160a01b03841615155b610c9c5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74207472616e7366657220746f203020616464726573730000000060448201526064015b60405180910390fd5b8060005b81811015610cd357610ccb8686868685818110610cbf57610cbf613558565b905060200201356119cc565b600101610ca0565b505050505050565b6000610ce682611d5d565b15610cfa57610cf58383611b2d565b610d0b565b610d048383611006565b9050610b80565b50600192915050565b6000610d396001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610b805750506001600160a01b03166000908152600d602052604090205460ff1690565b60108054610bab9061341c565b60008082604051602001610d9391815260200190565b60408051601f19818403018152919052805160209091012090506000610dbc620186a083613584565b610dc79060016135ae565b905061c3508111610ddc575060009392505050565b620124f88111610df0575060019392505050565b620163788111610e04575060029392505050565b62017ed08111610e18575060039392505050565b6201863c8111610e2c575060049392505050565b5060059392505050565b6000610e4182611d5d565b15610e5657610e518484846119cc565b610e68565b610e61848484611915565b9050610e6c565b5060015b9392505050565b60007f00000000000000000000000000000000000000000000000000000000000021054614610ea457610d39611d76565b507f235002ae013c489258179b38475b26cae7a087e6054aebea55fcfc7e68d386e590565b6000600160ff1b8211610eef576040516307ed98ed60e31b815260040160405180910390fd5b610b80600160ff1b836135c1565b610f05611d30565b4780610f4c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610c93565b600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114610f99576040519150601f19603f3d011682016040523d82523d6000602084013e610f9e565b606091505b5050905080610b9a5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610c93565b61100183838360405180602001604052806000815250611523565b505050565b60006001600160a01b03831661102f57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b6000818152600b60205260409020546001600160a01b03166110b482611d5d565b6110d1576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b0381166110f85760405163c5723b5160e01b815260040160405180910390fd5b919050565b611105611d30565b61110f6000611e10565b565b6011816006811061112157600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b611147611d30565b60ff8216600510801590611159575060015b61119e5760405162461bcd60e51b815260206004820152601660248201527552617269747920646f6573206e6f742065786973747360501b6044820152606401610c93565b8060118360ff16600681106111b5576111b5613558565b601091828204019190066002026101000a81548161ffff021916908361ffff1602179055505050565b6000600560ff831611806111f0575060005b1561120e5760405163013ebdc960e51b815260040160405180910390fd5b6000611219846114b7565b805190915080156112a4576000805b8281101561129957600061125485838151811061124757611247613558565b6020026020010151610ec9565b9050600061126182610d7d565b6005811115611272576112726130d7565b90508060ff168860ff160361128f578361128b816135d4565b9450505b5050600101611228565b509250610b80915050565b600092505050610b80565b601881600681106112bf57600080fd5b018054909150610bab9061341c565b6112d83382611e60565b50565b60048054610bab9061341c565b6001600160a01b03821661130f5760405163ccea9e6f60e01b815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061138785836111de565b9050828110156113e35760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f756768206f6620746865736520656e657267792073746f6e656044820152607360f81b6064820152608401610c93565b60006113ee866114b7565b90506000805b825181101561147957600083828151811061141157611411613558565b60200260200101519050600061142961053683610ec9565b600581111561143a5761143a6130d7565b90508660ff168160ff160361146f576114548a8a846119cc565b8361145e816135d4565b94505087840361146f575050611479565b50506001016113f4565b5050505050505050565b60006001600160a01b0383166114ac57604051634e46966960e11b815260040160405180910390fd5b610e6c338484611ecf565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561151757602002820191906000526020600020905b815481526020019060010190808311611503575b50505050509050919050565b61152c82611d5d565b611549576040516307ed98ed60e31b815260040160405180910390fd5b611554848484610e36565b506001600160a01b0383163b158015906115ed5750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a029061159d9033908990889088906004016135ed565b6020604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e0919061362a565b6001600160e01b03191614155b1561160b57604051633da6393160e01b815260040160405180910390fd5b50505050565b601281600681106112bf57600080fd5b611629611d30565b610b9a8282611e60565b6060600061164083610ec9565b90506000600f80546116519061341c565b9050111561168c57600f61166482612245565b6040516020016116759291906136ba565b604051602081830303815290604052915050919050565b600061169782610d7d565b60058111156116a8576116a86130d7565b905060006116b682846122d8565b95945050505050565b50919050565b428410156116e6576040516305787bdf60e01b815260040160405180910390fd5b6116ef85611d5d565b1561170d576040516303e7c1bd60e31b815260040160405180910390fd5b6001600160a01b03861661173457604051635461585f60e01b815260040160405180910390fd5b60006001611740610e73565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561184c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615806118815750876001600160a01b0316816001600160a01b031614155b1561189f57604051632057875960e21b815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600f8054610bab9061341c565b60006001600160a01b03841661193e57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03831661196557604051634e46966960e11b815260040160405180910390fd5b6001600160a01b038416600090815260086020908152604080832033845290915290205460001981146119c15761199c83826135c1565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b6116b6858585611ecf565b6001600160a01b0383166119f357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216611a1a57604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b03848116911614611a53576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590611a9057506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b8015611ab357506000818152600960205260409020546001600160a01b03163314155b15611ad0576040516282b42960e81b815260040160405180910390fd5b611ad982610d3e565b15611af757604051635ce7539760e01b815260040160405180910390fd5b611b2283837f0000000000000000000000000000000000000000000000000de0b6b3a7640000612397565b611001838383612453565b6000818152600b60205260409020546001600160a01b0316338114801590611b7957506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15611b96576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611bfa611d30565b600f610b9a8282613498565b611c0e611d30565b6001600160a01b038116611c3857604051631e4fbdf760e01b815260006004820152602401610c93565b6112d881611e10565b611c49612e40565b60005b600560ff8216116116bf576000611c6384836111de565b905080838360ff1660068110611c7b57611c7b613558565b60200201525080611c8b816136df565b915050611c4c565b606060008267ffffffffffffffff811115611cb057611cb0612ec3565b604051908082528060200260200182016040528015611cd9578160200160208202803683370190505b509050835b611ce884866135ae565b811015611d2857611cfa60018261262b565b82611d0587846135c1565b81518110611d1557611d15613558565b6020908102919091010152600101611cde565b509392505050565b6000546001600160a01b0316331461110f5760405163118cdaa760e01b8152336004820152602401610c93565b6000600160ff1b82118015610b80575050600019141590565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051611da891906136fe565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216611e875760405163a41e3d3f60e01b815260040160405180910390fd5b8015611e9b57611e9682612696565b611ea4565b611ea4826126ca565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190611f00868686612397565b6000611f0b87610d3e565b90506000611f1887610d3e565b9050818015611f245750805b612237578115611fcd576000611f5a7f0000000000000000000000000000000000000000000000000de0b6b3a76400008561370a565b6001600160a01b038916600090815260076020526040902054611f9e907f0000000000000000000000000000000000000000000000000de0b6b3a76400009061370a565b611fa891906135c1565b905060005b81811015611fc657611fbe89612758565b600101611fad565b5050612237565b8015612069576001600160a01b038816600090815260076020526040812054612017907f0000000000000000000000000000000000000000000000000de0b6b3a76400009061370a565b6120417f0000000000000000000000000000000000000000000000000de0b6b3a76400008761370a565b61204b91906135c1565b905060005b81811015611fc6576120618a612840565b600101612050565b60006120957f0000000000000000000000000000000000000000000000000de0b6b3a76400008861370a565b905060005b81811015612118576001600160a01b038a166000908152600c60205260408120546120c7906001906135c1565b6001600160a01b038c166000908152600c6020526040812080549293509091839081106120f6576120f6613558565b9060005260206000200154905061210e8c8c83612453565b505060010161209a565b50807f0000000000000000000000000000000000000000000000000de0b6b3a764000061215a8b6001600160a01b031660009081526007602052604090205490565b612164919061370a565b61218e7f0000000000000000000000000000000000000000000000000de0b6b3a76400008861370a565b61219891906135c1565b11156121a7576121a789612840565b806121d27f0000000000000000000000000000000000000000000000000de0b6b3a76400008661370a565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400006122128b6001600160a01b031660009081526007602052604090205490565b61221c919061370a565b61222691906135c1565b11156122355761223588612758565b505b506001979650505050505050565b60606000612252836128c1565b600101905060008167ffffffffffffffff81111561227257612272612ec3565b6040519080825280601f01601f19166020018201604052801561229c576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122a657509392505050565b606060006122e68484612999565b905060006122f2612a62565b905060006122ff86612ae5565b9050600061230c87612b7e565b90508383838360405160200161232392919061371e565b60408051601f1981840301815290829052612341929160200161371e565b60408051601f198184030181529082905261235f929160200161371e565b60408051601f198184030181529082905261237c91602001613744565b60405160208183030381529060405294505050505092915050565b6001600160a01b0383166123c25780600560008282546123b791906135ae565b909155506123f09050565b6001600160a01b038316600090815260076020526040812080548392906123ea9084906135c1565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906124469085815260200190565b60405180910390a3505050565b6001600160a01b0383161561255e57600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546124a2906001906135c1565b815481106124b2576124b2613558565b9060005260206000200154905081811461251f576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c60205260409020805491925083918390811061250757612507613558565b60009182526020909120015561251d8282612cf1565b505b6001600160a01b0384166000908152600c6020526040902080548061254657612546613789565b60019003818190600052602060002001600090559055505b6001600160a01b038216156125d5576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546125d09183916125cb91906135c1565b612cf1565b6125e5565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061264f83546001600160801b03808216600160801b9092048116919091031690565b821061266e5760405163580821e760e01b815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b81811015611001576126c283612840565b6001016126b1565b6001600160a01b03811660009081526007602052604081205461270e907f0000000000000000000000000000000000000000000000000de0b6b3a76400009061370a565b90506000612731836001600160a01b03166000908152600c602052604090205490565b905060005b61274082846135c1565b81101561160b5761275084612758565b600101612736565b6001600160a01b03811661277f57604051634e46966960e11b815260040160405180910390fd5b600061279f600154600160801b81046001600160801b0390811691161490565b6127b4576127ad6001612d5d565b90506127fe565b6006600081546127c3906135d4565b909155506006546001016127ea5760405163303b682f60e01b815260040160405180910390fd5b6006546127fb90600160ff1b6135ae565b90505b6000818152600b60205260409020546001600160a01b031680156128355760405163119b4fd360e11b815260040160405180910390fd5b611001818484612453565b6001600160a01b03811661286757604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c60205260408120805461288d906001906135c1565b8154811061289d5761289d613558565b906000526020600020015490506128b682600083612453565b610b9a600182612dcd565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106129005772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061292c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061294a57662386f26fc10000830492506010015b6305f5e1008310612962576305f5e100830492506008015b612710831061297657612710830492506004015b60648310612988576064830492506002015b600a8310610b805760010192915050565b6060600060188460ff16600681106129b3576129b3613558565b016129bd84612245565b6040516020016129cd919061379f565b60408051601f19818403018152908290526129eb92916020016136ba565b60408051601f1981840301815290829052612a08916020016137ca565b6040516020818303038152906040529050806003604051602001612a2c91906137fd565b60408051601f1981840301815290829052612a4a929160200161371e565b60405160208183030381529060405291505092915050565b6060612aa4612a927f0000000000000000000000000000000000000000000000000000000000000012600a613908565b600554612a9f919061370a565b612245565b604051602001612ab49190613917565b60408051601f1981840301815290829052612ad191602001613967565b604051602081830303815290604052905090565b6060601060188360ff1660068110612aff57612aff613558565b01604051602001612b109190613a0f565b60408051601f1981840301815290829052612b2e92916020016136ba565b60408051601f1981840301815290829052612b4b91602001613a32565b60408051601f1981840301815290829052612b6891602001613a68565b6040516020818303038152906040529050919050565b6060600060188360ff1660068110612b9857612b98613558565b01604051602001612ba99190613a84565b604051602081830303815290604052905060008160128560ff1660068110612bd357612bd3613558565b01604051602001612be49190613ad3565b60408051601f1981840301815290829052612c02929160200161371e565b6040516020818303038152906040529050600081604051602001612c5e907f227d2c207b2274726169745f74797065223a202241746f6d69632056616c756581526b0111610113b30b63ab2911d160a51b6020820152602c0190565b604051602081830303815290604052612ca960118860ff1660068110612c8657612c86613558565b601091828204019190066002029054906101000a900461ffff1661ffff16612245565b604051602001612cba929190613b14565b60408051601f1981840301815290829052612cd8929160200161371e565b60408051601f1981840301815291905295945050505050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115612d2d57604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b8204811691168103612d94576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b9004811690821603612e0957604051638acb5f2760e01b815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581546fffffffffffffffffffffffffffffffff1916179055565b6040518060c001604052806006906020820280368337509192915050565b6001600160e01b0319811681146112d857600080fd5b600060208284031215612e8657600080fd5b8135610e6c81612e5e565b80356001600160a01b03811681146110f857600080fd5b600060208284031215612eba57600080fd5b610e6c82612e91565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612ef457612ef4612ec3565b604051601f8501601f19908116603f01168101908282118183101715612f1c57612f1c612ec3565b81604052809350858152868686011115612f3557600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612f6157600080fd5b813567ffffffffffffffff811115612f7857600080fd5b8201601f81018413612f8957600080fd5b612f9884823560208401612ed9565b949350505050565b60005b83811015612fbb578181015183820152602001612fa3565b50506000910152565b60008151808452612fdc816020860160208601612fa0565b601f01601f19169290920160200192915050565b602081526000610e6c6020830184612fc4565b60006020828403121561301557600080fd5b5035919050565b6000806000806060858703121561303257600080fd5b61303b85612e91565b935061304960208601612e91565b9250604085013567ffffffffffffffff8082111561306657600080fd5b818701915087601f83011261307a57600080fd5b81358181111561308957600080fd5b8860208260051b850101111561309e57600080fd5b95989497505060200194505050565b600080604083850312156130c057600080fd5b6130c983612e91565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b602081016006831061310f57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561312a57600080fd5b61313384612e91565b925061314160208501612e91565b9150604084013590509250925092565b803560ff811681146110f857600080fd5b6000806040838503121561317557600080fd5b61317e83613151565b9150602083013561ffff8116811461319557600080fd5b809150509250929050565b600080604083850312156131b357600080fd5b6131bc83612e91565b91506131ca60208401613151565b90509250929050565b803580151581146110f857600080fd5b6000602082840312156131f557600080fd5b610e6c826131d3565b6000806040838503121561321157600080fd5b61321a83612e91565b91506131ca602084016131d3565b6000806000806080858703121561323e57600080fd5b61324785612e91565b935061325560208601612e91565b92506040850135915061326a60608601613151565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156132ad57835183529284019291840191600101613291565b50909695505050505050565b600080600080608085870312156132cf57600080fd5b6132d885612e91565b93506132e660208601612e91565b925060408501359150606085013567ffffffffffffffff81111561330957600080fd5b8501601f8101871361331a57600080fd5b61332987823560208401612ed9565b91505092959194509250565b600080600080600080600060e0888a03121561335057600080fd5b61335988612e91565b965061336760208901612e91565b9550604088013594506060880135935061338360808901613151565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156133b257600080fd5b6133bb83612e91565b91506131ca60208401612e91565b60c08101818360005b60068110156133f15781518352602092830192909101906001016133d2565b50505092915050565b6000806040838503121561340d57600080fd5b50508035926020909101359150565b600181811c9082168061343057607f821691505b6020821081036116bf57634e487b7160e01b600052602260045260246000fd5b601f821115611001576000816000526020600020601f850160051c810160208610156134795750805b601f850160051c820191505b81811015610cd357828155600101613485565b815167ffffffffffffffff8111156134b2576134b2612ec3565b6134c6816134c0845461341c565b84613450565b602080601f8311600181146134fb57600084156134e35750858301515b600019600386901b1c1916600185901b178555610cd3565b600085815260208120601f198616915b8281101561352a5788860151825594840194600190910190840161350b565b50858210156135485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826135935761359361356e565b500690565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b8057610b80613598565b81810381811115610b8057610b80613598565b6000600182016135e6576135e6613598565b5060010190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061362090830184612fc4565b9695505050505050565b60006020828403121561363c57600080fd5b8151610e6c81612e5e565b600081546136548161341c565b6001828116801561366c5760018114613681576136b0565b60ff19841687528215158302870194506136b0565b8560005260208060002060005b858110156136a75781548a82015290840190820161368e565b50505082870194505b5050505092915050565b60006136c68285613647565b83516136d6818360208801612fa0565b01949350505050565b600060ff821660ff81036136f5576136f5613598565b60010192915050565b6000610e6c8284613647565b6000826137195761371961356e565b500490565b60008351613730818460208801612fa0565b8351908301906136d6818360208801612fa0565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081526000825161377c81601b850160208701612fa0565b91909101601b0192915050565b634e487b7160e01b600052603160045260246000fd5b6201016960ed1b8152600082516137bd816003850160208701612fa0565b9190910160030192915050565b693d913730b6b2911d101160b11b815281516000906137f081600a850160208701612fa0565b91909101600a0192915050565b711116101131b932b0ba32b22fb13c911d101160711b81526000610e6c6012830184613647565b600181815b8085111561385f57816000190482111561384557613845613598565b8085161561385257918102915b93841c9390800290613829565b509250929050565b60008261387657506001610b80565b8161388357506000610b80565b816001811461389957600281146138a3576138bf565b6001915050610b80565b60ff8411156138b4576138b4613598565b50506001821b610b80565b5060208310610133831016604e8410600b84101617156138e2575081810a610b80565b6138ec8383613824565b806000190482111561390057613900613598565b029392505050565b6000610e6c60ff841683613867565b7f222c226465736372697074696f6e223a20224120636f6c6c656374696f6e206f815261033160f51b60208201526000825161395a816022850160208701612fa0565b9190910160220192915050565b60008251613979818460208701612fa0565b7f206469676974616c20636f6c6c65637469626c6520656e61626c6564206279209201918252507f4552433430342c20616e206578706572696d656e74616c20746f6b656e20737460208201527f616e646172642e222c202265787465726e616c5f75726c223a202268747470736040820152713a2f2f76657861657465726e612e636f6d2f60701b6060820152607201919050565b6000613a1b8284613647565b660173837339116160cd1b81526007019392505050565b6c1116101134b6b0b3b2911d101160991b81528151600090613a5b81600d850160208701612fa0565b91909101600d0192915050565b60008251613a7a818460208701612fa0565b9190910192915050565b7f2261747472696275746573223a205b7b2274726169745f74797065223a20224d81527330ba32b934b0b6111610113b30b63ab2911d101160611b60208201526000610e6c6034830184613647565b7f227d2c207b2274726169745f74797065223a2022436f6c6f72222c202276616c8152653ab2911d101160d11b60208201526000610e6c6026830184613647565b60008351613b26818460208801612fa0565b835190830190613b3a818360208801612fa0565b627d5d7d60e81b910190815260030194935050505056fea264697066735822122080dade468ce1721eb421e7c3fc94f196fc4cac7dbdf447d4252bf3573c054b6e64736f6c63430008180033

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

00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000186a00000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed74318220000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed74318220000000000000000000000002626664c2603336e57b271c5c0b26f421741e48100000000000000000000000003a520b32c04bf3beef7beb72e919cf822ed34f1000000000000000000000000000000000000000000000000000000000000000b5665782041657465726e6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035645580000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Vex Aeterna
Arg [1] : symbol_ (string): VEX
Arg [2] : decimals_ (uint8): 18
Arg [3] : maxTotalSupplyERC721_ (uint256): 100000
Arg [4] : initialOwner_ (address): 0x2e6243a4cDB82B77DC4530A9942bA5EEd7431822
Arg [5] : initialMintRecipient_ (address): 0x2e6243a4cDB82B77DC4530A9942bA5EEd7431822
Arg [6] : uniswapSwapRouter_ (address): 0x2626664c2603336E57B271c5C0b26F421741e481
Arg [7] : uniswapV3NonfungiblePositionManager_ (address): 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 00000000000000000000000000000000000000000000000000000000000186a0
Arg [4] : 0000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed7431822
Arg [5] : 0000000000000000000000002e6243a4cdb82b77dc4530a9942ba5eed7431822
Arg [6] : 0000000000000000000000002626664c2603336e57b271c5c0b26f421741e481
Arg [7] : 00000000000000000000000003a520b32c04bf3beef7beb72e919cf822ed34f1
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [9] : 5665782041657465726e61000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [11] : 5645580000000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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