Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
486 SSGS#1
Holders
271
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 SSGS#1Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
_512PrintRepot
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '../VarietyRepot.sol'; import '../IRenderer.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; /// @title _512PrintRepot /// @author Simon Fremaux (@dievardump) contract _512PrintRepot is VarietyRepot { using Strings for uint256; IRenderer 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 /// @param renderer_ the renderer contract /// @param oldContract_ the oldContract for migration constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_, address sower_, address renderer_, address oldContract_ ) VarietyRepot( name_, symbol_, contractURI_, openseaProxyRegistry_, sower_, oldContract_ ) { renderer = IRenderer(renderer_); } /// @notice This function is a function that allows to update the current renderer /// to a version where "rounded-stroke-gradient" misprints are fixed /// this function will only be called in the case of a positive vote from 512Print holders function updateRenderer(address newRenderer) external onlyOwner { renderer = IRenderer(newRenderer); } /// @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 IRenderer(renderer).render(_getName(tokenId), tokenId, seed); } }
// 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); } }
// 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 {} }
// 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; }
// 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); }
// 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); } }
// 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(); } }
// 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); }
// 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); }
// 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); } } } }
// 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; } }
// 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); } }
// 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; } }
// 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); }
// 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)); } }
//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); } }
//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_); } }
// 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; } } }
//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; }
// 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); }
// 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); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IRenderer /// @author Simon Fremaux (@dievardump) interface IRenderer { /// @dev Rendering function; /// @param name the seedling name /// @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); }
//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; }
//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 virtual 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 virtual { 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), '"}' ) ); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './Variety.sol'; /// @title VarietyRepot Contract /// @author Simon Fremaux (@dievardump) contract VarietyRepot is Variety { event SeedlingsRepoted(address user, uint256[] ids); // this is the address we will repot tokens from address public oldVariety; // during the first 3 days after the start of migration // we do not allow people to name, so people with names // in the old contract have time to migrate with theirs uint256 public disabledNamingUntil; /// @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 oldVariety_ ) Variety(name_, symbol_, contractURI_, openseaProxyRegistry_, sower_) { sower = sower_; if (address(0) != oldVariety_) { oldVariety = oldVariety_; } // during 3 days, naming will be disabled as to give time to people to migrate from the old contract // to the new and keep their name disabledNamingUntil = block.timestamp + 3 days; } /// @inheritdoc Variety function plant(address, bytes32[] memory) external view override onlySower returns (uint256) { // this ensure that noone, even Sower, can directly mint tokens on this contract // they can only be created through the repoting method revert('No direct planting, only repot.'); } /// @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 override { require( block.timestamp > disabledNamingUntil, 'Naming feature disabled.' ); require(ownerOf(tokenId) == msg.sender, 'Not token owner.'); _setName(tokenId, seedlingName); } /// @notice Checks if the string is valid (0-9a-zA-Z,- ) with no leading, trailing or consecutives spaces /// This function is a modified version of the one in the Hashmasks contract /// @dev Explain to a developer any extra details /// @param str the name to validate /// @return if the name is valid function isNameValid(string memory str) public pure returns (bool) { bytes memory strBytes = bytes(str); if (strBytes.length < 1) return false; if (strBytes.length > 32) return false; // Cannot be longer than 32 characters if (strBytes[0] == 0x20) return false; // Leading space if (strBytes[strBytes.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar; bytes1 char; uint8 charCode; for (uint256 i; i < strBytes.length; i++) { char = strBytes[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces charCode = uint8(char); if ( !(charCode >= 97 && charCode <= 122) && // a - z !(charCode >= 65 && charCode <= 90) && // A - Z !(charCode >= 48 && charCode <= 57) && // 0 - 9 !(charCode == 32) && // space !(charCode == 44) && // , !(charCode == 45) // - ) { return false; } lastChar = char; } return true; } /// @notice Slugify a name (tolower and replace all non 0-9az by -) /// @param str the string to keyIfy /// @return the key function slugify(string memory str) public pure returns (string memory) { bytes memory strBytes = bytes(str); bytes memory lowerCase = new bytes(strBytes.length); uint8 charCode; bytes1 char; for (uint256 i; i < strBytes.length; i++) { char = strBytes[i]; charCode = uint8(char); // if 0-9, a-z use the character if ( (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 122) ) { lowerCase[i] = char; } else if (charCode >= 65 && charCode <= 90) { // if A-Z, use lowercase lowerCase[i] = bytes1(charCode + 32); } else { // for all others, return a - lowerCase[i] = 0x2D; } } return string(lowerCase); } /// @notice repot (migrate and burn) the seedlings of `users` from the old variety contract to the new one /// to give them the exact same token id, seed and custom name if valid, on this contract /// The old token is burned (deleted) forever from the old contract /// @dev we do not need to check that `user` we transferFrom is not the current contract, because _safeMint /// would fail if we tried to mint the same tokenId twice /// @param users an array of users /// @param maxTokensAtOnce a limit of token to migrate at once, since a few users have strong hands function repotUsersSeedlings( address[] memory users, uint256 maxTokensAtOnce ) external { require( // only the contract owner msg.sender == owner() || // or someone trying to migrate their own tokens can call this function (users.length == 1 && users[0] == msg.sender), 'Not allowed to migrate.' ); Variety oldVariety_ = Variety(oldVariety); address me = address(this); address user; uint256 migrated; for (uint256 j; j < users.length && (migrated < maxTokensAtOnce); j++) { user = users[j]; uint256 userBalance = oldVariety_.balanceOf(user); if (userBalance == 0) continue; uint256 end = userBalance; // some users might have too many tokens to do that in one transaction if (userBalance > (maxTokensAtOnce - migrated)) { end = (maxTokensAtOnce - migrated); } uint256[] memory ids = new uint256[](end); uint256 tokenId; bytes32 seed; bytes32 slugBytes; string memory seedlingName; for (uint256 i; i < end; i++) { // get the last token id owned by the user // this is a bit cheaper than always getting index 0 // because when removing last there is no "reorg" in the EnumerableSet tokenId = oldVariety_.tokenOfOwnerByIndex( user, userBalance - (i + 1) // this takes the last id in the user list ); // get the token seed seed = oldVariety_.getTokenSeed(tokenId); // get the token name seedlingName = oldVariety_.getName(tokenId); // burn the old token first oldVariety_.burn(tokenId); // create the same token id in this contract for this user _safeMint(user, tokenId, ''); // set exact same seed tokenSeed[tokenId] = seed; // if the seedling had a name and the name is valid if ( bytes(seedlingName).length > 0 && isNameValid(seedlingName) ) { slugBytes = keccak256(bytes(slugify(seedlingName))); // and is not already used if (!usedNames[slugBytes]) { // then use it usedNames[slugBytes] = true; names[tokenId] = seedlingName; } } ids[i] = tokenId; } migrated += end; emit SeedlingsRepoted(user, ids); } } /// @dev allows to set a name internally. /// checks that the name is valid and not used, else throws /// @param tokenId the token to name /// @param seedlingName the name function _setName(uint256 tokenId, string memory seedlingName) internal { bytes32 slugBytes; // if the name is not empty, require that it's valid and not used if (bytes(seedlingName).length > 0) { require(isNameValid(seedlingName) == true, 'Invalid name.'); // also requires the name is not already used slugBytes = keccak256(bytes(slugify(seedlingName))); require(usedNames[slugBytes] == false, 'Name already used.'); // set as used usedNames[slugBytes] = true; } // if it already has a name, mark the old name as unused string memory oldName = names[tokenId]; if (bytes(oldName).length > 0) { slugBytes = keccak256(bytes(slugify(oldName))); usedNames[slugBytes] = false; } names[tokenId] = seedlingName; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"},{"internalType":"address","name":"oldContract_","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":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"SeedlingsRepoted","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":[],"name":"disabledNamingUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"string","name":"str","type":"string"}],"name":"isNameValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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":"oldVariety","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"","type":"address"},{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"name":"plant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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 IRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256","name":"maxTokensAtOnce","type":"uint256"}],"name":"repotUsersSeedlings","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":[{"internalType":"string","name":"str","type":"string"}],"name":"slugify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"address","name":"newRenderer","type":"address"}],"name":"updateRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedNames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162003a7e38038062003a7e833981016040819052620000349162000332565b8686868686858585858585848484848383620000503362000153565b815162000065906001906020850190620001bc565b5080516200007b906002906020840190620001bc565b5050825115905062000092576200009282620001a3565b6001600160a01b03811615620000be57600c80546001600160a01b0319166001600160a01b0383161790555b5050600d80546001600160a01b0319166001600160a01b038b81169190911790915588161596506200010d9550505050505057601380546001600160a01b0319166001600160a01b0383161790555b6200011c426203f4806200040a565b6014555050601580546001600160a01b0319166001600160a01b039790971696909617909555506200048298505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051620001b890600b906020840190620001bc565b5050565b828054620001ca906200042f565b90600052602060002090601f016020900481019282620001ee576000855562000239565b82601f106200020957805160ff191683800117855562000239565b8280016001018555821562000239579182015b82811115620002395782518255916020019190600101906200021c565b50620002479291506200024b565b5090565b5b808211156200024757600081556001016200024c565b80516001600160a01b03811681146200027a57600080fd5b919050565b600082601f83011262000290578081fd5b81516001600160401b0380821115620002ad57620002ad6200046c565b604051601f8301601f19908116603f01168101908282118183101715620002d857620002d86200046c565b81604052838152602092508683858801011115620002f4578485fd5b8491505b83821015620003175785820183015181830184015290820190620002f8565b838211156200032857848385830101525b9695505050505050565b600080600080600080600060e0888a0312156200034d578283fd5b87516001600160401b038082111562000364578485fd5b620003728b838c016200027f565b985060208a015191508082111562000388578485fd5b620003968b838c016200027f565b975060408a0151915080821115620003ac578485fd5b50620003bb8a828b016200027f565b955050620003cc6060890162000262565b9350620003dc6080890162000262565b9250620003ec60a0890162000262565b9150620003fc60c0890162000262565b905092959891949750929550565b600082198211156200042a57634e487b7160e01b81526011600452602481fd5b500190565b600181811c908216806200044457607f821691505b602082108114156200046657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6135ec80620004926000396000f3fe608060405234801561001057600080fd5b50600436106102745760003560e01c8063750af3ab11610151578063be610c59116100c3578063e53ecfc911610087578063e53ecfc9146105ac578063e8a3d485146105b5578063e985e9c5146105bd578063f2fde38b146105d0578063f84ddf0b146105e3578063fe55932a146105ec57600080fd5b8063be610c591461054d578063bf40e75c14610560578063c7a53af014610573578063c87b56dd14610586578063e3c629c01461059957600080fd5b806395d89b411161011557806395d89b41146104d9578063a22cb465146104e1578063a5004d98146104f4578063b88d4fde14610507578063b9c4d9fb1461051a578063bc36ff811461053a57600080fd5b8063750af3ab1461046c57806385745fd71461048f5780638ada6b0f146104a25780638da5cb5b146104b5578063938e3d7b146104c657600080fd5b806342842e0e116101ea5780636102de98116101ae5780636102de98146104055780636352211e146104185780636b8ff5741461042b5780636cc462f91461043e57806370a0823114610451578063715018a61461046457600080fd5b806342842e0e146103a657806342966c68146103b95780634622ab03146103cc5780634f6ccce7146103df5780635a4c1624146103f257600080fd5b8063095ea7b31161023c578063095ea7b3146103095780630ebd4c7f1461031c57806318160ddd1461033c57806323b872dd1461034e5780632a55205a146103615780632f745c591461039357600080fd5b806301ffc9a71461027957806304d88496146102a157806305d430db146102b657806306fdde03146102c9578063081812fc146102de575b600080fd5b61028c610287366004612fe8565b6105ff565b60405190151581526020015b60405180910390f35b6102b46102af366004612fb8565b610610565b005b61028c6102c436600461303c565b6106ae565b6102d16108a7565b60405161029891906132a5565b6102f16102ec366004612fb8565b610939565b6040516001600160a01b039091168152602001610298565b6102b4610317366004612eeb565b6109c1565b61032f61032a366004612fb8565b610ad7565b6040516102989190613292565b6009545b604051908152602001610298565b6102b461035c366004612d55565b610b45565b61037461036f366004613127565b610b77565b604080516001600160a01b039093168352602083019190915201610298565b6103406103a1366004612eeb565b610ba7565b6102b46103b4366004612d55565b610c3d565b6102b46103c7366004612fb8565b610c58565b6102d16103da366004612fb8565b610cd2565b6103406103ed366004612fb8565b610d6c565b610340610400366004612fb8565b610e0d565b61028c610413366004612d1d565b610e85565b6102f1610426366004612fb8565b610f2f565b6102d1610439366004612fb8565b610fa6565b6013546102f1906001600160a01b031681565b61034061045f366004612d01565b610ff6565b6102b461107d565b61028c61047a366004612fb8565b60116020526000908152604090205460ff1681565b6102b461049d366004612f16565b6110b3565b6015546102f1906001600160a01b031681565b6000546001600160a01b03166102f1565b6102b46104d436600461303c565b611604565b6102d1611637565b6102b46104ef366004612eba565b611646565b610340610502366004612e12565b61170b565b6102b4610515366004612d95565b61179d565b61052d610528366004612fb8565b6117d5565b6040516102989190613245565b6102d1610548366004612fb8565b61185c565b6102b461055b366004612d01565b611869565b6102b461056e366004612fb8565b6118b5565b600d546102f1906001600160a01b031681565b6102d1610594366004612fb8565b6119cd565b6102d16105a736600461303c565b611a56565b61034060145481565b6102d1611c15565b61028c6105cb366004612d1d565b611c24565b6102b46105de366004612d01565b611c37565b610340600e5481565b6102b46105fa3660046130e2565b611ccf565b600061060a82611d81565b92915050565b3361061a82610f2f565b6001600160a01b0316146106685760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b6000808290506001815110156106c75750600092915050565b6020815111156106da5750600092915050565b806000815181106106fb57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b141561071f5750600092915050565b806001825161072e91906134a2565b8151811061074c57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156107705750600092915050565b6000806000805b845181101561089a578481815181106107a057634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169250600160fd1b831480156107d15750600160fd1b6001600160f81b03198516145b156107e3575060009695505050505050565b60f883901c9150606182108015906107ff5750607a8260ff1611155b158015610821575060418260ff161015801561081f5750605a8260ff1611155b155b8015610842575060308260ff1610158015610840575060398260ff1611155b155b801561085257508160ff16602014155b801561086257508160ff16602c14155b801561087257508160ff16602d14155b15610884575060009695505050505050565b82935080806108929061351a565b915050610777565b5060019695505050505050565b6060600180546108b6906134e5565b80601f01602080910402602001604051908101604052809291908181526020018280546108e2906134e5565b801561092f5780601f106109045761010080835404028352916020019161092f565b820191906000526020600020905b81548152906001019060200180831161091257829003601f168201915b5050505050905090565b600061094482611d9b565b6109a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161065f565b506000908152600560205260409020546001600160a01b031690565b60006109cc82610f2f565b9050806001600160a01b0316836001600160a01b03161415610a3a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161065f565b336001600160a01b0382161480610a565750610a568133611c24565b610ac85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161065f565b610ad28383611db8565b505050565b60606000610ae783612710610b77565b9150508015610b3f5760408051600180825281830190925290602080830190803683370190505091508082600081518110610b3257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b610b50335b82611e26565b610b6c5760405162461bcd60e51b815260040161065f90613364565b610ad2838383611ee8565b600d546001600160a01b03166000612710610b9484610190613483565b610b9e919061346f565b90509250929050565b6000610bb283610ff6565b8210610c145760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161065f565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610ad28383836040518060200160405280600081525061179d565b610c6133610b4a565b610cc65760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b606482015260840161065f565b610ccf81612093565b50565b60106020526000908152604090208054610ceb906134e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d17906134e5565b8015610d645780601f10610d3957610100808354040283529160200191610d64565b820191906000526020600020905b815481529060010190602001808311610d4757829003601f168201915b505050505081565b6000610d7760095490565b8210610dda5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161065f565b60098281548110610dfb57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610e1882611d9b565b610e725760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b606482015260840161065f565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610f27575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c9190613020565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b03168061060a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161065f565b6060610fb182611d9b565b610fed5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b604482015260640161065f565b61060a8261213a565b60006001600160a01b0382166110615760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161065f565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146110a75760405162461bcd60e51b815260040161065f9061332f565b6110b16000612211565b565b6000546001600160a01b03163314806111115750815160011480156111115750336001600160a01b0316826000815181106110fe57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316145b61115d5760405162461bcd60e51b815260206004820152601760248201527f4e6f7420616c6c6f77656420746f206d6967726174652e000000000000000000604482015260640161065f565b6013546001600160a01b031630600080805b86518110801561117e57508582105b156115fb578681815181106111a357634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516370a0823160e01b81526001600160a01b0380831660048301529194506000918716906370a082319060240160206040518083038186803b1580156111f557600080fd5b505afa158015611209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122d9190612fd0565b90508061123a57506115e9565b8061124584896134a2565b8211156112595761125684896134a2565b90505b60008167ffffffffffffffff81111561128257634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156112ab578160200160208202803683370190505b5090506000806000606060005b8681101561159b576001600160a01b038d16632f745c598c6112db846001613432565b6112e5908c6134a2565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160206040518083038186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113619190612fd0565b604051631693058960e21b8152600481018290529095506001600160a01b038e1690635a4c16249060240160206040518083038186803b1580156113a457600080fd5b505afa1580156113b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dc9190612fd0565b604051631ae3fd5d60e21b8152600481018790529094506001600160a01b038e1690636b8ff5749060240160006040518083038186803b15801561141f57600080fd5b505afa158015611433573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261145b919081019061306f565b604051630852cd8d60e31b8152600481018790529092506001600160a01b038e16906342966c6890602401600060405180830381600087803b1580156114a057600080fd5b505af11580156114b4573d6000803e3d6000fd5b505050506114d28b8660405180602001604052806000815250612261565b6000858152600f602052604090208490558151158015906114f757506114f7826106ae565b1561155d5761150582611a56565b80516020918201206000818152601190925260409091205490935060ff1661155d576000838152601160209081526040808320805460ff1916600117905587835260108252909120835161155b92850190612c0b565b505b8486828151811061157e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806115938161351a565b9150506112b8565b506115a6868a613432565b98507f3154c2f0b66caa898b6d93281a0d16bbeeba8ed9f6ad8fa7cd628f587173c9628a866040516115d9929190613221565b60405180910390a1505050505050505b806115f38161351a565b91505061116f565b50505050505050565b6000546001600160a01b0316331461162e5760405162461bcd60e51b815260040161065f9061332f565b610ccf81612294565b6060600280546108b6906134e5565b6001600160a01b03821633141561169f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161065f565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b031633146117555760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b604482015260640161065f565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f2064697265637420706c616e74696e672c206f6e6c79207265706f742e00604482015260640161065f565b6117a73383611e26565b6117c35760405162461bcd60e51b815260040161065f90613364565b6117cf848484846122a7565b50505050565b60606000806117e684612710610b77565b9150915080600014611855576040805160018082528183019092529060208083019080368337019050509250818360008151811061183457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b606061060a6000836122da565b6000546001600160a01b031633146118935760405162461bcd60e51b815260040161065f9061332f565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031633146118fc5760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b604482015260640161065f565b60008181526012602052604090205460ff1615156001146119575760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b604482015260640161065f565b6000818152601260209081526040808320805460ff19169055600f90915290205442446119856001436134a2565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606119d882611d9b565b611a3c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161065f565b6000828152600f602052604090205461060a9083906122da565b606060008290506000815167ffffffffffffffff811115611a8757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611ab1576020820181803683370190505b50905060008060005b8451811015611c0a57848181518110611ae357634e487b7160e01b600052603260045260246000fd5b016020015160f881901c93506001600160f81b031916915060308310801590611b10575060398360ff1611155b80611b2e575060618360ff1610158015611b2e5750607a8360ff1611155b15611b705781848281518110611b5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611bf8565b60418360ff1610158015611b885750605a8360ff1611155b15611bbb57611b9883602061344a565b60f81b848281518110611b5457634e487b7160e01b600052603260045260246000fd5b602d60f81b848281518110611be057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b80611c028161351a565b915050611aba565b509195945050505050565b6060600b80546108b6906134e5565b6000611c30838361236b565b9392505050565b6000546001600160a01b03163314611c615760405162461bcd60e51b815260040161065f9061332f565b6001600160a01b038116611cc65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161065f565b610ccf81612211565b6014544211611d205760405162461bcd60e51b815260206004820152601860248201527f4e616d696e6720666561747572652064697361626c65642e0000000000000000604482015260640161065f565b33611d2a83610f2f565b6001600160a01b031614611d735760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b604482015260640161065f565b611d7d82826123b2565b5050565b6000611d8c8261257d565b8061060a575061060a826125a2565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ded82610f2f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611e3182611d9b565b611e925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161065f565b6000611e9d83610f2f565b9050806001600160a01b0316846001600160a01b03161480611ed85750836001600160a01b0316611ecd84610939565b6001600160a01b0316145b80610f275750610f278185611c24565b826001600160a01b0316611efb82610f2f565b6001600160a01b031614611f635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161065f565b6001600160a01b038216611fc55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161065f565b611fd08383836125d8565b611fdb600082611db8565b6001600160a01b03831660009081526004602052604081208054600192906120049084906134a2565b90915550506001600160a01b0382166000908152600460205260408120805460019290612032908490613432565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061209e82610f2f565b90506120ac816000846125d8565b6120b7600083611db8565b6001600160a01b03811660009081526004602052604081208054600192906120e09084906134a2565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601060205260409020805460609190612157906134e5565b80601f0160208091040260200160405190810160405280929190818152602001828054612183906134e5565b80156121d05780601f106121a5576101008083540402835291602001916121d0565b820191906000526020600020905b8154815290600101906020018083116121b357829003601f168201915b5050505050905080516000141561220c576121ea826125e3565b6040516020016121fa91906131ae565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61226b83836126fd565b612278600084848461283c565b610ad25760405162461bcd60e51b815260040161065f906132dd565b8051611d7d90600b906020840190612c0b565b6122b2848484611ee8565b6122be8484848461283c565b6117cf5760405162461bcd60e51b815260040161065f906132dd565b6015546060906001600160a01b03166331b05f616122f78561213a565b85856040518463ffffffff1660e01b8152600401612317939291906132b8565b60006040518083038186803b15801561232f57600080fd5b505afa158015612343573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c30919081019061306f565b60006123778383610e85565b156123845750600161060a565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611c30565b805160009015612489576123c5826106ae565b15156001146124065760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b604482015260640161065f565b61240f82611a56565b80516020918201206000818152601190925260409091205490915060ff161561246f5760405162461bcd60e51b81526020600482015260126024820152712730b6b29030b63932b0b23c903ab9b2b21760711b604482015260640161065f565b6000818152601160205260409020805460ff191660011790555b600083815260106020526040812080546124a2906134e5565b80601f01602080910402602001604051908101604052809291908181526020018280546124ce906134e5565b801561251b5780601f106124f05761010080835404028352916020019161251b565b820191906000526020600020905b8154815290600101906020018083116124fe57829003601f168201915b505050505090506000815111156125575761253581611a56565b8051602091820120600081815260119092526040909120805460ff1916905591505b6000848152601060209081526040909120845161257692860190612c0b565b5050505050565b60006001600160e01b0319821663780e9d6360e01b148061060a575061060a82612949565b60006001600160e01b0319821663152a902d60e11b148061060a57506001600160e01b03198216632dde656160e21b1492915050565b610ad2838383612999565b6060816126075750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612631578061261b8161351a565b915061262a9050600a8361346f565b915061260b565b60008167ffffffffffffffff81111561265a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612684576020820181803683370190505b5090505b8415610f27576126996001836134a2565b91506126a6600a86613535565b6126b1906030613432565b60f81b8183815181106126d457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506126f6600a8661346f565b9450612688565b6001600160a01b0382166127535760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161065f565b61275c81611d9b565b156127a95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161065f565b6127b5600083836125d8565b6001600160a01b03821660009081526004602052604081208054600192906127de908490613432565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561293e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128809033908990889088906004016131e4565b602060405180830381600087803b15801561289a57600080fd5b505af19250505080156128ca575060408051601f3d908101601f191682019092526128c791810190613004565b60015b612924573d8080156128f8576040519150601f19603f3d011682016040523d82523d6000602084013e6128fd565b606091505b50805161291c5760405162461bcd60e51b815260040161065f906132dd565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f27565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061297a57506001600160e01b03198216635b5e139f60e01b145b8061060a57506301ffc9a760e01b6001600160e01b031983161461060a565b6001600160a01b0383166129f4576129ef81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612a17565b816001600160a01b0316836001600160a01b031614612a1757612a178382612a51565b6001600160a01b038216612a2e57610ad281612aee565b826001600160a01b0316826001600160a01b031614610ad257610ad28282612bc7565b60006001612a5e84610ff6565b612a6891906134a2565b600083815260086020526040902054909150808214612abb576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090612b00906001906134a2565b6000838152600a602052604081205460098054939450909284908110612b3657634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060098381548110612b6557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612bab57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612bd283610ff6565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b828054612c17906134e5565b90600052602060002090601f016020900481019282612c395760008555612c7f565b82601f10612c5257805160ff1916838001178555612c7f565b82800160010185558215612c7f579182015b82811115612c7f578251825591602001919060010190612c64565b50612c8b929150612c8f565b5090565b5b80821115612c8b5760008155600101612c90565b6000612cb7612cb28461340a565b6133b5565b9050828152838383011115612ccb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612cf2578081fd5b611c3083833560208501612ca4565b600060208284031215612d12578081fd5b8135611c308161358b565b60008060408385031215612d2f578081fd5b8235612d3a8161358b565b91506020830135612d4a8161358b565b809150509250929050565b600080600060608486031215612d69578081fd5b8335612d748161358b565b92506020840135612d848161358b565b929592945050506040919091013590565b60008060008060808587031215612daa578081fd5b8435612db58161358b565b93506020850135612dc58161358b565b925060408501359150606085013567ffffffffffffffff811115612de7578182fd5b8501601f81018713612df7578182fd5b612e0687823560208401612ca4565b91505092959194509250565b60008060408385031215612e24578182fd5b8235612e2f8161358b565b915060208381013567ffffffffffffffff811115612e4b578283fd5b8401601f81018613612e5b578283fd5b8035612e69612cb2826133e6565b80828252848201915084840189868560051b8701011115612e88578687fd5b8694505b83851015612eaa578035835260019490940193918501918501612e8c565b5080955050505050509250929050565b60008060408385031215612ecc578182fd5b8235612ed78161358b565b915060208301358015158114612d4a578182fd5b60008060408385031215612efd578182fd5b8235612f088161358b565b946020939093013593505050565b60008060408385031215612f28578182fd5b823567ffffffffffffffff811115612f3e578283fd5b8301601f81018513612f4e578283fd5b80356020612f5e612cb2836133e6565b80838252828201915082850189848660051b8801011115612f7d578788fd5b8795505b84861015612fa8578035612f948161358b565b835260019590950194918301918301612f81565b5098969091013596505050505050565b600060208284031215612fc9578081fd5b5035919050565b600060208284031215612fe1578081fd5b5051919050565b600060208284031215612ff9578081fd5b8135611c30816135a0565b600060208284031215613015578081fd5b8151611c30816135a0565b600060208284031215613031578081fd5b8151611c308161358b565b60006020828403121561304d578081fd5b813567ffffffffffffffff811115613063578182fd5b610f2784828501612ce2565b600060208284031215613080578081fd5b815167ffffffffffffffff811115613096578182fd5b8201601f810184136130a6578182fd5b80516130b4612cb28261340a565b8181528560208385010111156130c8578384fd5b6130d98260208301602086016134b9565b95945050505050565b600080604083850312156130f4578182fd5b82359150602083013567ffffffffffffffff811115613111578182fd5b61311d85828601612ce2565b9150509250929050565b60008060408385031215613139578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156131775781518752958201959082019060010161315b565b509495945050505050565b6000815180845261319a8160208601602086016134b9565b601f01601f19169290920160200192915050565b6d3531325072696e742e736f6c202360901b8152600082516131d781600e8501602087016134b9565b91909101600e0192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061321790830184613182565b9695505050505050565b6001600160a01b0383168152604060208201819052600090610f2790830184613148565b6020808252825182820181905260009190848201906040850190845b818110156132865783516001600160a01b031683529284019291840191600101613261565b50909695505050505050565b602081526000611c306020830184613148565b602081526000611c306020830184613182565b6060815260006132cb6060830186613182565b60208301949094525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156133de576133de613575565b604052919050565b600067ffffffffffffffff82111561340057613400613575565b5060051b60200190565b600067ffffffffffffffff82111561342457613424613575565b50601f01601f191660200190565b6000821982111561344557613445613549565b500190565b600060ff821660ff84168060ff0382111561346757613467613549565b019392505050565b60008261347e5761347e61355f565b500490565b600081600019048311821515161561349d5761349d613549565b500290565b6000828210156134b4576134b4613549565b500390565b60005b838110156134d45781810151838201526020016134bc565b838111156117cf5750506000910152565b600181811c908216806134f957607f821691505b60208210811415610b3f57634e487b7160e01b600052602260045260246000fd5b600060001982141561352e5761352e613549565b5060010190565b6000826135445761354461355f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ccf57600080fd5b6001600160e01b031981168114610ccf57600080fdfea2646970667358221220f9efe07f3f6c1b7b100b8de44fd8fadc4c25bfb9441b5b612670ba0ad17a2a1d64736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de810000000000000000000000007b8fffb8340f304cb47687bc092a0382b9387bd7000000000000000000000000000000000000000000000000000000000000001d3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000000000000000000000000000000000000000000000000000000000000000000653534753233100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f3531325072696e742e6a736f6e000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102745760003560e01c8063750af3ab11610151578063be610c59116100c3578063e53ecfc911610087578063e53ecfc9146105ac578063e8a3d485146105b5578063e985e9c5146105bd578063f2fde38b146105d0578063f84ddf0b146105e3578063fe55932a146105ec57600080fd5b8063be610c591461054d578063bf40e75c14610560578063c7a53af014610573578063c87b56dd14610586578063e3c629c01461059957600080fd5b806395d89b411161011557806395d89b41146104d9578063a22cb465146104e1578063a5004d98146104f4578063b88d4fde14610507578063b9c4d9fb1461051a578063bc36ff811461053a57600080fd5b8063750af3ab1461046c57806385745fd71461048f5780638ada6b0f146104a25780638da5cb5b146104b5578063938e3d7b146104c657600080fd5b806342842e0e116101ea5780636102de98116101ae5780636102de98146104055780636352211e146104185780636b8ff5741461042b5780636cc462f91461043e57806370a0823114610451578063715018a61461046457600080fd5b806342842e0e146103a657806342966c68146103b95780634622ab03146103cc5780634f6ccce7146103df5780635a4c1624146103f257600080fd5b8063095ea7b31161023c578063095ea7b3146103095780630ebd4c7f1461031c57806318160ddd1461033c57806323b872dd1461034e5780632a55205a146103615780632f745c591461039357600080fd5b806301ffc9a71461027957806304d88496146102a157806305d430db146102b657806306fdde03146102c9578063081812fc146102de575b600080fd5b61028c610287366004612fe8565b6105ff565b60405190151581526020015b60405180910390f35b6102b46102af366004612fb8565b610610565b005b61028c6102c436600461303c565b6106ae565b6102d16108a7565b60405161029891906132a5565b6102f16102ec366004612fb8565b610939565b6040516001600160a01b039091168152602001610298565b6102b4610317366004612eeb565b6109c1565b61032f61032a366004612fb8565b610ad7565b6040516102989190613292565b6009545b604051908152602001610298565b6102b461035c366004612d55565b610b45565b61037461036f366004613127565b610b77565b604080516001600160a01b039093168352602083019190915201610298565b6103406103a1366004612eeb565b610ba7565b6102b46103b4366004612d55565b610c3d565b6102b46103c7366004612fb8565b610c58565b6102d16103da366004612fb8565b610cd2565b6103406103ed366004612fb8565b610d6c565b610340610400366004612fb8565b610e0d565b61028c610413366004612d1d565b610e85565b6102f1610426366004612fb8565b610f2f565b6102d1610439366004612fb8565b610fa6565b6013546102f1906001600160a01b031681565b61034061045f366004612d01565b610ff6565b6102b461107d565b61028c61047a366004612fb8565b60116020526000908152604090205460ff1681565b6102b461049d366004612f16565b6110b3565b6015546102f1906001600160a01b031681565b6000546001600160a01b03166102f1565b6102b46104d436600461303c565b611604565b6102d1611637565b6102b46104ef366004612eba565b611646565b610340610502366004612e12565b61170b565b6102b4610515366004612d95565b61179d565b61052d610528366004612fb8565b6117d5565b6040516102989190613245565b6102d1610548366004612fb8565b61185c565b6102b461055b366004612d01565b611869565b6102b461056e366004612fb8565b6118b5565b600d546102f1906001600160a01b031681565b6102d1610594366004612fb8565b6119cd565b6102d16105a736600461303c565b611a56565b61034060145481565b6102d1611c15565b61028c6105cb366004612d1d565b611c24565b6102b46105de366004612d01565b611c37565b610340600e5481565b6102b46105fa3660046130e2565b611ccf565b600061060a82611d81565b92915050565b3361061a82610f2f565b6001600160a01b0316146106685760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b6000808290506001815110156106c75750600092915050565b6020815111156106da5750600092915050565b806000815181106106fb57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b141561071f5750600092915050565b806001825161072e91906134a2565b8151811061074c57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156107705750600092915050565b6000806000805b845181101561089a578481815181106107a057634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169250600160fd1b831480156107d15750600160fd1b6001600160f81b03198516145b156107e3575060009695505050505050565b60f883901c9150606182108015906107ff5750607a8260ff1611155b158015610821575060418260ff161015801561081f5750605a8260ff1611155b155b8015610842575060308260ff1610158015610840575060398260ff1611155b155b801561085257508160ff16602014155b801561086257508160ff16602c14155b801561087257508160ff16602d14155b15610884575060009695505050505050565b82935080806108929061351a565b915050610777565b5060019695505050505050565b6060600180546108b6906134e5565b80601f01602080910402602001604051908101604052809291908181526020018280546108e2906134e5565b801561092f5780601f106109045761010080835404028352916020019161092f565b820191906000526020600020905b81548152906001019060200180831161091257829003601f168201915b5050505050905090565b600061094482611d9b565b6109a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161065f565b506000908152600560205260409020546001600160a01b031690565b60006109cc82610f2f565b9050806001600160a01b0316836001600160a01b03161415610a3a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161065f565b336001600160a01b0382161480610a565750610a568133611c24565b610ac85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161065f565b610ad28383611db8565b505050565b60606000610ae783612710610b77565b9150508015610b3f5760408051600180825281830190925290602080830190803683370190505091508082600081518110610b3257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b610b50335b82611e26565b610b6c5760405162461bcd60e51b815260040161065f90613364565b610ad2838383611ee8565b600d546001600160a01b03166000612710610b9484610190613483565b610b9e919061346f565b90509250929050565b6000610bb283610ff6565b8210610c145760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161065f565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610ad28383836040518060200160405280600081525061179d565b610c6133610b4a565b610cc65760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b606482015260840161065f565b610ccf81612093565b50565b60106020526000908152604090208054610ceb906134e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d17906134e5565b8015610d645780601f10610d3957610100808354040283529160200191610d64565b820191906000526020600020905b815481529060010190602001808311610d4757829003601f168201915b505050505081565b6000610d7760095490565b8210610dda5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161065f565b60098281548110610dfb57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610e1882611d9b565b610e725760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b606482015260840161065f565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610f27575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c9190613020565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b03168061060a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161065f565b6060610fb182611d9b565b610fed5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b604482015260640161065f565b61060a8261213a565b60006001600160a01b0382166110615760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161065f565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146110a75760405162461bcd60e51b815260040161065f9061332f565b6110b16000612211565b565b6000546001600160a01b03163314806111115750815160011480156111115750336001600160a01b0316826000815181106110fe57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316145b61115d5760405162461bcd60e51b815260206004820152601760248201527f4e6f7420616c6c6f77656420746f206d6967726174652e000000000000000000604482015260640161065f565b6013546001600160a01b031630600080805b86518110801561117e57508582105b156115fb578681815181106111a357634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516370a0823160e01b81526001600160a01b0380831660048301529194506000918716906370a082319060240160206040518083038186803b1580156111f557600080fd5b505afa158015611209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122d9190612fd0565b90508061123a57506115e9565b8061124584896134a2565b8211156112595761125684896134a2565b90505b60008167ffffffffffffffff81111561128257634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156112ab578160200160208202803683370190505b5090506000806000606060005b8681101561159b576001600160a01b038d16632f745c598c6112db846001613432565b6112e5908c6134a2565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160206040518083038186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113619190612fd0565b604051631693058960e21b8152600481018290529095506001600160a01b038e1690635a4c16249060240160206040518083038186803b1580156113a457600080fd5b505afa1580156113b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dc9190612fd0565b604051631ae3fd5d60e21b8152600481018790529094506001600160a01b038e1690636b8ff5749060240160006040518083038186803b15801561141f57600080fd5b505afa158015611433573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261145b919081019061306f565b604051630852cd8d60e31b8152600481018790529092506001600160a01b038e16906342966c6890602401600060405180830381600087803b1580156114a057600080fd5b505af11580156114b4573d6000803e3d6000fd5b505050506114d28b8660405180602001604052806000815250612261565b6000858152600f602052604090208490558151158015906114f757506114f7826106ae565b1561155d5761150582611a56565b80516020918201206000818152601190925260409091205490935060ff1661155d576000838152601160209081526040808320805460ff1916600117905587835260108252909120835161155b92850190612c0b565b505b8486828151811061157e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806115938161351a565b9150506112b8565b506115a6868a613432565b98507f3154c2f0b66caa898b6d93281a0d16bbeeba8ed9f6ad8fa7cd628f587173c9628a866040516115d9929190613221565b60405180910390a1505050505050505b806115f38161351a565b91505061116f565b50505050505050565b6000546001600160a01b0316331461162e5760405162461bcd60e51b815260040161065f9061332f565b610ccf81612294565b6060600280546108b6906134e5565b6001600160a01b03821633141561169f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161065f565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b031633146117555760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b604482015260640161065f565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f2064697265637420706c616e74696e672c206f6e6c79207265706f742e00604482015260640161065f565b6117a73383611e26565b6117c35760405162461bcd60e51b815260040161065f90613364565b6117cf848484846122a7565b50505050565b60606000806117e684612710610b77565b9150915080600014611855576040805160018082528183019092529060208083019080368337019050509250818360008151811061183457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b606061060a6000836122da565b6000546001600160a01b031633146118935760405162461bcd60e51b815260040161065f9061332f565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031633146118fc5760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b604482015260640161065f565b60008181526012602052604090205460ff1615156001146119575760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b604482015260640161065f565b6000818152601260209081526040808320805460ff19169055600f90915290205442446119856001436134a2565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606119d882611d9b565b611a3c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161065f565b6000828152600f602052604090205461060a9083906122da565b606060008290506000815167ffffffffffffffff811115611a8757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611ab1576020820181803683370190505b50905060008060005b8451811015611c0a57848181518110611ae357634e487b7160e01b600052603260045260246000fd5b016020015160f881901c93506001600160f81b031916915060308310801590611b10575060398360ff1611155b80611b2e575060618360ff1610158015611b2e5750607a8360ff1611155b15611b705781848281518110611b5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611bf8565b60418360ff1610158015611b885750605a8360ff1611155b15611bbb57611b9883602061344a565b60f81b848281518110611b5457634e487b7160e01b600052603260045260246000fd5b602d60f81b848281518110611be057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b80611c028161351a565b915050611aba565b509195945050505050565b6060600b80546108b6906134e5565b6000611c30838361236b565b9392505050565b6000546001600160a01b03163314611c615760405162461bcd60e51b815260040161065f9061332f565b6001600160a01b038116611cc65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161065f565b610ccf81612211565b6014544211611d205760405162461bcd60e51b815260206004820152601860248201527f4e616d696e6720666561747572652064697361626c65642e0000000000000000604482015260640161065f565b33611d2a83610f2f565b6001600160a01b031614611d735760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b604482015260640161065f565b611d7d82826123b2565b5050565b6000611d8c8261257d565b8061060a575061060a826125a2565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ded82610f2f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611e3182611d9b565b611e925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161065f565b6000611e9d83610f2f565b9050806001600160a01b0316846001600160a01b03161480611ed85750836001600160a01b0316611ecd84610939565b6001600160a01b0316145b80610f275750610f278185611c24565b826001600160a01b0316611efb82610f2f565b6001600160a01b031614611f635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161065f565b6001600160a01b038216611fc55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161065f565b611fd08383836125d8565b611fdb600082611db8565b6001600160a01b03831660009081526004602052604081208054600192906120049084906134a2565b90915550506001600160a01b0382166000908152600460205260408120805460019290612032908490613432565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061209e82610f2f565b90506120ac816000846125d8565b6120b7600083611db8565b6001600160a01b03811660009081526004602052604081208054600192906120e09084906134a2565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601060205260409020805460609190612157906134e5565b80601f0160208091040260200160405190810160405280929190818152602001828054612183906134e5565b80156121d05780601f106121a5576101008083540402835291602001916121d0565b820191906000526020600020905b8154815290600101906020018083116121b357829003601f168201915b5050505050905080516000141561220c576121ea826125e3565b6040516020016121fa91906131ae565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61226b83836126fd565b612278600084848461283c565b610ad25760405162461bcd60e51b815260040161065f906132dd565b8051611d7d90600b906020840190612c0b565b6122b2848484611ee8565b6122be8484848461283c565b6117cf5760405162461bcd60e51b815260040161065f906132dd565b6015546060906001600160a01b03166331b05f616122f78561213a565b85856040518463ffffffff1660e01b8152600401612317939291906132b8565b60006040518083038186803b15801561232f57600080fd5b505afa158015612343573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c30919081019061306f565b60006123778383610e85565b156123845750600161060a565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611c30565b805160009015612489576123c5826106ae565b15156001146124065760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b604482015260640161065f565b61240f82611a56565b80516020918201206000818152601190925260409091205490915060ff161561246f5760405162461bcd60e51b81526020600482015260126024820152712730b6b29030b63932b0b23c903ab9b2b21760711b604482015260640161065f565b6000818152601160205260409020805460ff191660011790555b600083815260106020526040812080546124a2906134e5565b80601f01602080910402602001604051908101604052809291908181526020018280546124ce906134e5565b801561251b5780601f106124f05761010080835404028352916020019161251b565b820191906000526020600020905b8154815290600101906020018083116124fe57829003601f168201915b505050505090506000815111156125575761253581611a56565b8051602091820120600081815260119092526040909120805460ff1916905591505b6000848152601060209081526040909120845161257692860190612c0b565b5050505050565b60006001600160e01b0319821663780e9d6360e01b148061060a575061060a82612949565b60006001600160e01b0319821663152a902d60e11b148061060a57506001600160e01b03198216632dde656160e21b1492915050565b610ad2838383612999565b6060816126075750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612631578061261b8161351a565b915061262a9050600a8361346f565b915061260b565b60008167ffffffffffffffff81111561265a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612684576020820181803683370190505b5090505b8415610f27576126996001836134a2565b91506126a6600a86613535565b6126b1906030613432565b60f81b8183815181106126d457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506126f6600a8661346f565b9450612688565b6001600160a01b0382166127535760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161065f565b61275c81611d9b565b156127a95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161065f565b6127b5600083836125d8565b6001600160a01b03821660009081526004602052604081208054600192906127de908490613432565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561293e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128809033908990889088906004016131e4565b602060405180830381600087803b15801561289a57600080fd5b505af19250505080156128ca575060408051601f3d908101601f191682019092526128c791810190613004565b60015b612924573d8080156128f8576040519150601f19603f3d011682016040523d82523d6000602084013e6128fd565b606091505b50805161291c5760405162461bcd60e51b815260040161065f906132dd565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f27565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061297a57506001600160e01b03198216635b5e139f60e01b145b8061060a57506301ffc9a760e01b6001600160e01b031983161461060a565b6001600160a01b0383166129f4576129ef81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612a17565b816001600160a01b0316836001600160a01b031614612a1757612a178382612a51565b6001600160a01b038216612a2e57610ad281612aee565b826001600160a01b0316826001600160a01b031614610ad257610ad28282612bc7565b60006001612a5e84610ff6565b612a6891906134a2565b600083815260086020526040902054909150808214612abb576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090612b00906001906134a2565b6000838152600a602052604081205460098054939450909284908110612b3657634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060098381548110612b6557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612bab57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612bd283610ff6565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b828054612c17906134e5565b90600052602060002090601f016020900481019282612c395760008555612c7f565b82601f10612c5257805160ff1916838001178555612c7f565b82800160010185558215612c7f579182015b82811115612c7f578251825591602001919060010190612c64565b50612c8b929150612c8f565b5090565b5b80821115612c8b5760008155600101612c90565b6000612cb7612cb28461340a565b6133b5565b9050828152838383011115612ccb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612cf2578081fd5b611c3083833560208501612ca4565b600060208284031215612d12578081fd5b8135611c308161358b565b60008060408385031215612d2f578081fd5b8235612d3a8161358b565b91506020830135612d4a8161358b565b809150509250929050565b600080600060608486031215612d69578081fd5b8335612d748161358b565b92506020840135612d848161358b565b929592945050506040919091013590565b60008060008060808587031215612daa578081fd5b8435612db58161358b565b93506020850135612dc58161358b565b925060408501359150606085013567ffffffffffffffff811115612de7578182fd5b8501601f81018713612df7578182fd5b612e0687823560208401612ca4565b91505092959194509250565b60008060408385031215612e24578182fd5b8235612e2f8161358b565b915060208381013567ffffffffffffffff811115612e4b578283fd5b8401601f81018613612e5b578283fd5b8035612e69612cb2826133e6565b80828252848201915084840189868560051b8701011115612e88578687fd5b8694505b83851015612eaa578035835260019490940193918501918501612e8c565b5080955050505050509250929050565b60008060408385031215612ecc578182fd5b8235612ed78161358b565b915060208301358015158114612d4a578182fd5b60008060408385031215612efd578182fd5b8235612f088161358b565b946020939093013593505050565b60008060408385031215612f28578182fd5b823567ffffffffffffffff811115612f3e578283fd5b8301601f81018513612f4e578283fd5b80356020612f5e612cb2836133e6565b80838252828201915082850189848660051b8801011115612f7d578788fd5b8795505b84861015612fa8578035612f948161358b565b835260019590950194918301918301612f81565b5098969091013596505050505050565b600060208284031215612fc9578081fd5b5035919050565b600060208284031215612fe1578081fd5b5051919050565b600060208284031215612ff9578081fd5b8135611c30816135a0565b600060208284031215613015578081fd5b8151611c30816135a0565b600060208284031215613031578081fd5b8151611c308161358b565b60006020828403121561304d578081fd5b813567ffffffffffffffff811115613063578182fd5b610f2784828501612ce2565b600060208284031215613080578081fd5b815167ffffffffffffffff811115613096578182fd5b8201601f810184136130a6578182fd5b80516130b4612cb28261340a565b8181528560208385010111156130c8578384fd5b6130d98260208301602086016134b9565b95945050505050565b600080604083850312156130f4578182fd5b82359150602083013567ffffffffffffffff811115613111578182fd5b61311d85828601612ce2565b9150509250929050565b60008060408385031215613139578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156131775781518752958201959082019060010161315b565b509495945050505050565b6000815180845261319a8160208601602086016134b9565b601f01601f19169290920160200192915050565b6d3531325072696e742e736f6c202360901b8152600082516131d781600e8501602087016134b9565b91909101600e0192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061321790830184613182565b9695505050505050565b6001600160a01b0383168152604060208201819052600090610f2790830184613148565b6020808252825182820181905260009190848201906040850190845b818110156132865783516001600160a01b031683529284019291840191600101613261565b50909695505050505050565b602081526000611c306020830184613148565b602081526000611c306020830184613182565b6060815260006132cb6060830186613182565b60208301949094525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156133de576133de613575565b604052919050565b600067ffffffffffffffff82111561340057613400613575565b5060051b60200190565b600067ffffffffffffffff82111561342457613424613575565b50601f01601f191660200190565b6000821982111561344557613445613549565b500190565b600060ff821660ff84168060ff0382111561346757613467613549565b019392505050565b60008261347e5761347e61355f565b500490565b600081600019048311821515161561349d5761349d613549565b500290565b6000828210156134b4576134b4613549565b500390565b60005b838110156134d45781810151838201526020016134bc565b838111156117cf5750506000910152565b600181811c908216806134f957607f821691505b60208210811415610b3f57634e487b7160e01b600052602260045260246000fd5b600060001982141561352e5761352e613549565b5060010190565b6000826135445761354461355f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ccf57600080fd5b6001600160e01b031981168114610ccf57600080fdfea2646970667358221220f9efe07f3f6c1b7b100b8de44fd8fadc4c25bfb9441b5b612670ba0ad17a2a1d64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de810000000000000000000000007b8fffb8340f304cb47687bc092a0382b9387bd7000000000000000000000000000000000000000000000000000000000000001d3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000000000000000000000000000000000000000000000000000000000000000000653534753233100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f3531325072696e742e6a736f6e000000000000000000000000000000000000000000000000
-----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
Arg [6] : oldContract_ (address): 0x7b8fFFB8340F304CB47687bC092a0382b9387BD7
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [4] : 0000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2
Arg [5] : 000000000000000000000000b630a6691ef2c2cf4b66f98bcd4bdc6f8d55de81
Arg [6] : 0000000000000000000000007b8fffb8340f304cb47687bc092a0382b9387bd7
Arg [7] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [8] : 3531325072696e742e736f6c202d205b736f6c5d536565646c696e6773000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [10] : 5353475323310000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000048
Arg [12] : 697066733a2f2f697066732f516d57513256324b69536a4451514a624b346874
Arg [13] : 6b4152697742636d7456734761794e42717a57594b43486b74312f3531325072
Arg [14] : 696e742e6a736f6e000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.