ETH Price: $3,473.21 (-0.24%)
Gas: 2 Gwei

Contract

0x7b8fFFB8340F304CB47687bC092a0382b9387BD7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...202028042024-06-30 6:47:1123 days ago1719730031IN
0x7b8fFFB8...2b9387BD7
0 ETH0.000084631.83584913
Set Approval For...198385002024-05-10 8:39:5974 days ago1715330399IN
0x7b8fFFB8...2b9387BD7
0 ETH0.000103634.27202805
Set Approval For...189399242024-01-05 8:34:23200 days ago1704443663IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0003437914.17198853
Set Approval For...188487072023-12-23 13:07:23213 days ago1703336843IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0006943328.62178318
Set Approval For...185459872023-11-11 3:23:11255 days ago1699672991IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0006755727.84842287
Set Approval For...169180522023-03-27 10:14:11484 days ago1679912051IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0004366618
Safe Transfer Fr...162876292022-12-29 3:07:35572 days ago1672283255IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0013485915.56173613
Set Approval For...159660032022-11-14 4:51:47617 days ago1668401507IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0003313813.66009781
Set Approval For...158997922022-11-04 22:59:11627 days ago1667602751IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0003470114.30448921
Set Approval For...158765442022-11-01 17:03:23630 days ago1667322203IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0007424730.60633094
Set Approval For...158704602022-10-31 20:34:47631 days ago1667248487IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0006136325.29498207
Set Approval For...158704602022-10-31 20:34:47631 days ago1667248487IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0006139325.29498207
Set Approval For...157005272022-10-08 2:56:59654 days ago1665197819IN
0x7b8fFFB8...2b9387BD7
0 ETH0.000120354.96109638
Set Approval For...152404612022-07-29 23:56:25725 days ago1659138985IN
0x7b8fFFB8...2b9387BD7
0 ETH0.000196758.11074693
Set Approval For...150498482022-06-30 10:12:45754 days ago1656583965IN
0x7b8fFFB8...2b9387BD7
0 ETH0.000780232.16137885
Set Approval For...147172812022-05-05 12:33:03810 days ago1651753983IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0043137493.4054335
Set Approval For...143689122022-03-12 1:11:37865 days ago1647047497IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0005613423.12826391
Set Approval For...142442482022-02-20 17:30:10884 days ago1645378210IN
0x7b8fFFB8...2b9387BD7
0 ETH0.00244839100.92713474
Set Approval For...142424912022-02-20 10:47:21884 days ago1645354041IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0012805152.78532584
Set Approval For...142424912022-02-20 10:47:21884 days ago1645354041IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0012811552.78532584
Set Approval For...142403242022-02-20 2:50:45884 days ago1645325445IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0023190995.59734133
Set Approval For...141725252022-02-09 14:49:38895 days ago1644418178IN
0x7b8fFFB8...2b9387BD7
0 ETH0.00471395102.09773141
Set Approval For...139770062022-01-10 9:39:31925 days ago1641807571IN
0x7b8fFFB8...2b9387BD7
0 ETH0.01353805293.13942604
Set Approval For...138506732021-12-21 20:21:27945 days ago1640118087IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0019363979.82188253
Set Approval For...131390122021-09-01 9:39:191056 days ago1630489159IN
0x7b8fFFB8...2b9387BD7
0 ETH0.0021007586.59697041
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
_512Print

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 25 : 512Print.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '../Variety.sol';
import './Renderer/512PrintRenderer.sol';
import '@openzeppelin/contracts/utils/Strings.sol';

/// @title TheBoard
/// @author Simon Fremaux (@dievardump)
contract _512Print is Variety {
    using Strings for uint256;

    _512PrintRenderer public renderer;

    /// @notice constructor
    /// @param name_ name of the contract (see ERC721)
    /// @param symbol_ symbol of the contract (see ERC721)
    /// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
    /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0)
    /// @param sower_ Sower contract
    constructor(
        string memory name_,
        string memory symbol_,
        string memory contractURI_,
        address openseaProxyRegistry_,
        address sower_,
        address renderer_
    ) Variety(name_, symbol_, contractURI_, openseaProxyRegistry_, sower_) {
        renderer = _512PrintRenderer(renderer_);
    }

    /// @dev internal function to get the name. Should be overrode by actual Variety contract
    /// @param tokenId the token to get the name of
    /// @return seedlingName the token name
    function _getName(uint256 tokenId)
        internal
        view
        override
        returns (string memory seedlingName)
    {
        seedlingName = names[tokenId];
        if (bytes(seedlingName).length == 0) {
            seedlingName = string(
                abi.encodePacked('512Print.sol #', tokenId.toString())
            );
        }
    }

    /// @dev Rendering function; should be overrode by the actual seedling contract
    /// @param tokenId the tokenId
    /// @param seed the seed
    /// @return the json
    function _render(uint256 tokenId, bytes32 seed)
        internal
        view
        virtual
        override
        returns (string memory)
    {
        return
            _512PrintRenderer(renderer).render(
                _getName(tokenId),
                tokenId,
                seed
            );
    }
}

File 2 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 25 : ERC721.sol
// SPDX-License-Identifier: MIT

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: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 overriden 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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @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 of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @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(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 4 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 5 of 25 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 25 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 7 of 25 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 8 of 25 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 9 of 25 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 10 of 25 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 25 : Context.sol
// SPDX-License-Identifier: MIT

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 12 of 25 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 13 of 25 : ERC165.sol
// SPDX-License-Identifier: MIT

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 14 of 25 : IERC165.sol
// SPDX-License-Identifier: MIT

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 15 of 25 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

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

    // 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);
    }

    // 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))));
    }

    // 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 on 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));
    }
}

File 16 of 25 : ERC721Full.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol';

import './ERC721Ownable.sol';
import './ERC721WithRoyalties.sol';

/// @title ERC721Full
/// @dev This contains all the different overrides needed on
///      ERC721 / Enumerable / URIStorage / Royalties
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
    ERC721Ownable,
    ERC721Burnable,
    ERC721WithRoyalties
{
    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Enumerable, ERC721, ERC721WithRoyalties)
        returns (bool)
    {
        return
            // either ERC721Enumerable
            ERC721Enumerable.supportsInterface(interfaceId) ||
            // or Royalties
            ERC721WithRoyalties.supportsInterface(interfaceId);
    }

    /// @inheritdoc	ERC721
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    /// @inheritdoc	ERC721Ownable
    function isApprovedForAll(address owner_, address operator)
        public
        view
        override(ERC721, ERC721Ownable)
        returns (bool)
    {
        return ERC721Ownable.isApprovedForAll(owner_, operator);
    }
}

File 17 of 25 : ERC721Ownable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';

import '../OpenSea/BaseOpenSea.sol';

/// @title ERC721Ownable
/// @author Simon Fremaux (@dievardump)
contract ERC721Ownable is Ownable, ERC721Enumerable, BaseOpenSea {
    /// @notice constructor
    /// @param name_ name of the contract (see ERC721)
    /// @param symbol_ symbol of the contract (see ERC721)
    /// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
    /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0)
    constructor(
        string memory name_,
        string memory symbol_,
        string memory contractURI_,
        address openseaProxyRegistry_
    ) ERC721(name_, symbol_) {
        // set contract uri if present
        if (bytes(contractURI_).length > 0) {
            _setContractURI(contractURI_);
        }

        // set OpenSea proxyRegistry for gas-less trading if present
        if (address(0) != openseaProxyRegistry_) {
            _setOpenSeaRegistry(openseaProxyRegistry_);
        }
    }

    /// @notice Allows gas-less trading on OpenSea by safelisting the Proxy of the user
    /// @dev Override isApprovedForAll to check first if current operator is owner's OpenSea proxy
    /// @inheritdoc	ERC721
    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        // allows gas less trading on OpenSea
        if (isOwnersOpenSeaProxy(owner, operator)) {
            return true;
        }

        return super.isApprovedForAll(owner, operator);
    }

    /// @notice Helper for the owner of the contract to set the new contract URI
    /// @dev needs to be owner
    /// @param contractURI_ new contract URI
    function setContractURI(string memory contractURI_) external onlyOwner {
        _setContractURI(contractURI_);
    }
}

File 18 of 25 : ERC721WithRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '../Royalties/ERC2981/IERC2981Royalties.sol';
import '../Royalties/RaribleSecondarySales/IRaribleSecondarySales.sol';

/// @dev This is a contract used for royalties on various platforms
/// @author Simon Fremaux (@dievardump)
contract ERC721WithRoyalties is IERC2981Royalties, IRaribleSecondarySales {
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            interfaceId == type(IRaribleSecondarySales).interfaceId;
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256)
        public
        view
        virtual
        override
        returns (address _receiver, uint256 _royaltyAmount)
    {
        _receiver = address(this);
        _royaltyAmount = 0;
    }

    /// @inheritdoc	IRaribleSecondarySales
    function getFeeRecipients(uint256 tokenId)
        public
        view
        override
        returns (address payable[] memory recipients)
    {
        // using ERC2981 implementation to get the recipient & amount
        (address recipient, uint256 amount) = royaltyInfo(tokenId, 10000);
        if (amount != 0) {
            recipients = new address payable[](1);
            recipients[0] = payable(recipient);
        }
    }

    /// @inheritdoc	IRaribleSecondarySales
    function getFeeBps(uint256 tokenId)
        public
        view
        override
        returns (uint256[] memory fees)
    {
        // using ERC2981 implementation to get the amount
        (, uint256 amount) = royaltyInfo(tokenId, 10000);
        if (amount != 0) {
            fees = new uint256[](1);
            fees[0] = amount;
        }
    }
}

File 19 of 25 : BaseOpenSea.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title OpenSea contract helper that defines a few things
/// @author Simon Fremaux (@dievardump)
/// @dev This is a contract used to add OpenSea's support
contract BaseOpenSea {
    string private _contractURI;
    ProxyRegistry private _proxyRegistry;

    /// @notice Returns the contract URI function. Used on OpenSea to get details
    //          about a contract (owner, royalties etc...)
    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /// @notice Helper for OpenSea gas-less trading
    /// @dev Allows to check if `operator` is owner's OpenSea proxy
    /// @param owner the owner we check for
    /// @param operator the operator (proxy) we check for
    function isOwnersOpenSeaProxy(address owner, address operator)
        public
        view
        returns (bool)
    {
        ProxyRegistry proxyRegistry = _proxyRegistry;
        return
            // we have a proxy registry address
            address(proxyRegistry) != address(0) &&
            // current operator is owner's proxy address
            address(proxyRegistry.proxies(owner)) == operator;
    }

    /// @dev Internal function to set the _contractURI
    /// @param contractURI_ the new contract uri
    function _setContractURI(string memory contractURI_) internal {
        _contractURI = contractURI_;
    }

    /// @dev Internal function to set the _proxyRegistry
    /// @param proxyRegistryAddress the new proxy registry address
    function _setOpenSeaRegistry(address proxyRegistryAddress) internal {
        _proxyRegistry = ProxyRegistry(proxyRegistryAddress);
    }
}

contract OwnableDelegateProxy {}

contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

File 20 of 25 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _value - the sale price of the NFT asset specified by _tokenId
    /// @return _receiver - address of who should be sent the royalty payment
    /// @return _royaltyAmount - the royalty payment amount for value sale price
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

File 21 of 25 : IRaribleSecondarySales.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IRaribleSecondarySales {
    /// @notice returns a list of royalties recipients
    /// @param tokenId the token Id to check for
    /// @return all the recipients for tokenId
    function getFeeRecipients(uint256 tokenId)
        external
        view
        returns (address payable[] memory);

    /// @notice returns a list of royalties amounts
    /// @param tokenId the token Id to check for
    /// @return all the amounts for tokenId
    function getFeeBps(uint256 tokenId)
        external
        view
        returns (uint256[] memory);
}

File 22 of 25 : Randomize.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// small library to randomize using (min, max, seed, offsetBit etc...)
library Randomize {
    struct Random {
        uint256 seed;
        uint256 offsetBit;
    }

    /// @notice get an random number between (min and max) using seed and offseting bits
    ///         this function assumes that max is never bigger than 0xffffff (hex color with opacity included)
    /// @dev this function is simply used to get random number using a seed.
    ///      if does bitshifting operations to try to reuse the same seed as much as possible.
    ///      should be enough for anyth
    /// @param random the randomizer
    /// @param min the minimum
    /// @param max the maximum
    /// @return result the resulting pseudo random number
    function next(
        Random memory random,
        uint256 min,
        uint256 max
    ) internal pure returns (uint256 result) {
        uint256 newSeed = random.seed;
        uint256 newOffset = random.offsetBit + 3;

        uint256 maxOffset = 4;
        uint256 mask = 0xf;
        if (max > 0xfffff) {
            mask = 0xffffff;
            maxOffset = 24;
        } else if (max > 0xffff) {
            mask = 0xfffff;
            maxOffset = 20;
        } else if (max > 0xfff) {
            mask = 0xffff;
            maxOffset = 16;
        } else if (max > 0xff) {
            mask = 0xfff;
            maxOffset = 12;
        } else if (max > 0xf) {
            mask = 0xff;
            maxOffset = 8;
        }

        // if offsetBit is too high to get the max number
        // just get new seed and restart offset to 0
        if (newOffset > (256 - maxOffset)) {
            newOffset = 0;
            newSeed = uint256(keccak256(abi.encode(newSeed)));
        }

        uint256 offseted = (newSeed >> newOffset);
        uint256 part = offseted & mask;
        result = min + (part % (max - min));

        random.seed = newSeed;
        random.offsetBit = newOffset;
    }

    function nextInt(
        Random memory random,
        uint256 min,
        uint256 max
    ) internal pure returns (int256 result) {
        result = int256(Randomize.next(random, min, max));
    }
}

File 23 of 25 : IVariety.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';

/// @title IVariety interface
/// @author Simon Fremaux (@dievardump)
interface IVariety is IERC721 {
    /// @notice mint `seeds.length` token(s) to `to` using `seeds`
    /// @param to token recipient
    /// @param seeds each token seed
    function plant(address to, bytes32[] memory seeds)
        external
        returns (uint256);

    /// @notice this function returns the seed associated to a tokenId
    /// @param tokenId to get the seed of
    function getTokenSeed(uint256 tokenId) external view returns (bytes32);

    /// @notice This function allows an owner to ask for a seed update
    ///         this can be needed because although I test the contract as much as possible,
    ///         it might be possible that one token does not render because the seed creates
    ///         error or even "out of gas" computation. That's why this would allow an owner
    ///         in such case, to request for a seed change that will then be triggered by Sower
    /// @param tokenId id to regenerate seed for
    function requestSeedChange(uint256 tokenId) external;

    /// @notice This function allows Sower to answer to a seed change request
    ///         in the event where a seed would produce errors of rendering
    ///         1) this function can only be called by Sower if the token owner
    ///         asked for a new seed
    ///         2) this function will only be called if there is a rendering error
    ///         or, Vitalik Buterin forbid, a duplicate
    /// @param tokenId id to regenerate seed for
    function changeSeedAfterRequest(uint256 tokenId) external;
}

File 24 of 25 : 512PrintRenderer.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/Strings.sol';
import '../../../Randomize.sol';

/// @title TheBoard
/// @author Simon Fremaux (@dievardump)
contract _512PrintRenderer {
    using Strings for uint256;
    using Strings for uint16;
    using Strings for uint8;

    using Randomize for Randomize.Random;

    struct Configuration {
        int256 spacing;
        string background1;
        string background2;
        string stroke1;
        string stroke2;
        string background;
        string stroke;
        bool degen;
        bool animated;
        bool backgroundGradient;
        bool strokeGradient;
        bool rotated;
        bool rounded;
        bool missing;
        bytes left;
        bytes right;
    }

    constructor() {}

    function start(bytes32 seed)
        public
        pure
        returns (Randomize.Random memory, Configuration memory)
    {
        Randomize.Random memory random = Randomize.Random({
            seed: uint256(seed),
            offsetBit: 0
        });

        Configuration memory config = _getConfiguration(random);

        return (random, config);
    }

    /// @dev Rendering function; should be overrode by the actual seedling contract
    /// @param tokenId the tokenId
    /// @param seed the seed
    /// @return the json
    function render(
        string memory name,
        uint256 tokenId,
        bytes32 seed
    ) external pure returns (string memory) {
        (Randomize.Random memory random, Configuration memory config) = start(
            seed
        );

        string memory id = uint256(seed).toString();

        bytes memory svg = abi.encodePacked(
            'data:application/json;utf8,{"name":"',
            name,
            '","image":"data:image/svg+xml;utf8,',
            "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1200 1200' width='1200' height='1200'>"
            "<defs><clipPath id='print-clip-",
            id,
            "'><rect x='40' y='40' width='1120' height='1120' /></clipPath>"
        );

        svg = abi.encodePacked(
            svg,
            config.backgroundGradient
                ? string(_renderBackgroundGradient(id, config, random))
                : '',
            config.strokeGradient
                ? string(_renderStrokeGradient(id, config, random))
                : '',
            '</defs>',
            "<rect width='100%' height='100%' fill='",
            config.backgroundGradient
                ? string(abi.encodePacked('url(#print-background-', id, ')'))
                : config.background1,
            "'/><g x='40' y='40' stroke-linecap='round' stroke-width='",
            random.next(1, config.rounded ? 8 : 4).toString(),
            "' stroke='",
            config.strokeGradient
                ? string(abi.encodePacked('url(#print-stroke-', id, ')'))
                : config.stroke1,
            "' fill='",
            config.backgroundGradient
                ? string(abi.encodePacked('url(#print-background-', id, ')'))
                : config.background1,
            "' style='clip-path: url(#print-clip-",
            id,
            ")'>"
        );

        _fill(random, config);

        svg = abi.encodePacked(svg, config.left, config.right);

        svg = abi.encodePacked(
            svg,
            "</g><text text-anchor='end' x='1160' y='1180' fill='",
            config.strokeGradient
                ? string(abi.encodePacked('url(#print-stroke-', id, ')'))
                : config.stroke1,
            "'>#",
            tokenId.toString(),
            '</text></svg>"'
        );

        svg = abi.encodePacked(
            svg,
            ',"license":"Full ownership with unlimited commercial rights.","creator":"@dievardump"'
            ',"description":"Left or Right? Repeat. Add some fun.\\n\\n512Print Seedling is my take on the Solidity version of the renowned 10Print algorithm and the second of the [sol]Seedlings, an experiment of art and collectible NFTs 100% generated with Solidity.\\nby @dievardump\\n\\nLicense: Full ownership with unlimited commercial rights.\\n\\nMore info at https://solSeedlings.art"'
            ',"properties":{"Background":"',
            config.backgroundGradient ? 'Gradient' : 'Unicolor',
            '","Stroke":"',
            config.strokeGradient ? 'Gradient' : 'Unicolor',
            '"'
        );

        svg = abi.encodePacked(
            svg,
            config.degen ? ',"Particularity":"Degen"' : '',
            config.rotated ? ',"Angle":"45deg"' : '',
            config.rounded ? ',"Variante":"Rounded"' : '',
            config.animated ? ',"Rendering":"Animated"' : '',
            '}}'
        );

        return string(svg);
    }

    function _fill(Randomize.Random memory random, Configuration memory config)
        internal
        pure
    {
        if (config.rounded) {
            _renderRounded(random, config);
        } else {
            _renderClassic(random, config);
        }
    }

    function _renderClassic(
        Randomize.Random memory random,
        Configuration memory config
    ) internal pure {
        bytes memory result;
        int256 offset;
        int256 half = config.spacing / 2;
        for (int256 y; y < 1160; y += config.spacing) {
            for (int256 x; x < 1160; x += config.spacing) {
                if (config.missing && random.next(0, 100) < 15) continue;
                if (random.next(0, 2) == 0) {
                    if (!config.degen || random.next(0, 100) >= 10) {
                        result = _getLine(
                            x,
                            config.rotated ? y + half : y,
                            x + config.spacing,
                            config.rotated ? y + half : y + config.spacing,
                            0
                        );
                    } else {
                        offset = (random.nextInt(10, 20) * config.spacing) / 2;
                        result = _getLine(
                            x - offset,
                            config.rotated ? y + half : y - offset,
                            x + offset,
                            config.rotated ? y + half : y + offset,
                            random.next(10, 28)
                        );
                    }

                    config.left = abi.encodePacked(config.left, result);
                } else {
                    if (!config.degen || random.next(0, 100) >= 10) {
                        result = _getLine(
                            config.rotated ? x + half : x,
                            y + config.spacing,
                            config.rotated ? x + half : x + config.spacing,
                            y,
                            0
                        );
                    } else {
                        offset = (random.nextInt(10, 20) * config.spacing) / 2;
                        result = _getLine(
                            config.rotated ? x + half : x - offset,
                            y + offset,
                            config.rotated ? x + half : x + offset,
                            y - offset,
                            random.next(10, 28)
                        );
                    }

                    config.right = abi.encodePacked(config.right, result);
                }
            }
        }
    }

    function _renderRounded(
        Randomize.Random memory random,
        Configuration memory config
    ) internal pure {
        uint256 spacing = uint256(config.spacing);
        string memory half = (spacing / 2).toString();

        bytes memory element;

        // 50% change being round
        string memory strSpacing = spacing.toString();
        bytes memory roundedBase = _getRoundedBase(half, strSpacing);
        bytes memory cross = _getCross(half, strSpacing);
        bytes memory rotate = abi.encodePacked(
            ' rotate(90, ',
            half,
            ', ',
            half,
            ')'
        );

        int256 temp;
        bool doRotate;
        for (int256 y; y < 1160; y += config.spacing) {
            for (int256 x; x < 1160; x += config.spacing) {
                temp = random.nextInt(0, 100);
                if (temp < 50) {
                    element = roundedBase;
                } else {
                    element = cross;
                    if (temp > 83) {
                        element = abi.encodePacked(
                            element,
                            _getRoundedCircle(half, config.spacing / 4)
                        );
                    } else if (temp > 66) {
                        temp = config.animated
                            ? random.nextInt(20, 50)
                            : int256(0);
                        element = abi.encodePacked(
                            element,
                            _getSquare(
                                uint256(config.spacing / 4).toString(),
                                half,
                                uint256(temp)
                            )
                        );
                    }
                }

                doRotate = (random.next(0, 2) == 0);
                temp = random.nextInt(5, 10);
                config.left = abi.encodePacked(
                    config.left,
                    "<g transform='translate(",
                    uint256(x).toString(),
                    ',',
                    uint256(y).toString(),
                    ')',
                    doRotate ? rotate : bytes(''),
                    "' ",
                    config.degen
                        ? abi.encodePacked(
                            " stroke-width='",
                            uint256(temp).toString(),
                            "' "
                        )
                        : bytes(''),
                    '>',
                    element,
                    '</g>'
                );
            }
        }
    }

    function _getCross(string memory half, string memory spacing)
        internal
        pure
        returns (bytes memory svg)
    {
        svg = abi.encodePacked(
            "<line x1='",
            half,
            "' y1='0' x2='",
            half,
            "' y2='",
            spacing,
            "' />",
            "<line x1='0' y1='",
            half,
            "' x2='",
            spacing,
            "' y2='",
            half,
            "' />"
        );
    }

    function _getSquare(
        string memory position,
        string memory size,
        uint256 animation
    ) internal pure returns (bytes memory svg) {
        svg = abi.encodePacked(
            "<rect x='",
            position,
            "' y='",
            position,
            "' width='",
            size,
            "' height='",
            size,
            "' rx='6'>"
        );

        if (animation > 0) {
            svg = abi.encodePacked(
                svg,
                "<animateTransform attributeName='transform' attributeType='XML' type='rotate' dur='",
                animation.toString(),
                "s' from='0 ",
                size,
                ' ',
                size,
                "' to='360 ",
                size,
                ' ',
                size,
                "' repeatCount='indefinite' />"
            );
        }

        svg = abi.encodePacked(svg, '</rect>');
    }

    function _getRoundedCircle(string memory half, int256 size)
        internal
        pure
        returns (bytes memory svg)
    {
        svg = abi.encodePacked(
            "<circle cx='",
            half,
            "' cy='",
            half,
            "' r='",
            uint256(size).toString(),
            "' />"
        );
    }

    function _getRoundedBase(string memory half, string memory spacing)
        internal
        pure
        returns (bytes memory svg)
    {
        svg = abi.encodePacked(
            "<path d='M ",
            half,
            ' 0',
            'a ',
            half,
            ' ',
            half,
            ' 0 0 1 -',
            half,
            ' ',
            half,
            '',
            'm '
        );

        svg = abi.encodePacked(
            svg,
            spacing,
            ' 0',
            'a ',
            half,
            ' ',
            half,
            ' 0 0 0 -',
            half,
            ' ',
            half,
            "' fill='none'/>"
        );
    }

    function _getLine(
        int256 x0,
        int256 y0,
        int256 x1,
        int256 y1,
        uint256 strokeWidth
    ) internal pure returns (bytes memory) {
        return
            abi.encodePacked(
                "<path fill='none' ",
                strokeWidth != 0
                    ? string(
                        abi.encodePacked(
                            "stroke-width='",
                            strokeWidth.toString(),
                            "'"
                        )
                    )
                    : '',
                " d='M",
                x0 < 0
                    ? string(abi.encodePacked('-', uint256(x0 * -1).toString()))
                    : uint256(x0).toString(),
                ',',
                y0 < 0
                    ? string(abi.encodePacked('-', uint256(y0 * -1).toString()))
                    : uint256(y0).toString(),
                'L',
                x1 < 0
                    ? string(abi.encodePacked('-', uint256(x1 * -1).toString()))
                    : uint256(x1).toString(),
                ',',
                y1 < 0
                    ? string(abi.encodePacked('-', uint256(y1 * -1).toString()))
                    : uint256(y1).toString(),
                "'/>"
            );
    }

    function _renderBackgroundGradient(
        string memory id,
        Configuration memory config,
        Randomize.Random memory random
    ) internal pure returns (bytes memory result) {
        uint256 animation = random.next(10000, 20000);
        result = abi.encodePacked(
            "<linearGradient id='print-background-",
            id,
            "' gradientTransform='rotate(",
            random.next(0, 360).toString(),
            ", 600, 600)' gradientUnits='userSpaceOnUse'><stop offset='0%' stop-color='",
            config.background1,
            "'>"
        );

        if (config.animated) {
            result = abi.encodePacked(
                result,
                "<animate attributeName='stop-color' dur='",
                animation.toString(),
                "ms' values='",
                config.background1,
                ';',
                config.background2,
                ';',
                config.background1,
                "' repeatCount='indefinite' />"
            );
        }

        result = abi.encodePacked(
            result,
            "</stop><stop offset='100%' stop-color='",
            config.background2,
            "'>"
        );

        if (config.animated) {
            result = abi.encodePacked(
                result,
                "<animate attributeName='stop-color' dur='",
                animation.toString(),
                "ms' values='",
                config.background2,
                ';',
                config.background1,
                ';',
                config.background2,
                "' repeatCount='indefinite' />"
            );
        }

        return abi.encodePacked(result, '</stop></linearGradient>');
    }

    function _renderStrokeGradient(
        string memory id,
        Configuration memory config,
        Randomize.Random memory random
    ) internal pure returns (bytes memory result) {
        uint256 animation = random.next(10000, 20000);
        result = abi.encodePacked(
            "<linearGradient id='print-stroke-",
            id,
            "' gradientTransform='rotate(",
            random.next(0, 360).toString(),
            ", 600, 600)' gradientUnits='userSpaceOnUse'><stop offset='0%' stop-color='",
            config.stroke1,
            "'>"
        );

        if (config.animated) {
            result = abi.encodePacked(
                result,
                "<animate attributeName='stop-color' dur='",
                animation.toString(),
                "ms' values='",
                config.stroke1,
                ';',
                config.stroke2,
                ';',
                config.stroke1,
                "' repeatCount='indefinite' />"
            );
        }

        result = abi.encodePacked(
            result,
            "</stop><stop offset='100%' stop-color='",
            config.stroke2,
            "'>"
        );

        if (config.animated) {
            result = abi.encodePacked(
                result,
                "<animate attributeName='stop-color' dur='",
                animation.toString(),
                "ms' values='",
                config.stroke2,
                ';',
                config.stroke1,
                ';',
                config.stroke2,
                "' repeatCount='indefinite' />"
            );
        }

        result = abi.encodePacked(result, '</stop></linearGradient>');
    }

    function _getConfiguration(Randomize.Random memory random)
        internal
        pure
        returns (Configuration memory config)
    {
        string[16] memory darker = [
            '#000000',
            '#1A1A2E',
            '#2C061F',
            '#352F44',
            '#1D2D50',
            '#2A363B',
            '#61105E',
            '#84142D',
            '#173F5F',
            '#29435C',
            '#A7226E',
            '#C70D3A',
            '#355C7D',
            '#20639B',
            '#6C5B7B',
            '#2D6E7E'
        ];

        string[20] memory lighter = [
            '#FFFFFF',
            '#E4FBFF',
            '#F7D9D9',
            '#B5EAEA',
            '#00FFF5',
            '#B6C9F0',
            '#FECEAB',
            '#FFF591',
            '#F8B195',
            '#F7DB4F',
            '#FF847C',
            '#3CAEA3',
            '#DA7F8F',
            '#F67280',
            '#2F9599',
            '#F26B38',
            '#C06C84',
            '#ED553B',
            '#E84A5F',
            '#EC2049'
        ];

        bool rounded = (random.next(0, 100) < 33);

        // if not rounded, 5% rotated
        bool rotated = !rounded && (random.next(0, 100) < 5);

        // if rotated; then degen, else 20%
        bool degen = (rotated || (random.next(0, 100) < 20));

        uint256 temp = random.next(0, 100);
        int256 spacing = random.nextInt(rounded ? 120 : 90, 160);
        if (spacing % 2 != 0) {
            spacing++;
        }

        config = Configuration({
            spacing: spacing,
            background1: '#000',
            background2: '#000',
            stroke1: '#fff',
            stroke2: '#fff',
            background: 'Black',
            stroke: 'White',
            degen: degen,
            animated: false,
            backgroundGradient: false,
            strokeGradient: false,
            rotated: rotated,
            missing: !rounded && (random.next(0, 100) < 5),
            left: '',
            right: '',
            rounded: rounded
        });

        if (temp >= 4 && temp < 8) {
            // black on white
            config.background1 = '#fff';
            config.background2 = '#fff';
            config.stroke1 = '#000';
            config.stroke2 = '#000';
            config.background = 'White';
            config.stroke = 'Black';
        } else if (temp < 26) {
            // black on lighter background
            config.background1 = config.background2 = lighter[
                random.next(0, lighter.length)
            ];
            config.stroke1 = '#000';
            config.stroke2 = '#000';

            config.background = 'Lighter';
            config.stroke = 'Black';
        } else if (temp < 44) {
            // white on darker background
            config.background1 = config.background2 = darker[
                random.next(0, darker.length)
            ];
            config.stroke1 = '#fff';
            config.stroke2 = '#fff';

            config.background = 'Darker';
            config.stroke = 'White';
        } else if (temp < 62) {
            // light gradient on black
            config.background1 = '#000';
            config.background2 = '#000';
            temp = random.next(0, lighter.length);
            config.stroke1 = lighter[temp];
            config.stroke2 = lighter[
                (temp + random.next(lighter.length / 2, lighter.length)) %
                    lighter.length
            ];

            config.background = 'Black';
            config.stroke = 'Light gradient';
        } else if (temp < 80) {
            // dark gradient on white
            config.background1 = '#fff';
            config.background2 = '#fff';

            temp = random.next(0, darker.length);
            config.stroke1 = darker[temp];
            config.stroke2 = darker[
                (temp + random.next(darker.length / 2, darker.length)) %
                    darker.length
            ];

            config.background = 'White';
            config.stroke = 'Darker gradient';
        } else if (temp < 90) {
            // dark gradient on light gradient
            temp = random.next(0, lighter.length);
            config.background1 = lighter[temp];
            config.background2 = lighter[
                (temp + random.next(lighter.length / 2, lighter.length)) %
                    lighter.length
            ];
            temp = random.next(0, darker.length);
            config.stroke1 = darker[temp];
            config.stroke2 = darker[
                (temp + random.next(darker.length / 2, darker.length)) %
                    darker.length
            ];

            config.background = 'Lighter gradient';
            config.stroke = 'Darker gradient';
        } else {
            // light gradient on dark gradient
            temp = random.next(0, darker.length);
            config.background1 = darker[temp];
            config.background2 = darker[
                (temp + random.next(darker.length / 2, darker.length)) %
                    darker.length
            ];

            temp = random.next(0, lighter.length);
            config.stroke1 = lighter[temp];
            config.stroke2 = lighter[
                (temp + random.next(lighter.length / 2, lighter.length)) %
                    lighter.length
            ];

            config.background = 'Darker gradient';
            config.stroke = 'Lighter gradient';
        }

        config.backgroundGradient =
            keccak256(abi.encodePacked((config.background1))) !=
            keccak256(abi.encodePacked((config.background2)));
        config.strokeGradient =
            keccak256(abi.encodePacked((config.stroke1))) !=
            keccak256(abi.encodePacked((config.stroke2)));

        // if rounded or gradient, it can be animated
        config.animated =
            (rounded || (config.backgroundGradient || config.strokeGradient)) &&
            (random.next(0, 100) < 10);
    }
}

File 25 of 25 : Variety.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//////************@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/////*******************@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///***********************@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///**************************@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///**********/**************/*@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///////****/****************//@@@@@
// @@@*********@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(///////////*****************//@@@@@@
// @@@**************//////@@@@@@@@@@@@@@@@@@@((////////////***************//@@@@@@@
// @@@*********************////@@@@@@@@@@@@@((///////////////************//@@@@@@@@
// @@@@//**************//***//////@@@@@@@@@@(///////////////////*******//@@@@@@@@@@
// @@@@@/*****************////////((@@@@@@@((///((////////////////***//@@@@@@@@@@@@
// @@@@@@//*************////////////((@@@@@((//((////////////////////@@@@@@@@@@@@@@
// @@@@@@@//**********///////////////((@@@@((((//////////////////@@@@@@@@@@@@@@@@@@
// @@@@@@@@///******//////////////((//((@@@(((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@//*///////////////////(//((@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@////////////////////(((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@/((((/////////////((((/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@((((((((@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@(((((((((((((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@###(((((((((((((((((((((((((###@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@####################################@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@#############################################@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';

import './IVariety.sol';
import '../NFT/ERC721Helpers/ERC721Full.sol';

/// @title Variety Contract
/// @author Simon Fremaux (@dievardump)
contract Variety is IVariety, ERC721Full {
    event SeedChangeRequest(uint256 indexed tokenId, address indexed operator);

    // seedlings Sower
    address public sower;

    // last tokenId
    uint256 public lastTokenId;

    // each token seed
    mapping(uint256 => bytes32) internal tokenSeed;

    // names
    mapping(uint256 => string) public names;

    // useNames
    mapping(bytes32 => bool) public usedNames;

    // tokenIds with a request for seeds change
    mapping(uint256 => bool) internal seedChangeRequests;

    modifier onlySower() {
        require(msg.sender == sower, 'Not Sower.');
        _;
    }

    /// @notice constructor
    /// @param name_ name of the contract (see ERC721)
    /// @param symbol_ symbol of the contract (see ERC721)
    /// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
    /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0)
    /// @param sower_ Sower contract
    constructor(
        string memory name_,
        string memory symbol_,
        string memory contractURI_,
        address openseaProxyRegistry_,
        address sower_
    ) ERC721Ownable(name_, symbol_, contractURI_, openseaProxyRegistry_) {
        sower = sower_;
    }

    /// @notice mint `seeds.length` token(s) to `to` using `seeds`
    /// @param to token recipient
    /// @param seeds each token seed
    function plant(address to, bytes32[] memory seeds)
        external
        override
        onlySower
        returns (uint256)
    {
        uint256 tokenId = lastTokenId;
        for (uint256 i; i < seeds.length; i++) {
            tokenId++;
            _safeMint(to, tokenId);
            tokenSeed[tokenId] = seeds[i];
        }
        lastTokenId = tokenId;

        return tokenId;
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Full, IERC165)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /// @notice tokenURI override that returns a data:json application
    /// @inheritdoc	ERC721
    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(
            _exists(tokenId),
            'ERC721Metadata: URI query for nonexistent token'
        );

        return _render(tokenId, tokenSeed[tokenId]);
    }

    /// @notice ERC2981 support - 4% royalties sent to Sower
    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        public
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        receiver = sower;
        royaltyAmount = (value * 400) / 10000;
    }

    /// @inheritdoc IVariety
    function getTokenSeed(uint256 tokenId)
        external
        view
        override
        returns (bytes32)
    {
        require(_exists(tokenId), 'TokenSeed query for nonexistent token');
        return tokenSeed[tokenId];
    }

    /// @inheritdoc IVariety
    function requestSeedChange(uint256 tokenId) external override {
        require(ownerOf(tokenId) == msg.sender, 'Not token owner.');
        seedChangeRequests[tokenId] = true;
        emit SeedChangeRequest(tokenId, msg.sender);
    }

    /// @inheritdoc IVariety
    function changeSeedAfterRequest(uint256 tokenId)
        external
        override
        onlySower
    {
        require(seedChangeRequests[tokenId] == true, 'No request for token.');
        seedChangeRequests[tokenId] = false;
        tokenSeed[tokenId] = keccak256(
            abi.encode(
                tokenSeed[tokenId],
                block.timestamp,
                block.difficulty,
                blockhash(block.number - 1)
            )
        );
    }

    /// @notice Function allowing an owner to set the seedling name
    ///         User needs to be extra careful. Some characters might completly break the token.
    ///         Since the metadata are generated in the contract.
    ///         if this ever happens, you can simply reset the name to nothing or for something else
    /// @dev sender must be tokenId owner
    /// @param tokenId the token to name
    /// @param seedlingName the name
    function setName(uint256 tokenId, string memory seedlingName) external {
        require(ownerOf(tokenId) == msg.sender, 'Not token owner.');

        bytes32 byteName = keccak256(abi.encodePacked(seedlingName));

        // if the name is not empty, verify it is not used
        if (bytes(seedlingName).length > 0) {
            require(usedNames[byteName] == false, 'Name already used');
            usedNames[byteName] = true;
        }

        // if it already has a name, mark all name as unused
        string memory oldName = names[tokenId];
        if (bytes(oldName).length > 0) {
            byteName = keccak256(abi.encodePacked(oldName));
            usedNames[byteName] = false;
        }

        names[tokenId] = seedlingName;
    }

    /// @notice function to get a token name
    /// @dev token must exist
    /// @param tokenId the token to get the name of
    /// @return the token name
    function getName(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), 'Unknown token');
        return _getName(tokenId);
    }

    /// @dev internal function to get the name. Should be overrode by actual Variety contract
    /// @param tokenId the token to get the name of
    /// @return the token name
    function _getName(uint256 tokenId)
        internal
        view
        virtual
        returns (string memory)
    {
        return bytes(names[tokenId]).length > 0 ? names[tokenId] : 'Variety';
    }

    /// @notice Function allowing to check the rendering for a given seed
    ///         This allows to know what a seed would render without minting
    /// @param seed the seed to render
    /// @return the json
    function renderSeed(bytes32 seed) public view returns (string memory) {
        return _render(0, seed);
    }

    /// @dev Rendering function; should be overrode by the actual seedling contract
    /// @param tokenId the tokenId
    /// @param seed the seed
    /// @return the json
    function _render(uint256 tokenId, bytes32 seed)
        internal
        view
        virtual
        returns (string memory)
    {
        seed;
        return
            string(
                abi.encodePacked(
                    'data:application/json;utf8,{"name":"',
                    _getName(tokenId),
                    '"}'
                )
            );
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"contractURI_","type":"string"},{"internalType":"address","name":"openseaProxyRegistry_","type":"address"},{"internalType":"address","name":"sower_","type":"address"},{"internalType":"address","name":"renderer_","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"SeedChangeRequest","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":[{"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":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"changeSeedAfterRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"tokenId","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"fees","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenSeed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isOwnersOpenSeaProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"names","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"seeds","type":"bytes32[]"}],"name":"plant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seed","type":"bytes32"}],"name":"renderSeed","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract _512PrintRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"requestSeedChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"seedlingName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sower","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":"bytes32","name":"","type":"bytes32"}],"name":"usedNames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162002ebc38038062002ebc8339810160408190526200003491620002db565b85858585858484848483836200004a33620000fc565b81516200005f90600190602085019062000165565b5080516200007590600290602084019062000165565b505082511590506200008c576200008c826200014c565b6001600160a01b03811615620000b857600c80546001600160a01b0319166001600160a01b0383161790555b5050600d80546001600160a01b039485166001600160a01b031991821617909155601380549990941698169790971790915550620003f29950505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200016190600b90602084019062000165565b5050565b82805462000173906200039f565b90600052602060002090601f016020900481019282620001975760008555620001e2565b82601f10620001b257805160ff1916838001178555620001e2565b82800160010185558215620001e2579182015b82811115620001e2578251825591602001919060010190620001c5565b50620001f0929150620001f4565b5090565b5b80821115620001f05760008155600101620001f5565b80516001600160a01b03811681146200022357600080fd5b919050565b600082601f83011262000239578081fd5b81516001600160401b0380821115620002565762000256620003dc565b604051601f8301601f19908116603f01168101908282118183101715620002815762000281620003dc565b816040528381526020925086838588010111156200029d578485fd5b8491505b83821015620002c05785820183015181830184015290820190620002a1565b83821115620002d157848385830101525b9695505050505050565b60008060008060008060c08789031215620002f4578182fd5b86516001600160401b03808211156200030b578384fd5b620003198a838b0162000228565b975060208901519150808211156200032f578384fd5b6200033d8a838b0162000228565b9650604089015191508082111562000353578384fd5b506200036289828a0162000228565b94505062000373606088016200020b565b925062000383608088016200020b565b91506200039360a088016200020b565b90509295509295509295565b600181811c90821680620003b457607f821691505b60208210811415620003d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b612aba80620004026000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c8063715018a611610130578063b9c4d9fb116100b8578063e8a3d4851161007c578063e8a3d4851461050b578063e985e9c514610513578063f2fde38b14610526578063f84ddf0b14610539578063fe55932a1461054257600080fd5b8063b9c4d9fb1461049f578063bc36ff81146104bf578063bf40e75c146104d2578063c7a53af0146104e5578063c87b56dd146104f857600080fd5b8063938e3d7b116100ff578063938e3d7b1461044b57806395d89b411461045e578063a22cb46514610466578063a5004d9814610479578063b88d4fde1461048c57600080fd5b8063715018a6146103fc578063750af3ab146104045780638ada6b0f146104275780638da5cb5b1461043a57600080fd5b80632f745c59116101be5780635a4c1624116101825780635a4c16241461039d5780636102de98146103b05780636352211e146103c35780636b8ff574146103d657806370a08231146103e957600080fd5b80632f745c591461033e57806342842e0e1461035157806342966c68146103645780634622ab03146103775780634f6ccce71461038a57600080fd5b8063095ea7b311610205578063095ea7b3146102b45780630ebd4c7f146102c757806318160ddd146102e757806323b872dd146102f95780632a55205a1461030c57600080fd5b806301ffc9a71461023757806304d884961461025f57806306fdde0314610274578063081812fc14610289575b600080fd5b61024a61024536600461251c565b610555565b60405190151581526020015b60405180910390f35b61027261026d366004612504565b610566565b005b61027c610604565b60405161025691906127bc565b61029c610297366004612504565b610696565b6040516001600160a01b039091168152602001610256565b6102726102c23660046124d9565b61071e565b6102da6102d5366004612504565b610834565b6040516102569190612784565b6009545b604051908152602001610256565b61027261030736600461232e565b6108a2565b61031f61031a36600461265b565b6108d4565b604080516001600160a01b039093168352602083019190915201610256565b6102eb61034c3660046124d9565b610904565b61027261035f36600461232e565b61099a565b610272610372366004612504565b6109b5565b61027c610385366004612504565b610a2f565b6102eb610398366004612504565b610ac9565b6102eb6103ab366004612504565b610b6a565b61024a6103be3660046122f6565b610be2565b61029c6103d1366004612504565b610c8c565b61027c6103e4366004612504565b610d03565b6102eb6103f73660046122da565b610d53565b610272610dda565b61024a610412366004612504565b60116020526000908152604090205460ff1681565b60135461029c906001600160a01b031681565b6000546001600160a01b031661029c565b610272610459366004612570565b610e10565b61027c610e43565b6102726104743660046124a8565b610e52565b6102eb6104873660046123eb565b610f17565b61027261049a36600461236e565b610fe2565b6104b26104ad366004612504565b61101a565b6040516102569190612737565b61027c6104cd366004612504565b6110a1565b6102726104e0366004612504565b6110ae565b600d5461029c906001600160a01b031681565b61027c610506366004612504565b6111c6565b61027c61124f565b61024a6105213660046122f6565b61125e565b6102726105343660046122da565b611271565b6102eb600e5481565b610272610550366004612616565b611309565b600061056082611507565b92915050565b3361057082610c8c565b6001600160a01b0316146105be5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b606060018054610613906129b3565b80601f016020809104026020016040519081016040528092919081815260200182805461063f906129b3565b801561068c5780601f106106615761010080835404028352916020019161068c565b820191906000526020600020905b81548152906001019060200180831161066f57829003601f168201915b5050505050905090565b60006106a182611521565b6107025760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b5565b506000908152600560205260409020546001600160a01b031690565b600061072982610c8c565b9050806001600160a01b0316836001600160a01b031614156107975760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105b5565b336001600160a01b03821614806107b357506107b3813361125e565b6108255760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105b5565b61082f838361153e565b505050565b60606000610844836127106108d4565b915050801561089c576040805160018082528183019092529060208083019080368337019050509150808260008151811061088f57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b6108ad335b826115ac565b6108c95760405162461bcd60e51b81526004016105b59061287b565b61082f83838361166e565b600d546001600160a01b031660006127106108f184610190612951565b6108fb919061293d565b90509250929050565b600061090f83610d53565b82106109715760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105b5565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61082f83838360405180602001604052806000815250610fe2565b6109be336108a7565b610a235760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b60648201526084016105b5565b610a2c81611819565b50565b60106020526000908152604090208054610a48906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a74906129b3565b8015610ac15780601f10610a9657610100808354040283529160200191610ac1565b820191906000526020600020905b815481529060010190602001808311610aa457829003601f168201915b505050505081565b6000610ad460095490565b8210610b375760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105b5565b60098281548110610b5857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610b7582611521565b610bcf5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b60648201526084016105b5565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610c84575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610c4157600080fd5b505afa158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c799190612554565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105605760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105b5565b6060610d0e82611521565b610d4a5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b60448201526064016105b5565b610560826118c0565b60006001600160a01b038216610dbe5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105b5565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314610e045760405162461bcd60e51b81526004016105b590612846565b610e0e6000611997565b565b6000546001600160a01b03163314610e3a5760405162461bcd60e51b81526004016105b590612846565b610a2c816119e7565b606060028054610613906129b3565b6001600160a01b038216331415610eab5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b5565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b03163314610f615760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b60448201526064016105b5565b600e5460005b8351811015610fd55781610f7a816129e8565b925050610f8785836119fe565b838181518110610fa757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000848152600f90925260409091205580610fcd816129e8565b915050610f67565b50600e8190559392505050565b610fec33836115ac565b6110085760405162461bcd60e51b81526004016105b59061287b565b61101484848484611a18565b50505050565b606060008061102b846127106108d4565b915091508060001461109a576040805160018082528183019092529060208083019080368337019050509250818360008151811061107957634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b6060610560600083611a4b565b600d546001600160a01b031633146110f55760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b60448201526064016105b5565b60008181526012602052604090205460ff1615156001146111505760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b60448201526064016105b5565b6000818152601260209081526040808320805460ff19169055600f909152902054424461117e600143612970565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606111d182611521565b6112355760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105b5565b6000828152600f6020526040902054610560908390611a4b565b6060600b8054610613906129b3565b600061126a8383611adc565b9392505050565b6000546001600160a01b0316331461129b5760405162461bcd60e51b81526004016105b590612846565b6001600160a01b0381166113005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b5565b610a2c81611997565b3361131383610c8c565b6001600160a01b03161461135c5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064016105b5565b60008160405160200161136f91906126a8565b6040516020818303038152906040528051906020012090506000825111156113fe5760008181526011602052604090205460ff16156113e45760405162461bcd60e51b815260206004820152601160248201527013985b5948185b1c9958591e481d5cd959607a1b60448201526064016105b5565b6000818152601160205260409020805460ff191660011790555b60008381526010602052604081208054611417906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611443906129b3565b80156114905780601f1061146557610100808354040283529160200191611490565b820191906000526020600020905b81548152906001019060200180831161147357829003601f168201915b505050505090506000815111156114e157806040516020016114b291906126a8565b60408051601f198184030181529181528151602092830120600081815260119093529120805460ff1916905591505b60008481526010602090815260409091208451611500928601906121e4565b5050505050565b600061151282611b23565b80610560575061056082611b48565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061157382610c8c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006115b782611521565b6116185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b5565b600061162383610c8c565b9050806001600160a01b0316846001600160a01b0316148061165e5750836001600160a01b031661165384610696565b6001600160a01b0316145b80610c845750610c84818561125e565b826001600160a01b031661168182610c8c565b6001600160a01b0316146116e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105b5565b6001600160a01b03821661174b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b5565b611756838383611b7e565b61176160008261153e565b6001600160a01b038316600090815260046020526040812080546001929061178a908490612970565b90915550506001600160a01b03821660009081526004602052604081208054600192906117b8908490612925565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061182482610c8c565b905061183281600084611b7e565b61183d60008361153e565b6001600160a01b0381166000908152600460205260408120805460019290611866908490612970565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906118dd906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611909906129b3565b80156119565780601f1061192b57610100808354040283529160200191611956565b820191906000526020600020905b81548152906001019060200180831161193957829003601f168201915b505050505090508051600014156119925761197082611b89565b60405160200161198091906126c4565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516119fa90600b9060208401906121e4565b5050565b6119fa828260405180602001604052806000815250611ca3565b611a2384848461166e565b611a2f84848484611cd6565b6110145760405162461bcd60e51b81526004016105b5906127f4565b6013546060906001600160a01b03166331b05f61611a68856118c0565b85856040518463ffffffff1660e01b8152600401611a88939291906127cf565b60006040518083038186803b158015611aa057600080fd5b505afa158015611ab4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261126a91908101906125a3565b6000611ae88383610be2565b15611af557506001610560565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff1661126a565b60006001600160e01b0319821663780e9d6360e01b1480610560575061056082611de3565b60006001600160e01b0319821663152a902d60e11b148061056057506001600160e01b03198216632dde656160e21b1492915050565b61082f838383611e33565b606081611bad5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611bd75780611bc1816129e8565b9150611bd09050600a8361293d565b9150611bb1565b60008167ffffffffffffffff811115611c0057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c2a576020820181803683370190505b5090505b8415610c8457611c3f600183612970565b9150611c4c600a86612a03565b611c57906030612925565b60f81b818381518110611c7a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611c9c600a8661293d565b9450611c2e565b611cad8383611eeb565b611cba6000848484611cd6565b61082f5760405162461bcd60e51b81526004016105b5906127f4565b60006001600160a01b0384163b15611dd857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d1a9033908990889088906004016126fa565b602060405180830381600087803b158015611d3457600080fd5b505af1925050508015611d64575060408051601f3d908101601f19168201909252611d6191810190612538565b60015b611dbe573d808015611d92576040519150601f19603f3d011682016040523d82523d6000602084013e611d97565b606091505b508051611db65760405162461bcd60e51b81526004016105b5906127f4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610c84565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b1480611e1457506001600160e01b03198216635b5e139f60e01b145b8061056057506301ffc9a760e01b6001600160e01b0319831614610560565b6001600160a01b038316611e8e57611e8981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b611eb1565b816001600160a01b0316836001600160a01b031614611eb157611eb1838261202a565b6001600160a01b038216611ec85761082f816120c7565b826001600160a01b0316826001600160a01b03161461082f5761082f82826121a0565b6001600160a01b038216611f415760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b5565b611f4a81611521565b15611f975760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b5565b611fa360008383611b7e565b6001600160a01b0382166000908152600460205260408120805460019290611fcc908490612925565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161203784610d53565b6120419190612970565b600083815260086020526040902054909150808214612094576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906120d990600190612970565b6000838152600a60205260408120546009805493945090928490811061210f57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061213e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061218457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006121ab83610d53565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546121f0906129b3565b90600052602060002090601f0160209004810192826122125760008555612258565b82601f1061222b57805160ff1916838001178555612258565b82800160010185558215612258579182015b8281111561225857825182559160200191906001019061223d565b50612264929150612268565b5090565b5b808211156122645760008155600101612269565b600061229061228b846128fd565b6128cc565b90508281528383830111156122a457600080fd5b828260208301376000602084830101529392505050565b600082601f8301126122cb578081fd5b61126a8383356020850161227d565b6000602082840312156122eb578081fd5b813561126a81612a59565b60008060408385031215612308578081fd5b823561231381612a59565b9150602083013561232381612a59565b809150509250929050565b600080600060608486031215612342578081fd5b833561234d81612a59565b9250602084013561235d81612a59565b929592945050506040919091013590565b60008060008060808587031215612383578081fd5b843561238e81612a59565b9350602085013561239e81612a59565b925060408501359150606085013567ffffffffffffffff8111156123c0578182fd5b8501601f810187136123d0578182fd5b6123df8782356020840161227d565b91505092959194509250565b600080604083850312156123fd578182fd5b823561240881612a59565b915060208381013567ffffffffffffffff80821115612425578384fd5b818601915086601f830112612438578384fd5b81358181111561244a5761244a612a43565b8060051b915061245b8483016128cc565b8181528481019084860184860187018b1015612475578788fd5b8795505b83861015612497578035835260019590950194918601918601612479565b508096505050505050509250929050565b600080604083850312156124ba578182fd5b82356124c581612a59565b915060208301358015158114612323578182fd5b600080604083850312156124eb578182fd5b82356124f681612a59565b946020939093013593505050565b600060208284031215612515578081fd5b5035919050565b60006020828403121561252d578081fd5b813561126a81612a6e565b600060208284031215612549578081fd5b815161126a81612a6e565b600060208284031215612565578081fd5b815161126a81612a59565b600060208284031215612581578081fd5b813567ffffffffffffffff811115612597578182fd5b610c84848285016122bb565b6000602082840312156125b4578081fd5b815167ffffffffffffffff8111156125ca578182fd5b8201601f810184136125da578182fd5b80516125e861228b826128fd565b8181528560208385010111156125fc578384fd5b61260d826020830160208601612987565b95945050505050565b60008060408385031215612628578182fd5b82359150602083013567ffffffffffffffff811115612645578182fd5b612651858286016122bb565b9150509250929050565b6000806040838503121561266d578182fd5b50508035926020909101359150565b60008151808452612694816020860160208601612987565b601f01601f19169290920160200192915050565b600082516126ba818460208701612987565b9190910192915050565b6d3531325072696e742e736f6c202360901b8152600082516126ed81600e850160208701612987565b91909101600e0192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061272d9083018461267c565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156127785783516001600160a01b031683529284019291840191600101612753565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612778578351835292840192918401916001016127a0565b60208152600061126a602083018461267c565b6060815260006127e2606083018661267c565b60208301949094525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156128f5576128f5612a43565b604052919050565b600067ffffffffffffffff82111561291757612917612a43565b50601f01601f191660200190565b6000821982111561293857612938612a17565b500190565b60008261294c5761294c612a2d565b500490565b600081600019048311821515161561296b5761296b612a17565b500290565b60008282101561298257612982612a17565b500390565b60005b838110156129a257818101518382015260200161298a565b838111156110145750506000910152565b600181811c908216806129c757607f821691505b6020821081141561089c57634e487b7160e01b600052602260045260246000fd5b60006000198214156129fc576129fc612a17565b5060010190565b600082612a1257612a12612a2d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a2c57600080fd5b6001600160e01b031981168114610a2c57600080fdfea26469706673582212201893e95e18917a794c8d8b83c77dea7f356090a6d7b67c8dfcb05b79320d3b2364736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de81000000000000000000000000000000000000000000000000000000000000001d3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000000000000000000000000000000000000000000000000000000000000000000653534753233100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f3531325072696e742e6a736f6e000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102325760003560e01c8063715018a611610130578063b9c4d9fb116100b8578063e8a3d4851161007c578063e8a3d4851461050b578063e985e9c514610513578063f2fde38b14610526578063f84ddf0b14610539578063fe55932a1461054257600080fd5b8063b9c4d9fb1461049f578063bc36ff81146104bf578063bf40e75c146104d2578063c7a53af0146104e5578063c87b56dd146104f857600080fd5b8063938e3d7b116100ff578063938e3d7b1461044b57806395d89b411461045e578063a22cb46514610466578063a5004d9814610479578063b88d4fde1461048c57600080fd5b8063715018a6146103fc578063750af3ab146104045780638ada6b0f146104275780638da5cb5b1461043a57600080fd5b80632f745c59116101be5780635a4c1624116101825780635a4c16241461039d5780636102de98146103b05780636352211e146103c35780636b8ff574146103d657806370a08231146103e957600080fd5b80632f745c591461033e57806342842e0e1461035157806342966c68146103645780634622ab03146103775780634f6ccce71461038a57600080fd5b8063095ea7b311610205578063095ea7b3146102b45780630ebd4c7f146102c757806318160ddd146102e757806323b872dd146102f95780632a55205a1461030c57600080fd5b806301ffc9a71461023757806304d884961461025f57806306fdde0314610274578063081812fc14610289575b600080fd5b61024a61024536600461251c565b610555565b60405190151581526020015b60405180910390f35b61027261026d366004612504565b610566565b005b61027c610604565b60405161025691906127bc565b61029c610297366004612504565b610696565b6040516001600160a01b039091168152602001610256565b6102726102c23660046124d9565b61071e565b6102da6102d5366004612504565b610834565b6040516102569190612784565b6009545b604051908152602001610256565b61027261030736600461232e565b6108a2565b61031f61031a36600461265b565b6108d4565b604080516001600160a01b039093168352602083019190915201610256565b6102eb61034c3660046124d9565b610904565b61027261035f36600461232e565b61099a565b610272610372366004612504565b6109b5565b61027c610385366004612504565b610a2f565b6102eb610398366004612504565b610ac9565b6102eb6103ab366004612504565b610b6a565b61024a6103be3660046122f6565b610be2565b61029c6103d1366004612504565b610c8c565b61027c6103e4366004612504565b610d03565b6102eb6103f73660046122da565b610d53565b610272610dda565b61024a610412366004612504565b60116020526000908152604090205460ff1681565b60135461029c906001600160a01b031681565b6000546001600160a01b031661029c565b610272610459366004612570565b610e10565b61027c610e43565b6102726104743660046124a8565b610e52565b6102eb6104873660046123eb565b610f17565b61027261049a36600461236e565b610fe2565b6104b26104ad366004612504565b61101a565b6040516102569190612737565b61027c6104cd366004612504565b6110a1565b6102726104e0366004612504565b6110ae565b600d5461029c906001600160a01b031681565b61027c610506366004612504565b6111c6565b61027c61124f565b61024a6105213660046122f6565b61125e565b6102726105343660046122da565b611271565b6102eb600e5481565b610272610550366004612616565b611309565b600061056082611507565b92915050565b3361057082610c8c565b6001600160a01b0316146105be5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b606060018054610613906129b3565b80601f016020809104026020016040519081016040528092919081815260200182805461063f906129b3565b801561068c5780601f106106615761010080835404028352916020019161068c565b820191906000526020600020905b81548152906001019060200180831161066f57829003601f168201915b5050505050905090565b60006106a182611521565b6107025760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b5565b506000908152600560205260409020546001600160a01b031690565b600061072982610c8c565b9050806001600160a01b0316836001600160a01b031614156107975760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105b5565b336001600160a01b03821614806107b357506107b3813361125e565b6108255760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105b5565b61082f838361153e565b505050565b60606000610844836127106108d4565b915050801561089c576040805160018082528183019092529060208083019080368337019050509150808260008151811061088f57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b6108ad335b826115ac565b6108c95760405162461bcd60e51b81526004016105b59061287b565b61082f83838361166e565b600d546001600160a01b031660006127106108f184610190612951565b6108fb919061293d565b90509250929050565b600061090f83610d53565b82106109715760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105b5565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61082f83838360405180602001604052806000815250610fe2565b6109be336108a7565b610a235760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b60648201526084016105b5565b610a2c81611819565b50565b60106020526000908152604090208054610a48906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a74906129b3565b8015610ac15780601f10610a9657610100808354040283529160200191610ac1565b820191906000526020600020905b815481529060010190602001808311610aa457829003601f168201915b505050505081565b6000610ad460095490565b8210610b375760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105b5565b60098281548110610b5857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610b7582611521565b610bcf5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b60648201526084016105b5565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610c84575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610c4157600080fd5b505afa158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c799190612554565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105605760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105b5565b6060610d0e82611521565b610d4a5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b60448201526064016105b5565b610560826118c0565b60006001600160a01b038216610dbe5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105b5565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314610e045760405162461bcd60e51b81526004016105b590612846565b610e0e6000611997565b565b6000546001600160a01b03163314610e3a5760405162461bcd60e51b81526004016105b590612846565b610a2c816119e7565b606060028054610613906129b3565b6001600160a01b038216331415610eab5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b5565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b03163314610f615760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b60448201526064016105b5565b600e5460005b8351811015610fd55781610f7a816129e8565b925050610f8785836119fe565b838181518110610fa757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000848152600f90925260409091205580610fcd816129e8565b915050610f67565b50600e8190559392505050565b610fec33836115ac565b6110085760405162461bcd60e51b81526004016105b59061287b565b61101484848484611a18565b50505050565b606060008061102b846127106108d4565b915091508060001461109a576040805160018082528183019092529060208083019080368337019050509250818360008151811061107957634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b6060610560600083611a4b565b600d546001600160a01b031633146110f55760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b60448201526064016105b5565b60008181526012602052604090205460ff1615156001146111505760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b60448201526064016105b5565b6000818152601260209081526040808320805460ff19169055600f909152902054424461117e600143612970565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606111d182611521565b6112355760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105b5565b6000828152600f6020526040902054610560908390611a4b565b6060600b8054610613906129b3565b600061126a8383611adc565b9392505050565b6000546001600160a01b0316331461129b5760405162461bcd60e51b81526004016105b590612846565b6001600160a01b0381166113005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b5565b610a2c81611997565b3361131383610c8c565b6001600160a01b03161461135c5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064016105b5565b60008160405160200161136f91906126a8565b6040516020818303038152906040528051906020012090506000825111156113fe5760008181526011602052604090205460ff16156113e45760405162461bcd60e51b815260206004820152601160248201527013985b5948185b1c9958591e481d5cd959607a1b60448201526064016105b5565b6000818152601160205260409020805460ff191660011790555b60008381526010602052604081208054611417906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611443906129b3565b80156114905780601f1061146557610100808354040283529160200191611490565b820191906000526020600020905b81548152906001019060200180831161147357829003601f168201915b505050505090506000815111156114e157806040516020016114b291906126a8565b60408051601f198184030181529181528151602092830120600081815260119093529120805460ff1916905591505b60008481526010602090815260409091208451611500928601906121e4565b5050505050565b600061151282611b23565b80610560575061056082611b48565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061157382610c8c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006115b782611521565b6116185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b5565b600061162383610c8c565b9050806001600160a01b0316846001600160a01b0316148061165e5750836001600160a01b031661165384610696565b6001600160a01b0316145b80610c845750610c84818561125e565b826001600160a01b031661168182610c8c565b6001600160a01b0316146116e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105b5565b6001600160a01b03821661174b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b5565b611756838383611b7e565b61176160008261153e565b6001600160a01b038316600090815260046020526040812080546001929061178a908490612970565b90915550506001600160a01b03821660009081526004602052604081208054600192906117b8908490612925565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061182482610c8c565b905061183281600084611b7e565b61183d60008361153e565b6001600160a01b0381166000908152600460205260408120805460019290611866908490612970565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906118dd906129b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611909906129b3565b80156119565780601f1061192b57610100808354040283529160200191611956565b820191906000526020600020905b81548152906001019060200180831161193957829003601f168201915b505050505090508051600014156119925761197082611b89565b60405160200161198091906126c4565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516119fa90600b9060208401906121e4565b5050565b6119fa828260405180602001604052806000815250611ca3565b611a2384848461166e565b611a2f84848484611cd6565b6110145760405162461bcd60e51b81526004016105b5906127f4565b6013546060906001600160a01b03166331b05f61611a68856118c0565b85856040518463ffffffff1660e01b8152600401611a88939291906127cf565b60006040518083038186803b158015611aa057600080fd5b505afa158015611ab4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261126a91908101906125a3565b6000611ae88383610be2565b15611af557506001610560565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff1661126a565b60006001600160e01b0319821663780e9d6360e01b1480610560575061056082611de3565b60006001600160e01b0319821663152a902d60e11b148061056057506001600160e01b03198216632dde656160e21b1492915050565b61082f838383611e33565b606081611bad5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611bd75780611bc1816129e8565b9150611bd09050600a8361293d565b9150611bb1565b60008167ffffffffffffffff811115611c0057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c2a576020820181803683370190505b5090505b8415610c8457611c3f600183612970565b9150611c4c600a86612a03565b611c57906030612925565b60f81b818381518110611c7a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611c9c600a8661293d565b9450611c2e565b611cad8383611eeb565b611cba6000848484611cd6565b61082f5760405162461bcd60e51b81526004016105b5906127f4565b60006001600160a01b0384163b15611dd857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d1a9033908990889088906004016126fa565b602060405180830381600087803b158015611d3457600080fd5b505af1925050508015611d64575060408051601f3d908101601f19168201909252611d6191810190612538565b60015b611dbe573d808015611d92576040519150601f19603f3d011682016040523d82523d6000602084013e611d97565b606091505b508051611db65760405162461bcd60e51b81526004016105b5906127f4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610c84565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b1480611e1457506001600160e01b03198216635b5e139f60e01b145b8061056057506301ffc9a760e01b6001600160e01b0319831614610560565b6001600160a01b038316611e8e57611e8981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b611eb1565b816001600160a01b0316836001600160a01b031614611eb157611eb1838261202a565b6001600160a01b038216611ec85761082f816120c7565b826001600160a01b0316826001600160a01b03161461082f5761082f82826121a0565b6001600160a01b038216611f415760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b5565b611f4a81611521565b15611f975760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b5565b611fa360008383611b7e565b6001600160a01b0382166000908152600460205260408120805460019290611fcc908490612925565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161203784610d53565b6120419190612970565b600083815260086020526040902054909150808214612094576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906120d990600190612970565b6000838152600a60205260408120546009805493945090928490811061210f57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061213e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061218457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006121ab83610d53565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546121f0906129b3565b90600052602060002090601f0160209004810192826122125760008555612258565b82601f1061222b57805160ff1916838001178555612258565b82800160010185558215612258579182015b8281111561225857825182559160200191906001019061223d565b50612264929150612268565b5090565b5b808211156122645760008155600101612269565b600061229061228b846128fd565b6128cc565b90508281528383830111156122a457600080fd5b828260208301376000602084830101529392505050565b600082601f8301126122cb578081fd5b61126a8383356020850161227d565b6000602082840312156122eb578081fd5b813561126a81612a59565b60008060408385031215612308578081fd5b823561231381612a59565b9150602083013561232381612a59565b809150509250929050565b600080600060608486031215612342578081fd5b833561234d81612a59565b9250602084013561235d81612a59565b929592945050506040919091013590565b60008060008060808587031215612383578081fd5b843561238e81612a59565b9350602085013561239e81612a59565b925060408501359150606085013567ffffffffffffffff8111156123c0578182fd5b8501601f810187136123d0578182fd5b6123df8782356020840161227d565b91505092959194509250565b600080604083850312156123fd578182fd5b823561240881612a59565b915060208381013567ffffffffffffffff80821115612425578384fd5b818601915086601f830112612438578384fd5b81358181111561244a5761244a612a43565b8060051b915061245b8483016128cc565b8181528481019084860184860187018b1015612475578788fd5b8795505b83861015612497578035835260019590950194918601918601612479565b508096505050505050509250929050565b600080604083850312156124ba578182fd5b82356124c581612a59565b915060208301358015158114612323578182fd5b600080604083850312156124eb578182fd5b82356124f681612a59565b946020939093013593505050565b600060208284031215612515578081fd5b5035919050565b60006020828403121561252d578081fd5b813561126a81612a6e565b600060208284031215612549578081fd5b815161126a81612a6e565b600060208284031215612565578081fd5b815161126a81612a59565b600060208284031215612581578081fd5b813567ffffffffffffffff811115612597578182fd5b610c84848285016122bb565b6000602082840312156125b4578081fd5b815167ffffffffffffffff8111156125ca578182fd5b8201601f810184136125da578182fd5b80516125e861228b826128fd565b8181528560208385010111156125fc578384fd5b61260d826020830160208601612987565b95945050505050565b60008060408385031215612628578182fd5b82359150602083013567ffffffffffffffff811115612645578182fd5b612651858286016122bb565b9150509250929050565b6000806040838503121561266d578182fd5b50508035926020909101359150565b60008151808452612694816020860160208601612987565b601f01601f19169290920160200192915050565b600082516126ba818460208701612987565b9190910192915050565b6d3531325072696e742e736f6c202360901b8152600082516126ed81600e850160208701612987565b91909101600e0192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061272d9083018461267c565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156127785783516001600160a01b031683529284019291840191600101612753565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612778578351835292840192918401916001016127a0565b60208152600061126a602083018461267c565b6060815260006127e2606083018661267c565b60208301949094525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156128f5576128f5612a43565b604052919050565b600067ffffffffffffffff82111561291757612917612a43565b50601f01601f191660200190565b6000821982111561293857612938612a17565b500190565b60008261294c5761294c612a2d565b500490565b600081600019048311821515161561296b5761296b612a17565b500290565b60008282101561298257612982612a17565b500390565b60005b838110156129a257818101518382015260200161298a565b838111156110145750506000910152565b600181811c908216806129c757607f821691505b6020821081141561089c57634e487b7160e01b600052602260045260246000fd5b60006000198214156129fc576129fc612a17565b5060010190565b600082612a1257612a12612a2d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a2c57600080fd5b6001600160e01b031981168114610a2c57600080fdfea26469706673582212201893e95e18917a794c8d8b83c77dea7f356090a6d7b67c8dfcb05b79320d3b2364736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de81000000000000000000000000000000000000000000000000000000000000001d3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000000000000000000000000000000000000000000000000000000000000000000653534753233100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f3531325072696e742e6a736f6e000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): 512Print.sol - [sol]Seedlings
Arg [1] : symbol_ (string): SSGS#1
Arg [2] : contractURI_ (string): ipfs://ipfs/QmWQ2V2KiSjDQQJbK4htkARiwBcmtVsGayNBqzWYKCHkt1/512Print.json
Arg [3] : openseaProxyRegistry_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [4] : sower_ (address): 0x2B0F5A983316b4Fc980500b3e973D58765770BD2
Arg [5] : renderer_ (address): 0xb630a6691EF2c2Cf4b66f98Bcd4bDC6f8d55dE81

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [4] : 0000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2
Arg [5] : 000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de81
Arg [6] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [7] : 3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 5353475323310000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000048
Arg [11] : 697066733a2f2f697066732f516d57513256324b69536a4451514a624b346874
Arg [12] : 6b4152697742636d7456734761794e42717a57594b43486b74312f3531325072
Arg [13] : 696e742e6a736f6e000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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