ETH Price: $3,517.74 (+0.49%)
Gas: 4 Gwei

Token

LVCIDIA// DEED (DEED)
 

Overview

Max Total Supply

0 DEED

Holders

152

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 DEED
0xe8d842d44703de1b1e8e0dd4c7156e45efb55ed6
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Deed

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 2 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 3 of 18 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 4 of 18 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

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

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

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

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

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

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

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

File 6 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 7 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 8 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 9 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 10 of 18 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 11 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 13 of 18 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 15 of 18 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 16 of 18 : Deed.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz + @quentinmerabet

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "../resources/IResources.sol";
import "./IDeed.sol";

contract Deed is ERC721, IDeed, IERC1155Receiver, Ownable, ReentrancyGuard {
    using Strings for uint256;
    using EnumerableSet for EnumerableSet.UintSet;

    uint256 private constant MAX_UINT64 = 0xFFFFFFFFFFFFFFFF;
    // Resources contract address
    address public immutable RESOURCES_ADDRESS;

    // Token id counter
    uint256 private _currentTokenId;
    // Mint trigger
    bool private _mintEnabled;

    // Metadata
    string private _metadataDescription = "Loading...";
    string private _metadataImageBaseURI = "https://deed.lvcidia.xyz/viewer/";

    // Resource id to contribution state
    mapping(uint256 => ContributionState) private _contribution;
    // User to resource id to contribution count
    mapping(address => mapping(uint256 => uint256))
        private _userContributionCount;
    // Deed token id to resource id to contribution count
    mapping(uint256 => mapping(uint256 => uint256))
        private _deedContributionCount;

    // Set of resource id's
    EnumerableSet.UintSet private _resources;

    // Royalty configuration
    uint256 private _royaltyBps;
    address payable private _royaltyRecipient;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;

    constructor(address resourcesAddress) ERC721("LVCIDIA// DEED", "DEED") {
        RESOURCES_ADDRESS = resourcesAddress;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721, IERC165) returns (bool) {
        return
            ERC721.supportsInterface(interfaceId) ||
            interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE ||
            interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981 ||
            interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE;
    }

    /**
     * @dev See {IDeed-updateContribution}.
     */
    function updateContribution(
        uint256[] calldata resourceIds,
        Contribution[] calldata resourceContributions
    ) external override onlyOwner {
        require(
            resourceIds.length == resourceContributions.length,
            "Invalid input"
        );
        for (uint i = 0; i < resourceIds.length; ) {
            Contribution memory contribution = resourceContributions[i];
            _contribution[resourceIds[i]] = ContributionState({
                name: contribution.name,
                perUnit: contribution.perUnit,
                maxUnits: contribution.maxUnits,
                totalUnits: _contribution[resourceIds[i]].totalUnits
            });
            if (contribution.maxUnits == 0) {
                _resources.remove(resourceIds[i]);
            } else {
                _resources.add(resourceIds[i]);
            }
            unchecked {
                i++;
            }
        }
    }

    /**
     * @dev See {IDeed-getContributionState}
     */
    function getContributionState(
        uint256 resourceId
    ) external view override returns (ContributionState memory) {
        return _contribution[resourceId];
    }

    /**
     * @dev See {IDeed-getUserContributions}
     */
    function getUserContributions(
        address user
    )
        public
        view
        override
        returns (
            ContributionInfo[] memory contributions,
            uint256 totalContributions
        )
    {
        contributions = new ContributionInfo[](_resources.length());
        for (uint i; i < _resources.length(); ) {
            uint256 resourceId = _resources.at(i);
            ContributionState memory contribution = _contribution[resourceId];
            uint256 units = _userContributionCount[user][resourceId];
            contributions[i] = ContributionInfo({
                resourceId: resourceId,
                resourceName: contribution.name,
                units: units,
                perUnit: contribution.perUnit
            });
            totalContributions += units;
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev See {IDeed-getDeedContributions}
     */
    function getDeedContributions(
        uint256 tokenId
    )
        public
        view
        override
        returns (
            ContributionInfo[] memory contributions,
            uint256 totalContributions
        )
    {
        contributions = new ContributionInfo[](_resources.length());
        for (uint i; i < _resources.length(); ) {
            uint256 resourceId = _resources.at(i);
            contributions[i] = ContributionInfo({
                resourceId: resourceId,
                resourceName: _contribution[resourceId].name,
                units: _deedContributionCount[tokenId][resourceId],
                perUnit: _contribution[resourceId].perUnit
            });
            totalContributions += _deedContributionCount[tokenId][resourceId];
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev See {IDeed-setMintEnabled}.
     */
    function setMintEnabled(bool enabled) external override onlyOwner {
        require(enabled != _mintEnabled, "should be a different value");
        _mintEnabled = enabled;
    }

    /**
     * @dev See {IDeed-mint}.
     */
    function mint() external override {
        if (!_mintEnabled) revert("Mint not open yet");
        uint256 tokenId = ++_currentTokenId;
        bool hasContributed = false;
        for (uint i = 0; i < _resources.length(); ) {
            uint256 resourceId = _resources.at(i);
            uint256 userContribution = _userContributionCount[msg.sender][
                resourceId
            ];
            _deedContributionCount[tokenId][resourceId] = userContribution;
            _userContributionCount[msg.sender][resourceId] = 0;
            if (
                _deedContributionCount[tokenId][resourceId] > 0 &&
                !hasContributed
            ) {
                hasContributed = true;
            }
            unchecked {
                i++;
            }
        }
        require(hasContributed, "No contributions yet");
        _mint(msg.sender, tokenId);
    }

    /**
     * @dev See {IDeed-merge}.
     */
    function merge(uint256[] calldata tokenIds) external override nonReentrant {
        uint256 newToken = ++_currentTokenId;
        uint256 resourcesLength = _resources.length();
        uint256 tokensLength = tokenIds.length;
        require(
            tokenIds.length > 1,
            "At least two tokens are required for merging"
        );
        for (uint i = 0; i < tokensLength; ) {
            uint256 tokenId = tokenIds[i];
            require(_exists(tokenId), "Nonexistent or duplicated token");
            require(ownerOf(tokenId) == msg.sender, "Not owner");

            for (uint j = 0; j < resourcesLength; ) {
                uint256 resourceId = _resources.at(j);
                uint256 contribution = _deedContributionCount[tokenId][
                    resourceId
                ];
                if (contribution > 0) {
                    delete _deedContributionCount[tokenId][resourceId];
                }
                _deedContributionCount[newToken][resourceId] += contribution;
                unchecked {
                    j++;
                }
            }
            _burn(tokenId);
            unchecked {
                i++;
            }
        }
        _mint(msg.sender, newToken);
    }

    /**
     * @dev See {IDeed-split}.
     */
    function split(
        uint256 tokenA,
        uint256[] calldata tokenBUnits
    ) external override nonReentrant {
        require(_exists(tokenA), "Nonexistent token");
        require(ownerOf(tokenA) == msg.sender, "Not owner");
        uint256 resourcesLength = _resources.length();
        require(
            tokenBUnits.length == resourcesLength,
            "Invalid ressources info"
        );
        uint256 tokenB = ++_currentTokenId;
        uint256 tokenC = ++_currentTokenId;
        bool hasContributionsB;
        bool hasContributionsC;
        for (uint i = 0; i < resourcesLength; ) {
            uint256 resourceId = _resources.at(i);
            uint256 contributionA = _deedContributionCount[tokenA][resourceId];
            uint256 contributionB = tokenBUnits[i];
            require(
                contributionA >= contributionB,
                "Not enough resources to split"
            );
            uint256 contributionC = contributionA - tokenBUnits[i];
            if (contributionA > 0) {
                delete _deedContributionCount[tokenA][resourceId];
            }
            _deedContributionCount[tokenB][resourceId] = contributionB;
            _deedContributionCount[tokenC][resourceId] = contributionC;
            if (contributionB > 0) hasContributionsB = true;
            if (contributionC > 0) hasContributionsC = true;
            unchecked {
                i++;
            }
        }

        require(
            hasContributionsB && hasContributionsC,
            "A new deed must have contributions"
        );
        _burn(tokenA);
        _mint(msg.sender, tokenB);
        _mint(msg.sender, tokenC);
    }

    function onERC1155Received(
        address,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata
    ) external override returns (bytes4) {
        require(!_mintEnabled, "Cannot contribute anymore");
        ContributionState storage contribution = _contribution[id];
        require(
            msg.sender == RESOURCES_ADDRESS && contribution.maxUnits > 0,
            "Invalid resource"
        );
        uint256 unitsAvailable = contribution.maxUnits -
            contribution.totalUnits;
        require(unitsAvailable > 0, "Contribution limit reached");
        require(value % contribution.perUnit == 0, "Invalid amount");
        uint256 unitsRequested = value / contribution.perUnit;
        uint256 units;
        if (unitsRequested > unitsAvailable) {
            units = unitsAvailable;
        } else {
            units = unitsRequested;
        }
        require(units > 0 && units <= MAX_UINT64, "Invalid units");
        _userContributionCount[from][id] += units;
        emit Contribute(id, from, uint64(units));
        contribution.totalUnits += uint64(units);

        uint256[] memory resourceIds = new uint256[](1);
        resourceIds[0] = id;
        uint256[] memory amounts = new uint256[](1);
        amounts[0] = units * contribution.perUnit;
        IResources(RESOURCES_ADDRESS).burn(address(this), resourceIds, amounts);
        if (units != unitsRequested) {
            IResources(RESOURCES_ADDRESS).safeTransferFrom(
                address(this),
                from,
                id,
                (unitsRequested - units) * contribution.perUnit,
                ""
            );
        }
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata
    ) external override returns (bytes4) {
        require(!_mintEnabled, "Cannot contribute anymore");
        uint256 resourceLength = ids.length;
        require(
            msg.sender == RESOURCES_ADDRESS && resourceLength == values.length,
            "Invalid resource"
        );
        bool hasContribution = false;
        bool hasExcess = false;
        uint256[] memory refundAmounts = new uint256[](resourceLength);
        uint256[] memory burnAmounts = new uint256[](resourceLength);
        for (uint i = 0; i < resourceLength; i++) {
            ContributionState storage contribution = _contribution[ids[i]];
            uint256 unitsAvailable = contribution.maxUnits -
                contribution.totalUnits;
            if (unitsAvailable == 0 || values[i] % contribution.perUnit != 0) {
                hasExcess = true;
                refundAmounts[i] = values[i];
                continue;
            }
            uint256 unitsRequested = values[i] / contribution.perUnit;
            uint256 units;
            if (unitsRequested > unitsAvailable) {
                units = unitsAvailable;
            } else {
                units = unitsRequested;
            }
            require(units <= MAX_UINT64, "Invalid amount");
            _userContributionCount[from][ids[i]] += units;
            emit Contribute(ids[i], from, uint64(units));
            contribution.totalUnits += uint64(units);
            burnAmounts[i] = units * contribution.perUnit;
            hasContribution = true;
            if (units != unitsRequested) {
                hasExcess = true;
                refundAmounts[i] =
                    (unitsRequested - units) *
                    contribution.perUnit;
            }
        }
        IResources(RESOURCES_ADDRESS).burn(address(this), ids, burnAmounts);
        if (hasExcess) {
            IResources(RESOURCES_ADDRESS).safeBatchTransferFrom(
                address(this),
                from,
                ids,
                refundAmounts,
                ""
            );
        }
        return this.onERC1155BatchReceived.selector;
    }

    /**
     * @dev See {IDeed-setMetadata}.
     */
    function setMetadata(
        string calldata description,
        string calldata imageBaseURI
    ) external override onlyOwner {
        if (bytes(description).length > 0) _metadataDescription = description;
        if (bytes(imageBaseURI).length > 0)
            _metadataImageBaseURI = imageBaseURI;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );
        (
            ContributionInfo[] memory contributions,
            uint256 totalContributions
        ) = getDeedContributions(tokenId);

        string memory traits;
        // Ownership
        traits = string(
            abi.encodePacked(
                traits,
                '{"trait_type":"Planet Ownership","value":"',
                _unitToPercentage(totalContributions),
                '%"},'
            )
        );
        // Material
        traits = string(
            abi.encodePacked(
                traits,
                '{"trait_type":"Background Material","value":"',
                _getDeedMaterial(totalContributions, false),
                '"}'
            )
        );
        // Ressources yes/no
        for (uint i = 0; i < _resources.length(); ) {
            string memory activated;
            contributions[i].units > 0 ? activated = "YES" : activated = "NO";
            traits = string(
                abi.encodePacked(
                    traits,
                    ',{"trait_type":"',
                    contributions[i].resourceName,
                    '","value":"',
                    activated,
                    '"}'
                )
            );
            unchecked {
                i++;
            }
        }
        // Ressources levels
        for (uint i = 0; i < _resources.length(); ) {
            traits = string(
                abi.encodePacked(
                    traits,
                    ',{"trait_type":"',
                    contributions[i].resourceName,
                    '","value":',
                    (contributions[i].units * contributions[i].perUnit)
                        .toString(),
                    "}"
                )
            );
            unchecked {
                i++;
            }
        }

        return
            string(
                abi.encodePacked(
                    "data:application/json;utf8,",
                    '{"name":"',
                    _getDeedMaterial(totalContributions, true),
                    " DEED// #",
                    tokenId.toString(),
                    '","created_by":"LVCIDIA","description":"',
                    _metadataDescription,
                    '","image":"',
                    _metadataImageBaseURI,
                    tokenId.toString(),
                    '.png","attributes":[',
                    traits,
                    "]}"
                )
            );
    }

    /**
     * @dev Helper to convert deed unit to a string percentage
     */
    function _unitToPercentage(
        uint256 unit
    ) private pure returns (string memory) {
        string memory result = Strings.toString(unit / 1000);
        string memory decimal = Strings.toString(unit % 1000);
        while (bytes(decimal).length < 3) {
            decimal = string(abi.encodePacked("0", decimal));
        }
        result = string(abi.encodePacked(result, ".", decimal));
        return result;
    }

    /**
     * @dev Returns the material of the deed based on the total contributions
     */
    function _getDeedMaterial(
        uint256 totalContributions,
        bool caps
    ) private pure returns (string memory) {
        if (totalContributions < 10) {
            if (caps) {
                return "BLACK";
            } else {
                return "Black";
            }
        } else if (totalContributions < 50) {
            if (caps) {
                return "MARBLE";
            } else {
                return "Marble";
            }
        } else if (totalContributions < 200) {
            if (caps) {
                return "CHROME";
            } else {
                return "Chrome";
            }
        } else if (totalContributions < 1000) {
            if (caps) {
                return "JADE";
            } else {
                return "Jade";
            }
        } else {
            if (caps) {
                return "GOLD";
            } else {
                return "Gold";
            }
        }
    }

    /**
     * @dev Update royalties
     */
    function updateRoyalties(
        address payable recipient,
        uint256 bps
    ) external onlyOwner {
        _royaltyRecipient = recipient;
        _royaltyBps = bps;
    }

    /**
     * ROYALTY FUNCTIONS
     */
    function getRoyalties(
        uint256
    )
        external
        view
        returns (address payable[] memory recipients, uint256[] memory bps)
    {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return (recipients, bps);
    }

    function getFeeRecipients(
        uint256
    ) external view returns (address payable[] memory recipients) {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
        }
        return recipients;
    }

    function getFeeBps(uint256) external view returns (uint[] memory bps) {
        if (_royaltyRecipient != address(0x0)) {
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return bps;
    }

    function royaltyInfo(
        uint256,
        uint256 value
    ) external view returns (address, uint256) {
        return (_royaltyRecipient, (value * _royaltyBps) / 10000);
    }
}

File 17 of 18 : IDeed.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz + @quentinmerabet

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface IDeed is IERC165 {
    event Contribute(
        uint256 indexed resourceId,
        address indexed contributor,
        uint64 units
    );

    struct Contribution {
        string name;
        uint64 perUnit;
        uint64 maxUnits;
    }

    struct ContributionState {
        string name;
        uint64 perUnit;
        uint64 maxUnits;
        uint64 totalUnits;
    }

    struct UserContribution {
        uint256 resourceId;
        uint256 units;
    }

    struct DeedContribution {
        uint256 resourceId;
        uint256 units;
    }

    struct ContributionInfo {
        uint256 resourceId;
        string resourceName;
        uint256 units;
        uint64 perUnit;
    }

    /**
     * Update/set contribution configuration
     */
    function updateContribution(
        uint256[] calldata resourceIds,
        Contribution[] calldata resourceContributions
    ) external;

    /**
     * Getter for contribution state of a resource
     */
    function getContributionState(
        uint256 resourceId
    ) external returns (ContributionState memory);

    /**
     * Get a user's contributions
     */
    function getUserContributions(
        address user
    )
        external
        returns (
            ContributionInfo[] memory contributions,
            uint256 totalContributions
        );

    /**
     * Get a deed's contributions
     */
    function getDeedContributions(
        uint256 tokenId
    )
        external
        returns (
            ContributionInfo[] memory contributions,
            uint256 totalContributions
        );

    /**
     * Open/Close the minting phase
     */
    function setMintEnabled(bool enabled) external;

    /**
     * Mint a deed
     */
    function mint() external;

    /**
     * Split a deed (A) into two new deeds (B and C)
     */
    function split(uint256 tokenA, uint256[] calldata tokenBUnits) external;

    /**
     * Merge a list of deeds.
     */
    function merge(uint256[] calldata tokenIds) external;

    /**
     * Set metadata
     */
    function setMetadata(
        string calldata description,
        string calldata imageBaseURI
    ) external;
}

File 18 of 18 : IResources.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

interface IResources is IERC1155 {

    /**
     * @dev Mint tokens
     */
    function mint(address to, uint256[] memory tokenIds, uint256[] memory amounts) external;

    /**
     * @dev Set the tokenURI of a token.
     */
    function setTokenURI(uint256 tokenId, string calldata uri_) external;

    /**
     * @dev set the tokenURI of multiple tokens.
     */
    function setTokenURIs(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev burn tokens. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(address account, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev Total amount of tokens of resource with a given id.
     */
    function totalSupply(uint256 tokenId) external view returns (uint256);

    /**
     * @dev Total amount of burned tokens of resource with a given id.
     */
    function burnedSupply(uint256 tokenId) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"resourcesAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","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":"uint256","name":"resourceId","type":"uint256"},{"indexed":true,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint64","name":"units","type":"uint64"}],"name":"Contribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"RESOURCES_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"resourceId","type":"uint256"}],"name":"getContributionState","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint64","name":"perUnit","type":"uint64"},{"internalType":"uint64","name":"maxUnits","type":"uint64"},{"internalType":"uint64","name":"totalUnits","type":"uint64"}],"internalType":"struct IDeed.ContributionState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDeedContributions","outputs":[{"components":[{"internalType":"uint256","name":"resourceId","type":"uint256"},{"internalType":"string","name":"resourceName","type":"string"},{"internalType":"uint256","name":"units","type":"uint256"},{"internalType":"uint64","name":"perUnit","type":"uint64"}],"internalType":"struct IDeed.ContributionInfo[]","name":"contributions","type":"tuple[]"},{"internalType":"uint256","name":"totalContributions","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserContributions","outputs":[{"components":[{"internalType":"uint256","name":"resourceId","type":"uint256"},{"internalType":"string","name":"resourceName","type":"string"},{"internalType":"uint256","name":"units","type":"uint256"},{"internalType":"uint64","name":"perUnit","type":"uint64"}],"internalType":"struct IDeed.ContributionInfo[]","name":"contributions","type":"tuple[]"},{"internalType":"uint256","name":"totalContributions","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"merge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"tokenId","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":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageBaseURI","type":"string"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenA","type":"uint256"},{"internalType":"uint256[]","name":"tokenBUnits","type":"uint256[]"}],"name":"split","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":"tokenId","type":"uint256"}],"name":"tokenURI","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":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"resourceIds","type":"uint256[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint64","name":"perUnit","type":"uint64"},{"internalType":"uint64","name":"maxUnits","type":"uint64"}],"internalType":"struct IDeed.Contribution[]","name":"resourceContributions","type":"tuple[]"}],"name":"updateContribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a034620003df576001600160401b0390601f90601f1962004795388190038481018316840186811185821017620003c957849282916040528339602093849181010312620003df5751926001600160a01b03918285168503620003df5762000067620003e4565b92600e84526d131590d25112504bcbc81111515160921b858501526200008c620003e4565b9660048852631111515160e21b868901528451818111620003c95780600096620000b7885462000404565b87811162000399575b5088908783116001146200033557889262000329575b50508160011b916000199060031b1c19161785555b8751908111620003155760019262000104845462000404565b858111620002da575b508690858311600114620002685750819060008051602062004775833981519152989987926200025c575b5050600019600383901b1c191690831b1782555b60068054336001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08580a38060075562000199600a5462000404565b8281116200023b575b507f4c6f6164696e672e2e2e00000000000000000000000000000000000000000014600a55600b54620001d59062000404565b9082821162000217575b5050506041600b55600b8152205560805260405161431a90816200045b82396080518181816103740152818161140b01526114c60152f35b6200023292600b8552858520920160051c8201910162000441565b388080620001df565b600a84528484206200025591840160051c81019062000441565b38620001a2565b01519050388062000138565b82169884875287872099875b818110620002c457509160008051602062004775833981519152999a918487959410620002aa575b505050811b0182556200014c565b015160001960f88460031b161c191690553880806200029c565b838301518c559a86019a92890192890162000274565b62000304908588528888208780860160051c8201928b87106200030b575b0160051c019062000441565b386200010d565b92508192620002f8565b634e487b7160e01b85526041600452602485fd5b015190503880620000d6565b888052898920928716895b8b8282106200038257505090846001959493921062000368575b505050811b018555620000eb565b015160001960f88460031b161c191690553880806200035a565b600185968293968601518155019501930162000340565b620003c2908980528a8a208980860160051c8201928d87106200030b570160051c019062000441565b38620000c0565b634e487b7160e01b600052604160045260246000fd5b600080fd5b60408051919082016001600160401b03811183821017620003c957604052565b90600182811c9216801562000436575b60208310146200042057565b634e487b7160e01b600052602260045260246000fd5b91607f169162000414565b8181106200044d575050565b600081556001016200044156fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612c305750806306fdde0314612b8c578063081812fc14612b6d578063095ea7b3146129de5780630ebd4c7f146129715780631249c58b1461281457806323b872dd146127ea5780632a55205a146127ac5780633d3ce307146123b357806342842e0e1461237557806351335b50146120615780636352211e1461203157806369c6724714611d465780636c2f5acd14611cfe57806370a0823114611c55578063715018a614611bfa57806376f5c79414611bcd5780638da5cb5b14611ba657806395d89b4114611ac3578063a22cb465146119f4578063b88d4fde1461198c578063b9c4d9fb14611924578063bb3bafd61461187c578063bc197c811461142f578063c7aef020146113eb578063c87b56dd14610b25578063cc98199514610a66578063de62d84214610860578063e36465a314610744578063e985e9c5146106ef578063f23a6e61146102f7578063f2fde38b1461021d5763f46a04eb1461018c57600080fd5b3461021a57602036600319011261021a57600435801515809103610215576101b261307e565b6009549060ff8216151581146101d15760ff169060ff19161760095580f35b606460405162461bcd60e51b815260206004820152601b60248201527f73686f756c64206265206120646966666572656e742076616c756500000000006044820152fd5b600080fd5b80fd5b503461021a57602036600319011261021a57610237612ddc565b61023f61307e565b6001600160a01b0380911690811561028d57600654826001600160a01b0319821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461021a576003199060a03683011261021a57610313612ddc565b5061031c612df2565b604435606435936084359267ffffffffffffffff938481116106eb57610346903690600401612ea2565b505061035760ff6009541615613d24565b828552602095600c875260408620946001600160a01b03916001837f00000000000000000000000000000000000000000000000000000000000000001697883314806106da575b6103a790613d6f565b0192835491836103c1818560801c16828660401c16613dba565b169283156106965790846103e99216906103e46103de8383613dd4565b15613df4565b613e3f565b918083111561068e57945b85151580610684575b15610640571694858952600d8a5260408920878a528a52604089206104238682546139c7565b905561048e6104668b888a7f33ecc73207a8aa1ed1b91331f77206d8fc02bed6fdcf9ccda99f3f58dcae75a1888b1693604051858152a385875460801c16613e49565b855467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178555565b60405161049a81612fb0565b600181528a3681830137876104ae826139a6565b52604051916104bc83612fb0565b600183528b36818501376104d38587541688613e97565b6104dc846139a6565b52893b1561063c578a91610525610516926040519586948594633db0f8ab60e01b8652306004870152606060248701526064860190612e08565b91848303016044850152612e08565b0381838c5af1801561063157908991610619575b505080840361056c575b886040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b6105829361057991613814565b91541690613e97565b92803b15610615578492918360c49260405196879586947ff242432a00000000000000000000000000000000000000000000000000000000865230600487015260248601526044850152606484015260a060848401528160a48401525af1801561060a576105f6575b808080808080610543565b6106008291612f9c565b61021a57806105eb565b6040513d84823e3d90fd5b8480fd5b61062290612f9c565b61062d578738610539565b8780fd5b6040513d8b823e3d90fd5b8a80fd5b60648b6040519062461bcd60e51b82526004820152600d60248201527f496e76616c696420756e697473000000000000000000000000000000000000006044820152fd5b50838611156103fd565b5081946103f4565b60648c6040519062461bcd60e51b82526004820152601a60248201527f436f6e747269627574696f6e206c696d697420726561636865640000000000006044820152fd5b508082015460401c8416151561039e565b8580fd5b503461021a57604036600319011261021a57610709612ddc565b6040610713612df2565b926001600160a01b0380931681526005602052209116600052602052602060ff604060002054166040519015158152f35b503461021a5760208060031936011261085c5761075f612ddc565b82600f5461076c81613939565b936001600160a01b03839416905b8285106107945760405180610790898983612ed0565b0390f35b90919293956108516107a58861376d565b90549060031b1c808752600c84526040872092604051916107c583612f6a565b6107ce85613180565b83526001809501548684019067ffffffffffffffff8082168352808260401c1660408701528060609260801c1682870152898c52600d895260408c20848d52895260408c20549551925116916040519361082785612f6a565b8452888401528460408401528201526108408b8b6139b3565b5261084b8a8a6139b3565b506139c7565b96019392919061077a565b5080fd5b503461021a5760208060031936011261085c5760043567ffffffffffffffff8111610a6257610893903690600401612e71565b919061089d613c46565b6108a8600854613aab565b9182600855600f54600194858111156109f857865b8181106108d65787876108d08833613b05565b60075580f35b6108e1818387613747565b356109028160005260026020526001600160a01b0360406000205416151590565b156109b457908791610926336001600160a01b0361091f84613121565b1614613bfb565b895b85811061093f575061093990613c9b565b016108bd565b8a61094d829593949561376d565b90549060031b1c848252600e808a52604083208284528a528b60408420549384610999575b52895260408d20908d52885261098d60408d209182546139c7565b90550190889291610928565b878152828c52604081208482528c5260006040822055610972565b6064856040519062461bcd60e51b82526004820152601f60248201527f4e6f6e6578697374656e74206f72206475706c69636174656420746f6b656e006044820152fd5b6084836040519062461bcd60e51b82526004820152602c60248201527f4174206c656173742074776f20746f6b656e732061726520726571756972656460448201527f20666f72206d657267696e6700000000000000000000000000000000000000006064820152fd5b8280fd5b503461021a5760208060031936011261085c5760408260809360608351610a8c81612f6a565b8181528286820152828582015201526004358152600c83522090600160405192610ab584612f6a565b610abe81613180565b84520154908083019167ffffffffffffffff8092818316855281610b0b6040880192828660401c1684528260608a01968b1c168652604051998a99828b5251918a015260a0890190612db7565b955116604087015251166060850152511660808301520390f35b503461021a5760208060031936011261085c57600435610b5b8160005260026020526001600160a01b0360406000205416151590565b1561138157610b69816139d4565b93906103e894610b85610b7d878304613ee7565b968206613ee7565b600381511015610be557610be0604051917f300000000000000000000000000000000000000000000000000000000000000088840152828151610bd0816021948c8686019101612d94565b8101036001810184520182612fcc565b610b85565b91908594959187604051809585610c058184019485815193849201612d94565b82017f2e0000000000000000000000000000000000000000000000000000000000000087820152610c3f8251809389602185019101612d94565b010394610c56602160019788810184520182612fcc565b60405191606091825160005b81811061136e5750610d0692604e92610cd187938401917f7b2274726169745f74797065223a22506c616e6574204f776e657273686970228c8401527f2c2276616c7565223a22000000000000000000000000000000000000000000006040840152518093604a840190612d94565b017f25227d2c00000000000000000000000000000000000000000000000000000000604a82015203602e810185520183612fcc565b610d0f8461405c565b60405192610d2581518092898088019101612d94565b83017f7b2274726169745f74797065223a224261636b67726f756e64204d6174657269878201527f616c222c2276616c7565223a22000000000000000000000000000000000000006040820152610d858251809389604d85019101612d94565b0191610dc3604f827f227d0000000000000000000000000000000000000000000000000000000000009586604d82015203602f810184520182612fcc565b9680600f54935b848210611217575050925b8284106110f05750505050610de9906141a0565b91610dfc610df687613ee7565b96613ee7565b6040519687947f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000858701527f7b226e616d65223a220000000000000000000000000000000000000000000000603b870152610e60815180928760448a019101612d94565b85017f20444545442f2f202300000000000000000000000000000000000000000000006044820152610e9b8251809387604d85019101612d94565b017f222c22637265617465645f6279223a224c564349444941222c22646573637269604d8201527f7074696f6e223a22000000000000000000000000000000000000000000000000606d820152600090600a5490610ef882613146565b918581169081156110d25750600114611078575b50507f222c22696d616765223a220000000000000000000000000000000000000000008152600092600b91825491610f4383613146565b928181169081156110565750600114610ff3575b8787610fdf6016838d848c610f728d82815194859201612d94565b017f2e706e67222c2261747472696275746573223a5b0000000000000000000000008152610fa98251809388601485019101612d94565b017f5d7d000000000000000000000000000000000000000000000000000000000000601482015203600919810185520183612fcc565b610790604051928284938452830190612db7565b909192809495506000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906000915b84831061103e5750505001019080610f72610fdf6016610f57565b80548484018701528b98508a97909201918101611023565b60ff19168386015250508115159091020101915080610f72610fdf6016610f57565b909150600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a86000905b8382106110b9575050016075018880610f0c565b8054607584840101528a975089969091019085016110a5565b90506075935060ff9291921916838301528015150201018880610f0c565b919394611209603b8599837f7d00000000000000000000000000000000000000000000000000000000000000886111886111838a8f9a9c8d6111797f222c2276616c7565223a000000000000000000000000000000000000000000009c61116067ffffffffffffffff94866139b3565b51015196604061117082876139b3565b510151946139b3565b5101511690613e97565b613ee7565b9060405197856111a18a9751809288808b019101612d94565b86017f2c7b2274726169745f74797065223a2200000000000000000000000000000000868201528251906111dd82603095898785019101612d94565b01918201526111f682518093603a968785019101612d94565b019182015203601b810184520182612fcc565b960192909187949392610dd5565b919294939596611321603d839b7f222c2276616c7565223a2200000000000000000000000000000000000000000093868d966040611255828d6139b3565b5101511561132f578261129e60405161126d81612fb0565b600381527f594553000000000000000000000000000000000000000000000000000000000083820152925b8d6139b3565b51015160405197856112b98a9751809288808b019101612d94565b86017f2c7b2274726169745f74797065223a2200000000000000000000000000000000868201528251906112f582603095898785019101612d94565b019182015261130e82518093603b968785019101612d94565b019182015203601d810184520182612fcc565b980189969593949291610dca565b8261129e60405161133f81612fb0565b600281527f4e4f0000000000000000000000000000000000000000000000000000000000008382015292611298565b60808101518682018a01528b9801610c62565b6084826040519062461bcd60e51b82526004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b503461021a578060031936011261021a5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461021a5760031960a03682011261085c5761144a612ddc565b50611453612df2565b67ffffffffffffffff60443581811161061557611474903690600401612e71565b9190936064358281116118785761148f903690600401612e71565b919094608435848111611874576114aa903690600401612ea2565b50506114bb60ff6009541615613d24565b6001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016948533148061186b575b946114fe8896999499613d6f565b8a9361150987613e65565b998a8d8d6115168b613e65565b978294169a8b925b81861061166f57975050505050505050853b1561021a576115769160405180938192633db0f8ab60e01b8352306004840152606060248401526115668d8c6064860191613eaa565b9088848303016044850152612e08565b038183895af180156106315761165c575b506115b7575b60206040517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b8694833b156106eb578591826116236020936116136040519b8c9a8b997f2eb2c2d6000000000000000000000000000000000000000000000000000000008b523060048c015260248b015260a060448b015260a48a0191613eaa565b9084888303016064890152612e08565b85810392830160848701525201925af1801561060a57611648575b808080808061158d565b6116528291612f9c565b61021a578061163e565b61166890989198612f9c565b9638611587565b61167a868385613747565b358152876020600c81528a6001968760408620019586548c6080948d816116aa81868a1c16828760401c16613dba565b16988915938415611844575b5050505061181557928e96949287928f958f8f9e9d9c9b99978f6116db918893613747565b3591166116e791613e3f565b9c8d918783116000149b6117a29961173c61177a9a60409f966117439761180b57509e8f925b6117198b851115613df4565b888152600d8c5281812061172e888888613747565b3582528c52209182546139c7565b9055613747565b357f33ecc73207a8aa1ed1b91331f77206d8fc02bed6fdcf9ccda99f3f58dcae75a1848b1695604051878152a38554901c16613e49565b825467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178255565b5416916117af8383613e97565b6117b9878c6139b3565b528482036117db575b50505050506117d090613aab565b8a888d8f8d9061151e565b85949a50611800926117f56117d097936117fa939d613814565b613e97565b926139b3565b52908b3880806117c2565b90509e8f9261170d565b50505050505050505090506117d0919650958b61183e82611837818888613747565b35926139b3565b52613aab565b61185e9450906118549291613747565b3590831690613dd4565b15158f8f8f908f916116b6565b508685146114f0565b8880fd5b8680fd5b503461021a5760208060031936011261085c576012546118c592506001600160a01b03169060609081836118d2575b610790929350604051948594604086526040860190613041565b9184830390850152612e08565b506107909150604051926118e584612fb0565b600184528136818601376118f8846139a6565b5260405161190581612fb0565b6001815281368183013760115461191b826139a6565b528392506118ab565b503461021a57602036600319011261021a575061079060606001600160a01b036012541680611963575b50604051918291602083526020830190613041565b604051915061197182612fb0565b6001825260203681840137611985826139a6565b523861194e565b503461021a57608036600319011261021a576119a6612ddc565b6119ae612df2565b6064359167ffffffffffffffff83116119f057366023840112156119f0576119e36119ed93369060248160040135910161300a565b91604435916132d9565b80f35b8380fd5b503461021a57604036600319011261021a57611a0e612ddc565b60243590811515809203610a62576001600160a01b031690813314611a7f573383526005602052604083208284526020526040832060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b503461021a578060031936011261021a5760405190806001805491611ae783613146565b80865292828116908115611b7c5750600114611b22575b61079085611b0e81870382612fcc565b604051918291602083526020830190612db7565b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410611b64575050508101602001611b0e82610790611afe565b80546020858701810191909152909301928101611b49565b86955061079096935060209250611b0e94915060ff191682840152151560051b8201019293611afe565b503461021a578060031936011261021a5760206001600160a01b0360065416604051908152f35b503461021a57602036600319011261021a57611bea6004356139d4565b9061079060405192839283612ed0565b503461021a578060031936011261021a57611c1361307e565b806001600160a01b036006546001600160a01b03198116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461021a57602036600319011261021a576001600160a01b03611c77612ddc565b168015611c94578160409160209352600383522054604051908152f35b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b503461021a57604036600319011261021a576004356001600160a01b03811680910361085c57611d2c61307e565b6001600160a01b0319601254161760125560243560115580f35b503461021a57604036600319011261021a5760243567ffffffffffffffff811161085c57611d78903690600401612e71565b90611d81613c46565b611da360043560005260026020526001600160a01b0360406000205416151590565b15611fed57611dc6611db6600435613121565b6001600160a01b03163314613bfb565b600f54808303611fa957611ddb600854613aab565b92611de584613aab565b928360085585928692875b828110611e99575050505081611e91575b5015611e2757611e19611e1f92611e19600435613c9b565b33613b05565b600160075580f35b608460405162461bcd60e51b815260206004820152602260248201527f41206e65772064656564206d757374206861766520636f6e747269627574696f60448201527f6e730000000000000000000000000000000000000000000000000000000000006064820152fd5b905038611e01565b611ea28161376d565b90549060031b1c6004358a52600e60205260408a20818b5260205260408a205490611ece838588613747565b3590818310611f6557611eec611ee585878a613747565b3584613814565b92611f46575b8a8c52600e60205260408c20818d526020528160408d2055898c52600e60205260408c20908c526020528160408c2055611f3d575b611f34575b600101611df0565b60019450611f2c565b60019650611f27565b6004358c52600e60205260408c20818d526020528b6040812055611ef2565b606460405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f756768207265736f757263657320746f2073706c69740000006044820152fd5b606460405162461bcd60e51b815260206004820152601760248201527f496e76616c696420726573736f757263657320696e666f0000000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152fd5b503461021a57602036600319011261021a576020612050600435613121565b6001600160a01b0360405191168152f35b503461021a57604036600319011261021a5767ffffffffffffffff9060043582811161085c57612095903690600401612ea2565b90926024358181116119f0576120af903690600401612ea2565b9290946120ba61307e565b81612214575b5050816120cb578280f35b8111612200576120dc600b54613146565b601f81116121a1575b5081601f8211600114612124578293829392612119575b50508160011b916000199060031b1c191617600b555b8038808280f35b0135905038806120fc565b601f198216937f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991845b868110612189575083600195961061216f575b505050811b01600b55612112565b0135600019600384901b60f8161c19169055388080612161565b9092602060018192868601358155019401910161214e565b7f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9601f830160051c810191602084106121f6575b601f0160051c01905b8181106121eb57506120e5565b8381556001016121de565b90915081906121d5565b602482634e487b7160e01b81526041600452fd5b828211612361578190612228600a54613146565b601f81116122f3575b508590601f831160011461226e578692612263575b50508160011b916000199060031b1c191617600a555b38806120c0565b013590503880612246565b600a87527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8925090601f198416875b8181106122db57509084600195949392106122c1575b505050811b01600a5561225c565b0135600019600384901b60f8161c191690553880806122b3565b9193602060018192878701358155019501920161229d565b909150600a86527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8601f840160051c81019160208510612357575b90601f859493920160051c01905b8181106123495750612231565b87815584935060010161233c565b909150819061232e565b602485634e487b7160e01b81526041600452fd5b503461021a5761238436612e3c565b60409392935191602083019483861067ffffffffffffffff871117612361576119ed94956040528584526132d9565b503461021a57604036600319011261021a5760043567ffffffffffffffff811161085c576123e5903690600401612e71565b60243567ffffffffffffffff81116119f057612405903690600401612e71565b929061240f61307e565b83830361276857845b838110612423578580f35b84811015612754578060051b820135605e198336030181121561187857606081840136031261187857604051906060820182811067ffffffffffffffff821117612740576040528084013567ffffffffffffffff8111611874578185010136601f8201121561187457368135916020019161249d9261300a565b808352906124af602086830101613732565b9081602085015285016040016124c490613732565b8060408501526124d5858989613747565b358a52600c60205260408a206001015460801c67ffffffffffffffff16916040519361250085612f6a565b845267ffffffffffffffff16602084015267ffffffffffffffff1660408301526060820152612530838787613747565b358852600c60205260408820815180519067ffffffffffffffff821161272c5761255a8354613146565b601f81116126e5575b506020908b601f8411600114612667576060600160409686829b9a9761261f9767ffffffffffffffff9b978c979261265c575b5050600019600383901b1c191690831b1781555b0192826020820151168454907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff00000000000000008a8501518b1b1692161717845501511667ffffffffffffffff60801b1967ffffffffffffffff60801b83549260801b169116179055565b0151166126425761263a612634828787613747565b35613837565b505b01612418565b612656612650828787613747565b356137a4565b5061263c565b015190503880612596565b84905260208c2091908c5b601f19851681106126cd575060606001604096818761261f9767ffffffffffffffff9b978c97849f9e9b601f198116106126b4575b505050811b0181556125aa565b015160001960f88460031b161c191690553880806126a7565b91926020600181928685015181550194019201612672565b838c5260208c20601f840160051c810160208510612725575b8d905b601f840160051c8301811061271857505050612563565b6001918155018d90612701565b50806126fe565b60248b634e487b7160e01b81526041600452fd5b602489634e487b7160e01b81526041600452fd5b602486634e487b7160e01b81526032600452fd5b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b503461021a57604036600319011261021a5760406001600160a01b03601254166127106127dd601154602435613e97565b0482519182526020820152f35b503461021a576119ed6127fc36612e3c565b9161280f61280a843361336f565b613268565b61344e565b503461021a578060031936011261021a5760ff600954161561292d5761283b600854613aab565b8060085581825b600f548110156128d9576128558161376d565b90549060031b1c338552600d602090808252604087208388528252604087205490868852600e9182845260408920858a528452604089205533885282526040872083885282528660408120558587528152604086209186525260408420541515806128d1575b6128c8575b600101612842565b600191506128c0565b5081156128bb565b50156128e9576119ed9033613b05565b606460405162461bcd60e51b815260206004820152601460248201527f4e6f20636f6e747269627574696f6e73207965740000000000000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601160248201527f4d696e74206e6f74206f70656e207965740000000000000000000000000000006044820152fd5b503461021a57602036600319011261021a575060606001600160a01b03601254166129af575b61079090604051918291602083526020830190612e08565b506107906040516129bf81612fb0565b60018152602036818301376011546129d6826139a6565b529050612997565b503461021a57604036600319011261021a576129f8612ddc565b602435906001600160a01b038080612a0f85613121565b16921691808314612b0357803314908115612ae2575b5015612a7857828452600460205260408420826001600160a01b0319825416179055612a5083613121565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b608460405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152fd5b9050845260056020526040842033855260205260ff60408520541638612a25565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b503461021a57602036600319011261021a576020612050600435613226565b503461021a578060031936011261021a5760405190808054612bad81613146565b80855291600191808316908115611b7c5750600114612bd65761079085611b0e81870382612fcc565b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410612c18575050508101602001611b0e82610790611afe565b80546020858701810191909152909301928101612bfd565b90503461085c57602036600319011261085c576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610a6257602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115612d6a575b8115612d40575b8115612d16575b8115612cec575b8115612cc2575b5015158152f35b7fb77995840000000000000000000000000000000000000000000000000000000091501438612cbb565b7f2a55205a0000000000000000000000000000000000000000000000000000000081149150612cb4565b7fbb3bafd60000000000000000000000000000000000000000000000000000000081149150612cad565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150612ca6565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150612c9f565b60005b838110612da75750506000910152565b8181015183820152602001612d97565b90602091612dd081518092818552858086019101612d94565b601f01601f1916010190565b600435906001600160a01b038216820361021557565b602435906001600160a01b038216820361021557565b90815180825260208080930193019160005b828110612e28575050505090565b835185529381019392810192600101612e1a565b6060906003190112610215576001600160a01b0390600435828116810361021557916024359081168103610215579060443590565b9181601f840112156102155782359167ffffffffffffffff8311610215576020808501948460051b01011161021557565b9181601f840112156102155782359167ffffffffffffffff8311610215576020838186019501011161021557565b929190604080850190808652825180925260609182870192808260051b890101936020809601936000925b87858510612f0f5750505050505050930152565b806001929394959697988d605f19908203018752895190815181528567ffffffffffffffff81612f4b8686015160808089880152860190612db7565b948a8101518b8601520151169101529801940194019294939190612efb565b6080810190811067ffffffffffffffff821117612f8657604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111612f8657604052565b6040810190811067ffffffffffffffff821117612f8657604052565b90601f8019910116810190811067ffffffffffffffff821117612f8657604052565b67ffffffffffffffff8111612f8657601f01601f191660200190565b92919261301682612fee565b916130246040519384612fcc565b829481845281830111610215578281602093846000960137010152565b90815180825260208080930193019160005b828110613061575050505090565b83516001600160a01b031685529381019392810192600101613053565b6001600160a01b0360065416330361309257565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b156130dd57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b03604060002054166131438115156130d6565b90565b90600182811c92168015613176575b602083101461316057565b634e487b7160e01b600052602260045260246000fd5b91607f1691613155565b906040519182600082549261319484613146565b90818452600194858116908160001461320357506001146131c0575b50506131be92500383612fcc565b565b9093915060005260209081600020936000915b8183106131eb5750506131be935082010138806131b0565b855488840185015294850194879450918301916131d3565b9150506131be94506020925060ff191682840152151560051b82010138806131b0565b61324e6132498260005260026020526001600160a01b0360406000205416151590565b6130d6565b60005260046020526001600160a01b036040600020541690565b1561326f57565b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152fd5b906132fd9392916132ed61280a843361336f565b6132f883838361344e565b613575565b1561330457565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b906001600160a01b03808061338384613121565b169316918383149384156133b6575b5083156133a0575b50505090565b6133ac91929350613226565b161438808061339a565b909350600052600560205260406000208260005260205260ff604060002054169238613392565b156133e457565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b906134769161345c84613121565b916001600160a01b039384938480941694859116146133dd565b1691821561350c57816134939161348c86613121565b16146133dd565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160a01b03199081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b9293600093909291803b15613727579484916135e996604051809481937f150b7a0200000000000000000000000000000000000000000000000000000000978884523360048501526001600160a01b0380921660248501526044840152608060648401528260209b8c976084830190612db7565b0393165af18491816136cf575b506136a6575050503d60001461369e573d61361081612fee565b9061361e6040519283612fcc565b81528091833d92013e5b8051918261369b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b01fd5b506060613628565b7fffffffff00000000000000000000000000000000000000000000000000000000161492509050565b9091508581813d8311613720575b6136e78183612fcc565b8101031261061557517fffffffff00000000000000000000000000000000000000000000000000000000811681036106155790386135f6565b503d6136dd565b505050915050600190565b359067ffffffffffffffff8216820361021557565b91908110156137575760051b0190565b634e487b7160e01b600052603260045260246000fd5b600f5481101561375757600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020190600090565b60008181526010602052604081205461380f57600f54680100000000000000008110156122005790826137fb6137e284600160409601600f5561376d565b819391549060031b600019811b9283911b169119161790565b9055600f5492815260106020522055600190565b905090565b9190820391821161382157565b634e487b7160e01b600052601160045260246000fd5b600081815260106020526040812054909190801561391c576000199080820181811161390857600f54908382019182116138f4578082036138c0575b505050600f5480156138ac5781019061388b8261376d565b909182549160031b1b19169055600f55815260106020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6138de6138cf6137e29361376d565b90549060031b1c92839261376d565b9055845260106020526040842055388080613873565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b67ffffffffffffffff8111612f865760051b60200190565b9061394382613921565b60409061395282519182612fcc565b8381528093613963601f1991613921565b0191600091825b848110613978575050505050565b602090835161398681612f6a565b85815260608684918083850152818885015283015282850101520161396a565b8051156137575760200190565b80518210156137575760209160051b010190565b9190820180921161382157565b90600090600092600f546139e781613939565b9480925b868385106139fa575050505050565b9091929395613aa190613a0c8861376d565b90549060031b1c808652600c90602082815287613a8b8c6040988996878520908c865267ffffffffffffffff600e968789528a81208a825289528a81205492895260019d8e912001541690613a6e8a5193613a6685612f6a565b8a8552613180565b88840152898301526060820152613a8583836139b3565b526139b3565b50878952815282882091885252852054906139c7565b95019291906139eb565b60001981146138215760010190565b15613ac157565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b6001600160a01b03168015613bb757613b3d613b378360005260026020526001600160a01b0360406000205416151590565b15613aba565b613b60613b378360005260026020526001600160a01b0360406000205416151590565b600081815260036020526040812060018154019055828152600260205260408120826001600160a01b03198254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b15613c0257565b606460405162461bcd60e51b815260206004820152600960248201527f4e6f74206f776e657200000000000000000000000000000000000000000000006044820152fd5b600260075414613c57576002600755565b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b613ca481613121565b50613cae81613121565b60009082825260046020526001600160a01b0360408320916001600160a01b031992838154169055169081835260036020526040832060001981540190558383526002602052604083209081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4565b15613d2b57565b606460405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420636f6e7472696275746520616e796d6f7265000000000000006044820152fd5b15613d7657565b606460405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207265736f75726365000000000000000000000000000000006044820152fd5b67ffffffffffffffff918216908216039190821161382157565b8115613dde570690565b634e487b7160e01b600052601260045260246000fd5b15613dfb57565b606460405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152fd5b8115613dde570490565b91909167ffffffffffffffff8080941691160191821161382157565b90613e6f82613921565b613e7c6040519182612fcc565b8281528092613e8d601f1991613921565b0190602036910137565b8181029291811591840414171561382157565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116102155760209260051b809284830137010190565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008082101561404e575b506d04ee2d6d415b85acef81000000008083101561403f575b50662386f26fc1000080831015614030575b506305f5e10080831015614021575b5061271080831015614012575b506064821015614002575b600a80921015613ff8575b60019081602181860195613f8087612fee565b96613f8e6040519889612fcc565b808852613f9d601f1991612fee565b01366020890137860101905b613fb5575b5050505090565b600019019083907f30313233343536373839616263646566000000000000000000000000000000008282061a835304918215613ff357919082613fa9565b613fae565b9160010191613f6d565b9190606460029104910191613f62565b60049193920491019138613f57565b60089193920491019138613f4a565b60109193920491019138613f3b565b60209193920491019138613f29565b604093508104915038613f10565b600a81101561409f575060405161407281612fb0565b600581527f426c61636b000000000000000000000000000000000000000000000000000000602082015290565b60328110156140e257506040516140b581612fb0565b600681527f4d6172626c650000000000000000000000000000000000000000000000000000602082015290565b60c881101561412557506040516140f881612fb0565b600681527f4368726f6d650000000000000000000000000000000000000000000000000000602082015290565b6103e811156141675760405161413a81612fb0565b600481527f4a61646500000000000000000000000000000000000000000000000000000000602082015290565b60405161417381612fb0565b600481527f476f6c6400000000000000000000000000000000000000000000000000000000602082015290565b600a8110156141e357506040516141b681612fb0565b600581527f424c41434b000000000000000000000000000000000000000000000000000000602082015290565b603281101561422657506040516141f981612fb0565b600681527f4d4152424c450000000000000000000000000000000000000000000000000000602082015290565b60c8811015614269575060405161423c81612fb0565b600681527f4348524f4d450000000000000000000000000000000000000000000000000000602082015290565b6103e811156142ab5760405161427e81612fb0565b600481527f4a41444500000000000000000000000000000000000000000000000000000000602082015290565b6040516142b781612fb0565b600481527f474f4c440000000000000000000000000000000000000000000000000000000060208201529056fea2646970667358221220c4e888ac8019bc2d20c39dc1b65a956c0ec23268a0bc0626d7fe93884409972664736f6c6343000811003368747470733a2f2f646565642e6c7663696469612e78797a2f7669657765722f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73

Deployed Bytecode

0x608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612c305750806306fdde0314612b8c578063081812fc14612b6d578063095ea7b3146129de5780630ebd4c7f146129715780631249c58b1461281457806323b872dd146127ea5780632a55205a146127ac5780633d3ce307146123b357806342842e0e1461237557806351335b50146120615780636352211e1461203157806369c6724714611d465780636c2f5acd14611cfe57806370a0823114611c55578063715018a614611bfa57806376f5c79414611bcd5780638da5cb5b14611ba657806395d89b4114611ac3578063a22cb465146119f4578063b88d4fde1461198c578063b9c4d9fb14611924578063bb3bafd61461187c578063bc197c811461142f578063c7aef020146113eb578063c87b56dd14610b25578063cc98199514610a66578063de62d84214610860578063e36465a314610744578063e985e9c5146106ef578063f23a6e61146102f7578063f2fde38b1461021d5763f46a04eb1461018c57600080fd5b3461021a57602036600319011261021a57600435801515809103610215576101b261307e565b6009549060ff8216151581146101d15760ff169060ff19161760095580f35b606460405162461bcd60e51b815260206004820152601b60248201527f73686f756c64206265206120646966666572656e742076616c756500000000006044820152fd5b600080fd5b80fd5b503461021a57602036600319011261021a57610237612ddc565b61023f61307e565b6001600160a01b0380911690811561028d57600654826001600160a01b0319821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461021a576003199060a03683011261021a57610313612ddc565b5061031c612df2565b604435606435936084359267ffffffffffffffff938481116106eb57610346903690600401612ea2565b505061035760ff6009541615613d24565b828552602095600c875260408620946001600160a01b03916001837f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db731697883314806106da575b6103a790613d6f565b0192835491836103c1818560801c16828660401c16613dba565b169283156106965790846103e99216906103e46103de8383613dd4565b15613df4565b613e3f565b918083111561068e57945b85151580610684575b15610640571694858952600d8a5260408920878a528a52604089206104238682546139c7565b905561048e6104668b888a7f33ecc73207a8aa1ed1b91331f77206d8fc02bed6fdcf9ccda99f3f58dcae75a1888b1693604051858152a385875460801c16613e49565b855467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178555565b60405161049a81612fb0565b600181528a3681830137876104ae826139a6565b52604051916104bc83612fb0565b600183528b36818501376104d38587541688613e97565b6104dc846139a6565b52893b1561063c578a91610525610516926040519586948594633db0f8ab60e01b8652306004870152606060248701526064860190612e08565b91848303016044850152612e08565b0381838c5af1801561063157908991610619575b505080840361056c575b886040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b6105829361057991613814565b91541690613e97565b92803b15610615578492918360c49260405196879586947ff242432a00000000000000000000000000000000000000000000000000000000865230600487015260248601526044850152606484015260a060848401528160a48401525af1801561060a576105f6575b808080808080610543565b6106008291612f9c565b61021a57806105eb565b6040513d84823e3d90fd5b8480fd5b61062290612f9c565b61062d578738610539565b8780fd5b6040513d8b823e3d90fd5b8a80fd5b60648b6040519062461bcd60e51b82526004820152600d60248201527f496e76616c696420756e697473000000000000000000000000000000000000006044820152fd5b50838611156103fd565b5081946103f4565b60648c6040519062461bcd60e51b82526004820152601a60248201527f436f6e747269627574696f6e206c696d697420726561636865640000000000006044820152fd5b508082015460401c8416151561039e565b8580fd5b503461021a57604036600319011261021a57610709612ddc565b6040610713612df2565b926001600160a01b0380931681526005602052209116600052602052602060ff604060002054166040519015158152f35b503461021a5760208060031936011261085c5761075f612ddc565b82600f5461076c81613939565b936001600160a01b03839416905b8285106107945760405180610790898983612ed0565b0390f35b90919293956108516107a58861376d565b90549060031b1c808752600c84526040872092604051916107c583612f6a565b6107ce85613180565b83526001809501548684019067ffffffffffffffff8082168352808260401c1660408701528060609260801c1682870152898c52600d895260408c20848d52895260408c20549551925116916040519361082785612f6a565b8452888401528460408401528201526108408b8b6139b3565b5261084b8a8a6139b3565b506139c7565b96019392919061077a565b5080fd5b503461021a5760208060031936011261085c5760043567ffffffffffffffff8111610a6257610893903690600401612e71565b919061089d613c46565b6108a8600854613aab565b9182600855600f54600194858111156109f857865b8181106108d65787876108d08833613b05565b60075580f35b6108e1818387613747565b356109028160005260026020526001600160a01b0360406000205416151590565b156109b457908791610926336001600160a01b0361091f84613121565b1614613bfb565b895b85811061093f575061093990613c9b565b016108bd565b8a61094d829593949561376d565b90549060031b1c848252600e808a52604083208284528a528b60408420549384610999575b52895260408d20908d52885261098d60408d209182546139c7565b90550190889291610928565b878152828c52604081208482528c5260006040822055610972565b6064856040519062461bcd60e51b82526004820152601f60248201527f4e6f6e6578697374656e74206f72206475706c69636174656420746f6b656e006044820152fd5b6084836040519062461bcd60e51b82526004820152602c60248201527f4174206c656173742074776f20746f6b656e732061726520726571756972656460448201527f20666f72206d657267696e6700000000000000000000000000000000000000006064820152fd5b8280fd5b503461021a5760208060031936011261085c5760408260809360608351610a8c81612f6a565b8181528286820152828582015201526004358152600c83522090600160405192610ab584612f6a565b610abe81613180565b84520154908083019167ffffffffffffffff8092818316855281610b0b6040880192828660401c1684528260608a01968b1c168652604051998a99828b5251918a015260a0890190612db7565b955116604087015251166060850152511660808301520390f35b503461021a5760208060031936011261085c57600435610b5b8160005260026020526001600160a01b0360406000205416151590565b1561138157610b69816139d4565b93906103e894610b85610b7d878304613ee7565b968206613ee7565b600381511015610be557610be0604051917f300000000000000000000000000000000000000000000000000000000000000088840152828151610bd0816021948c8686019101612d94565b8101036001810184520182612fcc565b610b85565b91908594959187604051809585610c058184019485815193849201612d94565b82017f2e0000000000000000000000000000000000000000000000000000000000000087820152610c3f8251809389602185019101612d94565b010394610c56602160019788810184520182612fcc565b60405191606091825160005b81811061136e5750610d0692604e92610cd187938401917f7b2274726169745f74797065223a22506c616e6574204f776e657273686970228c8401527f2c2276616c7565223a22000000000000000000000000000000000000000000006040840152518093604a840190612d94565b017f25227d2c00000000000000000000000000000000000000000000000000000000604a82015203602e810185520183612fcc565b610d0f8461405c565b60405192610d2581518092898088019101612d94565b83017f7b2274726169745f74797065223a224261636b67726f756e64204d6174657269878201527f616c222c2276616c7565223a22000000000000000000000000000000000000006040820152610d858251809389604d85019101612d94565b0191610dc3604f827f227d0000000000000000000000000000000000000000000000000000000000009586604d82015203602f810184520182612fcc565b9680600f54935b848210611217575050925b8284106110f05750505050610de9906141a0565b91610dfc610df687613ee7565b96613ee7565b6040519687947f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000858701527f7b226e616d65223a220000000000000000000000000000000000000000000000603b870152610e60815180928760448a019101612d94565b85017f20444545442f2f202300000000000000000000000000000000000000000000006044820152610e9b8251809387604d85019101612d94565b017f222c22637265617465645f6279223a224c564349444941222c22646573637269604d8201527f7074696f6e223a22000000000000000000000000000000000000000000000000606d820152600090600a5490610ef882613146565b918581169081156110d25750600114611078575b50507f222c22696d616765223a220000000000000000000000000000000000000000008152600092600b91825491610f4383613146565b928181169081156110565750600114610ff3575b8787610fdf6016838d848c610f728d82815194859201612d94565b017f2e706e67222c2261747472696275746573223a5b0000000000000000000000008152610fa98251809388601485019101612d94565b017f5d7d000000000000000000000000000000000000000000000000000000000000601482015203600919810185520183612fcc565b610790604051928284938452830190612db7565b909192809495506000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906000915b84831061103e5750505001019080610f72610fdf6016610f57565b80548484018701528b98508a97909201918101611023565b60ff19168386015250508115159091020101915080610f72610fdf6016610f57565b909150600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a86000905b8382106110b9575050016075018880610f0c565b8054607584840101528a975089969091019085016110a5565b90506075935060ff9291921916838301528015150201018880610f0c565b919394611209603b8599837f7d00000000000000000000000000000000000000000000000000000000000000886111886111838a8f9a9c8d6111797f222c2276616c7565223a000000000000000000000000000000000000000000009c61116067ffffffffffffffff94866139b3565b51015196604061117082876139b3565b510151946139b3565b5101511690613e97565b613ee7565b9060405197856111a18a9751809288808b019101612d94565b86017f2c7b2274726169745f74797065223a2200000000000000000000000000000000868201528251906111dd82603095898785019101612d94565b01918201526111f682518093603a968785019101612d94565b019182015203601b810184520182612fcc565b960192909187949392610dd5565b919294939596611321603d839b7f222c2276616c7565223a2200000000000000000000000000000000000000000093868d966040611255828d6139b3565b5101511561132f578261129e60405161126d81612fb0565b600381527f594553000000000000000000000000000000000000000000000000000000000083820152925b8d6139b3565b51015160405197856112b98a9751809288808b019101612d94565b86017f2c7b2274726169745f74797065223a2200000000000000000000000000000000868201528251906112f582603095898785019101612d94565b019182015261130e82518093603b968785019101612d94565b019182015203601d810184520182612fcc565b980189969593949291610dca565b8261129e60405161133f81612fb0565b600281527f4e4f0000000000000000000000000000000000000000000000000000000000008382015292611298565b60808101518682018a01528b9801610c62565b6084826040519062461bcd60e51b82526004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b503461021a578060031936011261021a5760206040516001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73168152f35b503461021a5760031960a03682011261085c5761144a612ddc565b50611453612df2565b67ffffffffffffffff60443581811161061557611474903690600401612e71565b9190936064358281116118785761148f903690600401612e71565b919094608435848111611874576114aa903690600401612ea2565b50506114bb60ff6009541615613d24565b6001600160a01b03807f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db7316948533148061186b575b946114fe8896999499613d6f565b8a9361150987613e65565b998a8d8d6115168b613e65565b978294169a8b925b81861061166f57975050505050505050853b1561021a576115769160405180938192633db0f8ab60e01b8352306004840152606060248401526115668d8c6064860191613eaa565b9088848303016044850152612e08565b038183895af180156106315761165c575b506115b7575b60206040517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b8694833b156106eb578591826116236020936116136040519b8c9a8b997f2eb2c2d6000000000000000000000000000000000000000000000000000000008b523060048c015260248b015260a060448b015260a48a0191613eaa565b9084888303016064890152612e08565b85810392830160848701525201925af1801561060a57611648575b808080808061158d565b6116528291612f9c565b61021a578061163e565b61166890989198612f9c565b9638611587565b61167a868385613747565b358152876020600c81528a6001968760408620019586548c6080948d816116aa81868a1c16828760401c16613dba565b16988915938415611844575b5050505061181557928e96949287928f958f8f9e9d9c9b99978f6116db918893613747565b3591166116e791613e3f565b9c8d918783116000149b6117a29961173c61177a9a60409f966117439761180b57509e8f925b6117198b851115613df4565b888152600d8c5281812061172e888888613747565b3582528c52209182546139c7565b9055613747565b357f33ecc73207a8aa1ed1b91331f77206d8fc02bed6fdcf9ccda99f3f58dcae75a1848b1695604051878152a38554901c16613e49565b825467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178255565b5416916117af8383613e97565b6117b9878c6139b3565b528482036117db575b50505050506117d090613aab565b8a888d8f8d9061151e565b85949a50611800926117f56117d097936117fa939d613814565b613e97565b926139b3565b52908b3880806117c2565b90509e8f9261170d565b50505050505050505090506117d0919650958b61183e82611837818888613747565b35926139b3565b52613aab565b61185e9450906118549291613747565b3590831690613dd4565b15158f8f8f908f916116b6565b508685146114f0565b8880fd5b8680fd5b503461021a5760208060031936011261085c576012546118c592506001600160a01b03169060609081836118d2575b610790929350604051948594604086526040860190613041565b9184830390850152612e08565b506107909150604051926118e584612fb0565b600184528136818601376118f8846139a6565b5260405161190581612fb0565b6001815281368183013760115461191b826139a6565b528392506118ab565b503461021a57602036600319011261021a575061079060606001600160a01b036012541680611963575b50604051918291602083526020830190613041565b604051915061197182612fb0565b6001825260203681840137611985826139a6565b523861194e565b503461021a57608036600319011261021a576119a6612ddc565b6119ae612df2565b6064359167ffffffffffffffff83116119f057366023840112156119f0576119e36119ed93369060248160040135910161300a565b91604435916132d9565b80f35b8380fd5b503461021a57604036600319011261021a57611a0e612ddc565b60243590811515809203610a62576001600160a01b031690813314611a7f573383526005602052604083208284526020526040832060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b503461021a578060031936011261021a5760405190806001805491611ae783613146565b80865292828116908115611b7c5750600114611b22575b61079085611b0e81870382612fcc565b604051918291602083526020830190612db7565b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410611b64575050508101602001611b0e82610790611afe565b80546020858701810191909152909301928101611b49565b86955061079096935060209250611b0e94915060ff191682840152151560051b8201019293611afe565b503461021a578060031936011261021a5760206001600160a01b0360065416604051908152f35b503461021a57602036600319011261021a57611bea6004356139d4565b9061079060405192839283612ed0565b503461021a578060031936011261021a57611c1361307e565b806001600160a01b036006546001600160a01b03198116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461021a57602036600319011261021a576001600160a01b03611c77612ddc565b168015611c94578160409160209352600383522054604051908152f35b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b503461021a57604036600319011261021a576004356001600160a01b03811680910361085c57611d2c61307e565b6001600160a01b0319601254161760125560243560115580f35b503461021a57604036600319011261021a5760243567ffffffffffffffff811161085c57611d78903690600401612e71565b90611d81613c46565b611da360043560005260026020526001600160a01b0360406000205416151590565b15611fed57611dc6611db6600435613121565b6001600160a01b03163314613bfb565b600f54808303611fa957611ddb600854613aab565b92611de584613aab565b928360085585928692875b828110611e99575050505081611e91575b5015611e2757611e19611e1f92611e19600435613c9b565b33613b05565b600160075580f35b608460405162461bcd60e51b815260206004820152602260248201527f41206e65772064656564206d757374206861766520636f6e747269627574696f60448201527f6e730000000000000000000000000000000000000000000000000000000000006064820152fd5b905038611e01565b611ea28161376d565b90549060031b1c6004358a52600e60205260408a20818b5260205260408a205490611ece838588613747565b3590818310611f6557611eec611ee585878a613747565b3584613814565b92611f46575b8a8c52600e60205260408c20818d526020528160408d2055898c52600e60205260408c20908c526020528160408c2055611f3d575b611f34575b600101611df0565b60019450611f2c565b60019650611f27565b6004358c52600e60205260408c20818d526020528b6040812055611ef2565b606460405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f756768207265736f757263657320746f2073706c69740000006044820152fd5b606460405162461bcd60e51b815260206004820152601760248201527f496e76616c696420726573736f757263657320696e666f0000000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152fd5b503461021a57602036600319011261021a576020612050600435613121565b6001600160a01b0360405191168152f35b503461021a57604036600319011261021a5767ffffffffffffffff9060043582811161085c57612095903690600401612ea2565b90926024358181116119f0576120af903690600401612ea2565b9290946120ba61307e565b81612214575b5050816120cb578280f35b8111612200576120dc600b54613146565b601f81116121a1575b5081601f8211600114612124578293829392612119575b50508160011b916000199060031b1c191617600b555b8038808280f35b0135905038806120fc565b601f198216937f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991845b868110612189575083600195961061216f575b505050811b01600b55612112565b0135600019600384901b60f8161c19169055388080612161565b9092602060018192868601358155019401910161214e565b7f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9601f830160051c810191602084106121f6575b601f0160051c01905b8181106121eb57506120e5565b8381556001016121de565b90915081906121d5565b602482634e487b7160e01b81526041600452fd5b828211612361578190612228600a54613146565b601f81116122f3575b508590601f831160011461226e578692612263575b50508160011b916000199060031b1c191617600a555b38806120c0565b013590503880612246565b600a87527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8925090601f198416875b8181106122db57509084600195949392106122c1575b505050811b01600a5561225c565b0135600019600384901b60f8161c191690553880806122b3565b9193602060018192878701358155019501920161229d565b909150600a86527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8601f840160051c81019160208510612357575b90601f859493920160051c01905b8181106123495750612231565b87815584935060010161233c565b909150819061232e565b602485634e487b7160e01b81526041600452fd5b503461021a5761238436612e3c565b60409392935191602083019483861067ffffffffffffffff871117612361576119ed94956040528584526132d9565b503461021a57604036600319011261021a5760043567ffffffffffffffff811161085c576123e5903690600401612e71565b60243567ffffffffffffffff81116119f057612405903690600401612e71565b929061240f61307e565b83830361276857845b838110612423578580f35b84811015612754578060051b820135605e198336030181121561187857606081840136031261187857604051906060820182811067ffffffffffffffff821117612740576040528084013567ffffffffffffffff8111611874578185010136601f8201121561187457368135916020019161249d9261300a565b808352906124af602086830101613732565b9081602085015285016040016124c490613732565b8060408501526124d5858989613747565b358a52600c60205260408a206001015460801c67ffffffffffffffff16916040519361250085612f6a565b845267ffffffffffffffff16602084015267ffffffffffffffff1660408301526060820152612530838787613747565b358852600c60205260408820815180519067ffffffffffffffff821161272c5761255a8354613146565b601f81116126e5575b506020908b601f8411600114612667576060600160409686829b9a9761261f9767ffffffffffffffff9b978c979261265c575b5050600019600383901b1c191690831b1781555b0192826020820151168454907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff00000000000000008a8501518b1b1692161717845501511667ffffffffffffffff60801b1967ffffffffffffffff60801b83549260801b169116179055565b0151166126425761263a612634828787613747565b35613837565b505b01612418565b612656612650828787613747565b356137a4565b5061263c565b015190503880612596565b84905260208c2091908c5b601f19851681106126cd575060606001604096818761261f9767ffffffffffffffff9b978c97849f9e9b601f198116106126b4575b505050811b0181556125aa565b015160001960f88460031b161c191690553880806126a7565b91926020600181928685015181550194019201612672565b838c5260208c20601f840160051c810160208510612725575b8d905b601f840160051c8301811061271857505050612563565b6001918155018d90612701565b50806126fe565b60248b634e487b7160e01b81526041600452fd5b602489634e487b7160e01b81526041600452fd5b602486634e487b7160e01b81526032600452fd5b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b503461021a57604036600319011261021a5760406001600160a01b03601254166127106127dd601154602435613e97565b0482519182526020820152f35b503461021a576119ed6127fc36612e3c565b9161280f61280a843361336f565b613268565b61344e565b503461021a578060031936011261021a5760ff600954161561292d5761283b600854613aab565b8060085581825b600f548110156128d9576128558161376d565b90549060031b1c338552600d602090808252604087208388528252604087205490868852600e9182845260408920858a528452604089205533885282526040872083885282528660408120558587528152604086209186525260408420541515806128d1575b6128c8575b600101612842565b600191506128c0565b5081156128bb565b50156128e9576119ed9033613b05565b606460405162461bcd60e51b815260206004820152601460248201527f4e6f20636f6e747269627574696f6e73207965740000000000000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601160248201527f4d696e74206e6f74206f70656e207965740000000000000000000000000000006044820152fd5b503461021a57602036600319011261021a575060606001600160a01b03601254166129af575b61079090604051918291602083526020830190612e08565b506107906040516129bf81612fb0565b60018152602036818301376011546129d6826139a6565b529050612997565b503461021a57604036600319011261021a576129f8612ddc565b602435906001600160a01b038080612a0f85613121565b16921691808314612b0357803314908115612ae2575b5015612a7857828452600460205260408420826001600160a01b0319825416179055612a5083613121565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b608460405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152fd5b9050845260056020526040842033855260205260ff60408520541638612a25565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b503461021a57602036600319011261021a576020612050600435613226565b503461021a578060031936011261021a5760405190808054612bad81613146565b80855291600191808316908115611b7c5750600114612bd65761079085611b0e81870382612fcc565b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410612c18575050508101602001611b0e82610790611afe565b80546020858701810191909152909301928101612bfd565b90503461085c57602036600319011261085c576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610a6257602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115612d6a575b8115612d40575b8115612d16575b8115612cec575b8115612cc2575b5015158152f35b7fb77995840000000000000000000000000000000000000000000000000000000091501438612cbb565b7f2a55205a0000000000000000000000000000000000000000000000000000000081149150612cb4565b7fbb3bafd60000000000000000000000000000000000000000000000000000000081149150612cad565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150612ca6565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150612c9f565b60005b838110612da75750506000910152565b8181015183820152602001612d97565b90602091612dd081518092818552858086019101612d94565b601f01601f1916010190565b600435906001600160a01b038216820361021557565b602435906001600160a01b038216820361021557565b90815180825260208080930193019160005b828110612e28575050505090565b835185529381019392810192600101612e1a565b6060906003190112610215576001600160a01b0390600435828116810361021557916024359081168103610215579060443590565b9181601f840112156102155782359167ffffffffffffffff8311610215576020808501948460051b01011161021557565b9181601f840112156102155782359167ffffffffffffffff8311610215576020838186019501011161021557565b929190604080850190808652825180925260609182870192808260051b890101936020809601936000925b87858510612f0f5750505050505050930152565b806001929394959697988d605f19908203018752895190815181528567ffffffffffffffff81612f4b8686015160808089880152860190612db7565b948a8101518b8601520151169101529801940194019294939190612efb565b6080810190811067ffffffffffffffff821117612f8657604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111612f8657604052565b6040810190811067ffffffffffffffff821117612f8657604052565b90601f8019910116810190811067ffffffffffffffff821117612f8657604052565b67ffffffffffffffff8111612f8657601f01601f191660200190565b92919261301682612fee565b916130246040519384612fcc565b829481845281830111610215578281602093846000960137010152565b90815180825260208080930193019160005b828110613061575050505090565b83516001600160a01b031685529381019392810192600101613053565b6001600160a01b0360065416330361309257565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b156130dd57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b03604060002054166131438115156130d6565b90565b90600182811c92168015613176575b602083101461316057565b634e487b7160e01b600052602260045260246000fd5b91607f1691613155565b906040519182600082549261319484613146565b90818452600194858116908160001461320357506001146131c0575b50506131be92500383612fcc565b565b9093915060005260209081600020936000915b8183106131eb5750506131be935082010138806131b0565b855488840185015294850194879450918301916131d3565b9150506131be94506020925060ff191682840152151560051b82010138806131b0565b61324e6132498260005260026020526001600160a01b0360406000205416151590565b6130d6565b60005260046020526001600160a01b036040600020541690565b1561326f57565b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152fd5b906132fd9392916132ed61280a843361336f565b6132f883838361344e565b613575565b1561330457565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b906001600160a01b03808061338384613121565b169316918383149384156133b6575b5083156133a0575b50505090565b6133ac91929350613226565b161438808061339a565b909350600052600560205260406000208260005260205260ff604060002054169238613392565b156133e457565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b906134769161345c84613121565b916001600160a01b039384938480941694859116146133dd565b1691821561350c57816134939161348c86613121565b16146133dd565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160a01b03199081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b9293600093909291803b15613727579484916135e996604051809481937f150b7a0200000000000000000000000000000000000000000000000000000000978884523360048501526001600160a01b0380921660248501526044840152608060648401528260209b8c976084830190612db7565b0393165af18491816136cf575b506136a6575050503d60001461369e573d61361081612fee565b9061361e6040519283612fcc565b81528091833d92013e5b8051918261369b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b01fd5b506060613628565b7fffffffff00000000000000000000000000000000000000000000000000000000161492509050565b9091508581813d8311613720575b6136e78183612fcc565b8101031261061557517fffffffff00000000000000000000000000000000000000000000000000000000811681036106155790386135f6565b503d6136dd565b505050915050600190565b359067ffffffffffffffff8216820361021557565b91908110156137575760051b0190565b634e487b7160e01b600052603260045260246000fd5b600f5481101561375757600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020190600090565b60008181526010602052604081205461380f57600f54680100000000000000008110156122005790826137fb6137e284600160409601600f5561376d565b819391549060031b600019811b9283911b169119161790565b9055600f5492815260106020522055600190565b905090565b9190820391821161382157565b634e487b7160e01b600052601160045260246000fd5b600081815260106020526040812054909190801561391c576000199080820181811161390857600f54908382019182116138f4578082036138c0575b505050600f5480156138ac5781019061388b8261376d565b909182549160031b1b19169055600f55815260106020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6138de6138cf6137e29361376d565b90549060031b1c92839261376d565b9055845260106020526040842055388080613873565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b67ffffffffffffffff8111612f865760051b60200190565b9061394382613921565b60409061395282519182612fcc565b8381528093613963601f1991613921565b0191600091825b848110613978575050505050565b602090835161398681612f6a565b85815260608684918083850152818885015283015282850101520161396a565b8051156137575760200190565b80518210156137575760209160051b010190565b9190820180921161382157565b90600090600092600f546139e781613939565b9480925b868385106139fa575050505050565b9091929395613aa190613a0c8861376d565b90549060031b1c808652600c90602082815287613a8b8c6040988996878520908c865267ffffffffffffffff600e968789528a81208a825289528a81205492895260019d8e912001541690613a6e8a5193613a6685612f6a565b8a8552613180565b88840152898301526060820152613a8583836139b3565b526139b3565b50878952815282882091885252852054906139c7565b95019291906139eb565b60001981146138215760010190565b15613ac157565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b6001600160a01b03168015613bb757613b3d613b378360005260026020526001600160a01b0360406000205416151590565b15613aba565b613b60613b378360005260026020526001600160a01b0360406000205416151590565b600081815260036020526040812060018154019055828152600260205260408120826001600160a01b03198254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b15613c0257565b606460405162461bcd60e51b815260206004820152600960248201527f4e6f74206f776e657200000000000000000000000000000000000000000000006044820152fd5b600260075414613c57576002600755565b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b613ca481613121565b50613cae81613121565b60009082825260046020526001600160a01b0360408320916001600160a01b031992838154169055169081835260036020526040832060001981540190558383526002602052604083209081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4565b15613d2b57565b606460405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420636f6e7472696275746520616e796d6f7265000000000000006044820152fd5b15613d7657565b606460405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207265736f75726365000000000000000000000000000000006044820152fd5b67ffffffffffffffff918216908216039190821161382157565b8115613dde570690565b634e487b7160e01b600052601260045260246000fd5b15613dfb57565b606460405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152fd5b8115613dde570490565b91909167ffffffffffffffff8080941691160191821161382157565b90613e6f82613921565b613e7c6040519182612fcc565b8281528092613e8d601f1991613921565b0190602036910137565b8181029291811591840414171561382157565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116102155760209260051b809284830137010190565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008082101561404e575b506d04ee2d6d415b85acef81000000008083101561403f575b50662386f26fc1000080831015614030575b506305f5e10080831015614021575b5061271080831015614012575b506064821015614002575b600a80921015613ff8575b60019081602181860195613f8087612fee565b96613f8e6040519889612fcc565b808852613f9d601f1991612fee565b01366020890137860101905b613fb5575b5050505090565b600019019083907f30313233343536373839616263646566000000000000000000000000000000008282061a835304918215613ff357919082613fa9565b613fae565b9160010191613f6d565b9190606460029104910191613f62565b60049193920491019138613f57565b60089193920491019138613f4a565b60109193920491019138613f3b565b60209193920491019138613f29565b604093508104915038613f10565b600a81101561409f575060405161407281612fb0565b600581527f426c61636b000000000000000000000000000000000000000000000000000000602082015290565b60328110156140e257506040516140b581612fb0565b600681527f4d6172626c650000000000000000000000000000000000000000000000000000602082015290565b60c881101561412557506040516140f881612fb0565b600681527f4368726f6d650000000000000000000000000000000000000000000000000000602082015290565b6103e811156141675760405161413a81612fb0565b600481527f4a61646500000000000000000000000000000000000000000000000000000000602082015290565b60405161417381612fb0565b600481527f476f6c6400000000000000000000000000000000000000000000000000000000602082015290565b600a8110156141e357506040516141b681612fb0565b600581527f424c41434b000000000000000000000000000000000000000000000000000000602082015290565b603281101561422657506040516141f981612fb0565b600681527f4d4152424c450000000000000000000000000000000000000000000000000000602082015290565b60c8811015614269575060405161423c81612fb0565b600681527f4348524f4d450000000000000000000000000000000000000000000000000000602082015290565b6103e811156142ab5760405161427e81612fb0565b600481527f4a41444500000000000000000000000000000000000000000000000000000000602082015290565b6040516142b781612fb0565b600481527f474f4c440000000000000000000000000000000000000000000000000000000060208201529056fea2646970667358221220c4e888ac8019bc2d20c39dc1b65a956c0ec23268a0bc0626d7fe93884409972664736f6c63430008110033

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

00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73

-----Decoded View---------------
Arg [0] : resourcesAddress (address): 0x97A20815a061EaE224c4fdF3109731f73743db73

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73


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.