Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SingleEditionMintable
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 /** █▄░█ █▀▀ ▀█▀ █▀▀ █▀▄ █ ▀█▀ █ █▀█ █▄░█ █▀ █░▀█ █▀░ ░█░ ██▄ █▄▀ █ ░█░ █ █▄█ █░▀█ ▄█ ▀█ █▀█ █▀█ ▄▀█ █▄ █▄█ █▀▄ █▀█ */ pragma solidity 0.8.6; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import {IERC2981Upgradeable, IERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import {SharedNFTLogic} from "./SharedNFTLogic.sol"; import {IEditionSingleMintable} from "./IEditionSingleMintable.sol"; /** This is a smart contract for handling dynamic contract minting. @dev This allows creators to mint a unique serial edition of the same media within a custom contract @author iain nash Repository: https://github.com/ourzora/nft-editions */ contract SingleEditionMintable is IEditionSingleMintable, ERC721Upgradeable, OwnableUpgradeable, IERC2981Upgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; event PriceChanged(uint256 amount); event EditionSold(uint256 price, address owner); // metadata string private description; // Media Urls // animation_url field in the metadata string private animationUrl; // Hash for the associated animation bytes32 private animationHash; // Image in the metadata string private imageUrl; // Hash for the associated image bytes32 private imageHash; // Total size of edition that can be minted uint256 public editionSize; // Current token id minted CountersUpgradeable.Counter private atEditionId; // Royalty amount in bps uint256 royaltyBPS; // Addresses allowed to mint edition mapping(address => bool) allowedMinters; // Price for sale uint256 public salePrice; // NFT rendering logic contract SharedNFTLogic private immutable sharedNFTLogic; // Global constructor for factory constructor(SharedNFTLogic _sharedNFTLogic) { sharedNFTLogic = _sharedNFTLogic; } /** @param _owner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed. @param _name Name of edition, used in the title as "$NAME NUMBER/TOTAL" @param _symbol Symbol of the new token contract @param _description Description of edition, used in the description field of the NFT @param _imageUrl Image URL of the edition. Strongly encouraged to be used, if necessary, only animation URL can be used. One of animation and image url need to exist in a edition to render the NFT. @param _imageHash SHA256 of the given image in bytes32 format (0xHASH). If no image is included, the hash can be zero. @param _animationUrl Animation URL of the edition. Not required, but if omitted image URL needs to be included. This follows the opensea spec for NFTs @param _animationHash The associated hash of the animation in sha-256 bytes32 format. If animation is omitted the hash can be zero. @param _editionSize Number of editions that can be minted in total. If 0, unlimited editions can be minted. @param _royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty. @dev Function to create a new edition. Can only be called by the allowed creator Sets the only allowed minter to the address that creates/owns the edition. This can be re-assigned or updated later */ function initialize( address _owner, string memory _name, string memory _symbol, string memory _description, string memory _animationUrl, bytes32 _animationHash, string memory _imageUrl, bytes32 _imageHash, uint256 _editionSize, uint256 _royaltyBPS ) public initializer { __ERC721_init(_name, _symbol); __Ownable_init(); // Set ownership to original sender of contract call transferOwnership(_owner); description = _description; animationUrl = _animationUrl; animationHash = _animationHash; imageUrl = _imageUrl; imageHash = _imageHash; editionSize = _editionSize; royaltyBPS = _royaltyBPS; // Set edition id start to be 1 not 0 atEditionId.increment(); } /** Simple eth-based sales function More complex sales functions can be implemented through ISingleEditionMintable interface */ /** @dev This allows the user to purchase a edition edition at the given price in the contract. */ function purchase() external payable returns (uint256) { require(salePrice > 0, "Not for sale"); require(msg.value == salePrice, "Wrong price"); address[] memory toMint = new address[](1); toMint[0] = msg.sender; emit EditionSold(salePrice, msg.sender); return _mintEditions(toMint); } /** @param _salePrice if sale price is 0 sale is stopped, otherwise that amount of ETH is needed to start the sale. @dev This sets a simple ETH sales price Setting a sales price allows users to mint the edition until it sells out. For more granular sales, use an external sales contract. */ function setSalePrice(uint256 _salePrice) external onlyOwner { salePrice = _salePrice; emit PriceChanged(salePrice); } /** @dev This withdraws ETH from the contract to the contract owner. */ function withdraw() external onlyOwner { (bool sent, ) = owner().call{value: address(this).balance, gas: 34_000}( "" ); require(sent, "Failed to send ETH"); } /** @dev This helper function checks if the msg.sender is allowed to mint the given edition id. */ function _isAllowedToMint() internal view returns (bool) { if (owner() == msg.sender) { return true; } if (allowedMinters[address(0x0)]) { return true; } return allowedMinters[msg.sender]; } /** @param to address to send the newly minted edition to @dev This mints one edition to the given address by an allowed minter on the edition instance. */ function mintEdition(address to) external override returns (uint256) { require(_isAllowedToMint(), "Needs to be an allowed minter"); address[] memory toMint = new address[](1); toMint[0] = to; return _mintEditions(toMint); } /** @param recipients list of addresses to send the newly minted editions to @dev This mints multiple editions to the given list of addresses. */ function mintEditions(address[] memory recipients) external override returns (uint256) { require(_isAllowedToMint(), "Needs to be an allowed minter"); return _mintEditions(recipients); } /** Simple override for owner interface. */ function owner() public view override(OwnableUpgradeable, IEditionSingleMintable) returns (address) { return super.owner(); } /** @param minter address to set approved minting status for @param allowed boolean if that address is allowed to mint @dev Sets the approved minting status of the given address. This requires that msg.sender is the owner of the given edition id. If the ZeroAddress (address(0x0)) is set as a minter, anyone will be allowed to mint. This setup is similar to setApprovalForAll in the ERC721 spec. */ function setApprovedMinter(address minter, bool allowed) public onlyOwner { allowedMinters[minter] = allowed; } /** @dev Allows for updates of edition urls by the owner of the edition. Only URLs can be updated (data-uris are supported), hashes cannot be updated. */ function updateEditionURLs( string memory _imageUrl, string memory _animationUrl ) public onlyOwner { imageUrl = _imageUrl; animationUrl = _animationUrl; } /** @dev Private function to mint als without any access checks. Called by the public edition minting functions. */ function _mintEditions(address[] memory recipients) internal returns (uint256) { uint256 startAt = atEditionId.current(); uint256 endAt = startAt + recipients.length - 1; require(editionSize == 0 || endAt <= editionSize, "Sold out"); while (atEditionId.current() <= endAt) { _mint(recipients[atEditionId.current() - startAt], atEditionId.current()); atEditionId.increment(); } return atEditionId.current(); } /** @dev Get URIs for edition NFT @return imageUrl, imageHash, animationUrl, animationHash */ function getURIs() public view returns ( string memory, bytes32, string memory, bytes32 ) { return (imageUrl, imageHash, animationUrl, animationHash); } /** @dev Get royalty information for token @param _salePrice Sale price for the token */ function royaltyInfo(uint256, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { if (owner() == address(0x0)) { return (owner(), 0); } return (owner(), (_salePrice * royaltyBPS) / 10_000); } /** @dev Get URI for given token id @param tokenId token id to get uri for @return base64-encoded json metadata object */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "No token"); return sharedNFTLogic.createMetadataEdition( name(), description, imageUrl, animationUrl, tokenId, editionSize ); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, IERC165Upgradeable) returns (bool) { return type(IERC2981Upgradeable).interfaceId == interfaceId || ERC721Upgradeable.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _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); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev 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 salePrice - 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 `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable 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. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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 = ERC721Upgradeable.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 = ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.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 {} uint256[44] private __gap; }
// 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 IERC721ReceiverUpgradeable { /** * @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 "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @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; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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 AddressUpgradeable { /** * @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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { 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 "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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 /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides a function for encoding some bytes in base64 library Base64 { string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F))))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.6; interface IEditionSingleMintable { function mintEdition(address to) external returns (uint256); function mintEditions(address[] memory to) external returns (uint256); function owner() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import {Base64} from "base64-sol/base64.sol"; /// Shared NFT logic for rendering metadata associated with editions /// @dev Can safely be used for generic base64Encode and numberToString functions contract SharedNFTLogic { /// @param unencoded bytes to base64-encode function base64Encode(bytes memory unencoded) public pure returns (string memory) { return Base64.encode(unencoded); } /// Proxy to openzeppelin's toString function /// @param value number to return as a string function numberToString(uint256 value) public pure returns (string memory) { return StringsUpgradeable.toString(value); } /// Generate edition metadata from storage information as base64-json blob /// Combines the media data and metadata /// @param name Name of NFT in metadata /// @param description Description of NFT in metadata /// @param imageUrl URL of image to render for edition /// @param animationUrl URL of animation to render for edition /// @param tokenOfEdition Token ID for specific token /// @param editionSize Size of entire edition to show function createMetadataEdition( string memory name, string memory description, string memory imageUrl, string memory animationUrl, uint256 tokenOfEdition, uint256 editionSize ) external pure returns (string memory) { string memory _tokenMediaData = tokenMediaData( imageUrl, animationUrl, tokenOfEdition ); bytes memory json = createMetadataJSON( name, description, _tokenMediaData, tokenOfEdition, editionSize ); return encodeMetadataJSON(json); } /// Function to create the metadata json string for the nft edition /// @param name Name of NFT in metadata /// @param description Description of NFT in metadata /// @param mediaData Data for media to include in json object /// @param tokenOfEdition Token ID for specific token /// @param editionSize Size of entire edition to show function createMetadataJSON( string memory name, string memory description, string memory mediaData, uint256 tokenOfEdition, uint256 editionSize ) public pure returns (bytes memory) { bytes memory editionSizeText; if (editionSize > 0) { editionSizeText = abi.encodePacked( "/", numberToString(editionSize) ); } return abi.encodePacked( '{"name": "', name, " ", numberToString(tokenOfEdition), editionSizeText, '", "', 'description": "', description, '", "', mediaData, 'properties": {"number": ', numberToString(tokenOfEdition), ', "name": "', name, '"}}' ); } /// Encodes the argument json bytes into base64-data uri format /// @param json Raw json to base64 and turn into a data-uri function encodeMetadataJSON(bytes memory json) public pure returns (string memory) { return string( abi.encodePacked( "data:application/json;base64,", base64Encode(json) ) ); } /// Generates edition metadata from storage information as base64-json blob /// Combines the media data and metadata /// @param imageUrl URL of image to render for edition /// @param animationUrl URL of animation to render for edition function tokenMediaData( string memory imageUrl, string memory animationUrl, uint256 tokenOfEdition ) public pure returns (string memory) { bool hasImage = bytes(imageUrl).length > 0; bool hasAnimation = bytes(animationUrl).length > 0; if (hasImage && hasAnimation) { return string( abi.encodePacked( 'image": "', imageUrl, "?id=", numberToString(tokenOfEdition), '", "animation_url": "', animationUrl, "?id=", numberToString(tokenOfEdition), '", "' ) ); } if (hasImage) { return string( abi.encodePacked( 'image": "', imageUrl, "?id=", numberToString(tokenOfEdition), '", "' ) ); } if (hasAnimation) { return string( abi.encodePacked( 'animation_url": "', animationUrl, "?id=", numberToString(tokenOfEdition), '", "' ) ); } return ""; } }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 100 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract SharedNFTLogic","name":"_sharedNFTLogic","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":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"EditionSold","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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PriceChanged","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":[],"name":"editionSize","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":[],"name":"getURIs","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"string","name":"","type":"string"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"string","name":"_animationUrl","type":"string"},{"internalType":"bytes32","name":"_animationHash","type":"bytes32"},{"internalType":"string","name":"_imageUrl","type":"string"},{"internalType":"bytes32","name":"_imageHash","type":"bytes32"},{"internalType":"uint256","name":"_editionSize","type":"uint256"},{"internalType":"uint256","name":"_royaltyBPS","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintEdition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"mintEditions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","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":[],"name":"salePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setApprovedMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"setSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_imageUrl","type":"string"},{"internalType":"string","name":"_animationUrl","type":"string"}],"name":"updateEditionURLs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620026c0380380620026c083398101604081905262000034916200004a565b60601b6001600160601b0319166080526200007c565b6000602082840312156200005d57600080fd5b81516001600160a01b03811681146200007557600080fd5b9392505050565b60805160601c6126256200009b600039600061103f01526126256000f3fe6080604052600436106101775760003560e01c806364edfbf0116100cc578063b88d4fde1161007a578063b88d4fde1461043b578063c87b56dd1461045b578063e444bfcc1461047b578063e985e9c51461049b578063f2fde38b146104bb578063f4ed0f46146104db578063f51f96dd146104f157600080fd5b806364edfbf01461039457806370a082311461039c578063715018a6146103bc5780638da5cb5b146103d157806395d89b41146103e6578063a22cb465146103fb578063a66ff0af1461041b57600080fd5b806325f0ea901161012957806325f0ea901461029b57806328c5440f146102bb57806329ec16dd146102e05780632a55205a146103005780633ccfd60b1461033f57806342842e0e146103545780636352211e1461037457600080fd5b806301ffc9a71461017c57806306fdde03146101b1578063081812fc146101d3578063095ea7b31461020b5780630f6a93491461022d5780631919fed71461025b57806323b872dd1461027b575b600080fd5b34801561018857600080fd5b5061019c610197366004612002565b610507565b60405190151581526020015b60405180910390f35b3480156101bd57600080fd5b506101c6610532565b6040516101a89190612259565b3480156101df57600080fd5b506101f36101ee366004612115565b6105c4565b6040516001600160a01b0390911681526020016101a8565b34801561021757600080fd5b5061022b610226366004611f25565b610651565b005b34801561023957600080fd5b5061024d610248366004611f4f565b610762565b6040519081526020016101a8565b34801561026757600080fd5b5061022b610276366004612115565b610791565b34801561028757600080fd5b5061022b610296366004611d28565b6107fb565b3480156102a757600080fd5b5061022b6102b6366004611e1b565b61082c565b3480156102c757600080fd5b506102d061091b565b6040516101a8949392919061226c565b3480156102ec57600080fd5b5061022b6102fb366004611ddf565b610a53565b34801561030c57600080fd5b5061032061031b36600461212e565b610aad565b604080516001600160a01b0390931683526020830191909152016101a8565b34801561034b57600080fd5b5061022b610b0a565b34801561036057600080fd5b5061022b61036f366004611d28565b610be0565b34801561038057600080fd5b506101f361038f366004612115565b610bfb565b61024d610c72565b3480156103a857600080fd5b5061024d6103b7366004611cda565b610d8c565b3480156103c857600080fd5b5061022b610e13565b3480156103dd57600080fd5b506101f3610e4e565b3480156103f257600080fd5b506101c6610e67565b34801561040757600080fd5b5061022b610416366004611ddf565b610e76565b34801561042757600080fd5b5061024d610436366004611cda565b610f37565b34801561044757600080fd5b5061022b610456366004611d64565b610fc3565b34801561046757600080fd5b506101c6610476366004612115565b610ffb565b34801561048757600080fd5b5061022b6104963660046120b2565b6110f3565b3480156104a757600080fd5b5061019c6104b6366004611cf5565b611149565b3480156104c757600080fd5b5061022b6104d6366004611cda565b611177565b3480156104e757600080fd5b5061024d60ce5481565b3480156104fd57600080fd5b5061024d60d25481565b600063152a902d60e11b6001600160e01b03198316148061052c575061052c82611214565b92915050565b6060606580546105419061255c565b80601f016020809104026020016040519081016040528092919081815260200182805461056d9061255c565b80156105ba5780601f1061058f576101008083540402835291602001916105ba565b820191906000526020600020905b81548152906001019060200180831161059d57829003601f168201915b5050505050905090565b60006105cf82611264565b6106355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b600061065c82610bfb565b9050806001600160a01b0316836001600160a01b031614156106ca5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161062c565b336001600160a01b03821614806106e657506106e68133611149565b6107535760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161062c565b61075d8383611281565b505050565b600061076c6112ef565b6107885760405162461bcd60e51b815260040161062c906123e1565b61052c8261135e565b3361079a610e4e565b6001600160a01b0316146107c05760405162461bcd60e51b815260040161062c906123ac565b60d28190556040518181527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a150565b610805338261143f565b6108215760405162461bcd60e51b815260040161062c90612418565b61075d838383611501565b600054610100900460ff1680610845575060005460ff16155b6108615760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015610883576000805461ffff19166101011790555b61088d8a8a6116a1565b610895611728565b61089e8b611177565b87516108b19060c99060208b0190611bc7565b5086516108c59060ca9060208a0190611bc7565b5060cb86905584516108de9060cc906020880190611bc7565b5060cd84905560ce83905560d08290556108fc60cf80546001019055565b801561090e576000805461ff00191690555b5050505050505050505050565b606060006060600060cc60cd5460ca60cb548380546109399061255c565b80601f01602080910402602001604051908101604052809291908181526020018280546109659061255c565b80156109b25780601f10610987576101008083540402835291602001916109b2565b820191906000526020600020905b81548152906001019060200180831161099557829003601f168201915b505050505093508180546109c59061255c565b80601f01602080910402602001604051908101604052809291908181526020018280546109f19061255c565b8015610a3e5780601f10610a1357610100808354040283529160200191610a3e565b820191906000526020600020905b815481529060010190602001808311610a2157829003601f168201915b50505050509150935093509350935090919293565b33610a5c610e4e565b6001600160a01b031614610a825760405162461bcd60e51b815260040161062c906123ac565b6001600160a01b0391909116600090815260d160205260409020805460ff1916911515919091179055565b60008080610ab9610e4e565b6001600160a01b03161415610adb57610ad0610e4e565b600091509150610b03565b610ae3610e4e565b61271060d05485610af491906124fa565b610afe91906124d8565b915091505b9250929050565b33610b13610e4e565b6001600160a01b031614610b395760405162461bcd60e51b815260040161062c906123ac565b6000610b43610e4e565b6001600160a01b0316476184d090604051600060405180830381858888f193505050503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b5050905080610bdd5760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b604482015260640161062c565b50565b61075d83838360405180602001604052806000815250610fc3565b6000818152606760205260408120546001600160a01b03168061052c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161062c565b60008060d25411610cb45760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b604482015260640161062c565b60d2543414610cf35760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b604482015260640161062c565b604080516001808252818301909252600091602080830190803683370190505090503381600081518110610d2957610d296125ad565b6001600160a01b0390921660209283029190910182015260d2546040805191825233928201929092527f60a6c75698fadb72223808131f9f9bb9db3afa32122db6d94fb8fc985a504baa910160405180910390a1610d868161135e565b91505090565b60006001600160a01b038216610df75760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161062c565b506001600160a01b031660009081526068602052604090205490565b33610e1c610e4e565b6001600160a01b031614610e425760405162461bcd60e51b815260040161062c906123ac565b610e4c60006117a3565b565b6000610e626097546001600160a01b031690565b905090565b6060606680546105419061255c565b6001600160a01b038216331415610ecb5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161062c565b336000818152606a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610f416112ef565b610f5d5760405162461bcd60e51b815260040161062c906123e1565b604080516001808252818301909252600091602080830190803683370190505090508281600081518110610f9357610f936125ad565b60200260200101906001600160a01b031690816001600160a01b031681525050610fbc8161135e565b9392505050565b610fcd338361143f565b610fe95760405162461bcd60e51b815260040161062c90612418565b610ff5848484846117f5565b50505050565b606061100682611264565b61103d5760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b604482015260640161062c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663df30dba0611074610532565b60c960cc60ca8760ce546040518763ffffffff1660e01b815260040161109f969594939291906122a9565b60006040518083038186803b1580156110b757600080fd5b505afa1580156110cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261052c919081019061203c565b336110fc610e4e565b6001600160a01b0316146111225760405162461bcd60e51b815260040161062c906123ac565b81516111359060cc906020850190611bc7565b50805161075d9060ca906020840190611bc7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b33611180610e4e565b6001600160a01b0316146111a65760405162461bcd60e51b815260040161062c906123ac565b6001600160a01b03811661120b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062c565b610bdd816117a3565b60006001600160e01b031982166380ac58cd60e01b148061124557506001600160e01b03198216635b5e139f60e01b145b8061052c57506301ffc9a760e01b6001600160e01b031983161461052c565b6000908152606760205260409020546001600160a01b0316151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112b682610bfb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000336112fa610e4e565b6001600160a01b0316141561130f5750600190565b6000805260d16020527efa5413e7b01fc543d01f0911de573ace463b956369df4472f39030e8d98b775460ff16156113475750600190565b5033600090815260d1602052604090205460ff1690565b60008061136a60cf5490565b90506000600184518361137d91906124c0565b6113879190612519565b905060ce546000148061139c575060ce548111155b6113d35760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b604482015260640161062c565b806113dd60cf5490565b116114335761142084836113f060cf5490565b6113fa9190612519565b8151811061140a5761140a6125ad565b602002602001015161141b60cf5490565b611828565b61142e60cf80546001019055565b6113d3565b60cf545b949350505050565b600061144a82611264565b6114ab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161062c565b60006114b683610bfb565b9050806001600160a01b0316846001600160a01b031614806114f15750836001600160a01b03166114e6846105c4565b6001600160a01b0316145b8061143757506114378185611149565b826001600160a01b031661151482610bfb565b6001600160a01b03161461157c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161062c565b6001600160a01b0382166115de5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161062c565b6115e9600082611281565b6001600160a01b0383166000908152606860205260408120805460019290611612908490612519565b90915550506001600160a01b03821660009081526068602052604081208054600192906116409084906124c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16806116ba575060005460ff16155b6116d65760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff161580156116f8576000805461ffff19166101011790555b61170061195b565b61170861195b565b61171283836119c5565b801561075d576000805461ff0019169055505050565b600054610100900460ff1680611741575060005460ff16155b61175d5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff1615801561177f576000805461ffff19166101011790555b61178761195b565b61178f611a5a565b8015610bdd576000805461ff001916905550565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611800848484611501565b61180c84848484611aba565b610ff55760405162461bcd60e51b815260040161062c9061230c565b6001600160a01b03821661187e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161062c565b61188781611264565b156118d45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161062c565b6001600160a01b03821660009081526068602052604081208054600192906118fd9084906124c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff1680611974575060005460ff16155b6119905760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff1615801561178f576000805461ffff19166101011790558015610bdd576000805461ff001916905550565b600054610100900460ff16806119de575060005460ff16155b6119fa5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015611a1c576000805461ffff19166101011790555b8251611a2f906065906020860190611bc7565b508151611a43906066906020850190611bc7565b50801561075d576000805461ff0019169055505050565b600054610100900460ff1680611a73575060005460ff16155b611a8f5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015611ab1576000805461ffff19166101011790555b61178f336117a3565b60006001600160a01b0384163b15611bbc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611afe90339089908890889060040161221c565b602060405180830381600087803b158015611b1857600080fd5b505af1925050508015611b48575060408051601f3d908101601f19168201909252611b459181019061201f565b60015b611ba2573d808015611b76576040519150601f19603f3d011682016040523d82523d6000602084013e611b7b565b606091505b508051611b9a5760405162461bcd60e51b815260040161062c9061230c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611437565b506001949350505050565b828054611bd39061255c565b90600052602060002090601f016020900481019282611bf55760008555611c3b565b82601f10611c0e57805160ff1916838001178555611c3b565b82800160010185558215611c3b579182015b82811115611c3b578251825591602001919060010190611c20565b50611c47929150611c4b565b5090565b5b80821115611c475760008155600101611c4c565b6000611c73611c6e84612499565b612469565b9050828152838383011115611c8757600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114611cb557600080fd5b919050565b600082601f830112611ccb57600080fd5b610fbc83833560208501611c60565b600060208284031215611cec57600080fd5b610fbc82611c9e565b60008060408385031215611d0857600080fd5b611d1183611c9e565b9150611d1f60208401611c9e565b90509250929050565b600080600060608486031215611d3d57600080fd5b611d4684611c9e565b9250611d5460208501611c9e565b9150604084013590509250925092565b60008060008060808587031215611d7a57600080fd5b611d8385611c9e565b9350611d9160208601611c9e565b92506040850135915060608501356001600160401b03811115611db357600080fd5b8501601f81018713611dc457600080fd5b611dd387823560208401611c60565b91505092959194509250565b60008060408385031215611df257600080fd5b611dfb83611c9e565b915060208301358015158114611e1057600080fd5b809150509250929050565b6000806000806000806000806000806101408b8d031215611e3b57600080fd5b611e448b611c9e565b995060208b01356001600160401b0380821115611e6057600080fd5b611e6c8e838f01611cba565b9a5060408d0135915080821115611e8257600080fd5b611e8e8e838f01611cba565b995060608d0135915080821115611ea457600080fd5b611eb08e838f01611cba565b985060808d0135915080821115611ec657600080fd5b611ed28e838f01611cba565b975060a08d0135965060c08d0135915080821115611eef57600080fd5b50611efc8d828e01611cba565b94505060e08b013592506101008b013591506101208b013590509295989b9194979a5092959850565b60008060408385031215611f3857600080fd5b611f4183611c9e565b946020939093013593505050565b60006020808385031215611f6257600080fd5b82356001600160401b0380821115611f7957600080fd5b818501915085601f830112611f8d57600080fd5b813581811115611f9f57611f9f6125c3565b8060051b9150611fb0848301612469565b8181528481019084860184860187018a1015611fcb57600080fd5b600095505b83861015611ff557611fe181611c9e565b835260019590950194918601918601611fd0565b5098975050505050505050565b60006020828403121561201457600080fd5b8135610fbc816125d9565b60006020828403121561203157600080fd5b8151610fbc816125d9565b60006020828403121561204e57600080fd5b81516001600160401b0381111561206457600080fd5b8201601f8101841361207557600080fd5b8051612083611c6e82612499565b81815285602083850101111561209857600080fd5b6120a9826020830160208601612530565b95945050505050565b600080604083850312156120c557600080fd5b82356001600160401b03808211156120dc57600080fd5b6120e886838701611cba565b935060208501359150808211156120fe57600080fd5b5061210b85828601611cba565b9150509250929050565b60006020828403121561212757600080fd5b5035919050565b6000806040838503121561214157600080fd5b50508035926020909101359150565b60008151808452612168816020860160208601612530565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061219657607f831692505b60208084108214156121b857634e487b7160e01b600052602260045260246000fd5b838852602088018280156121d357600181146121e45761220f565b60ff1987168252828201975061220f565b60008981526020902060005b87811015612209578154848201529086019084016121f0565b83019850505b5050505050505092915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061224f90830184612150565b9695505050505050565b602081526000610fbc6020830184612150565b60808152600061227f6080830187612150565b85602084015282810360408401526122978186612150565b91505082606083015295945050505050565b60c0815260006122bc60c0830189612150565b82810360208401526122ce818961217c565b905082810360408401526122e2818861217c565b905082810360608401526122f6818761217c565b6080840195909552505060a00152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f4e6565647320746f20626520616e20616c6c6f776564206d696e746572000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b0381118282101715612491576124916125c3565b604052919050565b60006001600160401b038211156124b2576124b26125c3565b50601f01601f191660200190565b600082198211156124d3576124d3612597565b500190565b6000826124f557634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561251457612514612597565b500290565b60008282101561252b5761252b612597565b500390565b60005b8381101561254b578181015183820152602001612533565b83811115610ff55750506000910152565b600181811c9082168061257057607f821691505b6020821081141561259157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610bdd57600080fdfea2646970667358221220452b7be028ea3d70377ffae93beed863a4427e176b9d8dd40441de294f934c0b64736f6c634300080600330000000000000000000000007eb947242dbf042e6388c329a614165d73548670
Deployed Bytecode
0x6080604052600436106101775760003560e01c806364edfbf0116100cc578063b88d4fde1161007a578063b88d4fde1461043b578063c87b56dd1461045b578063e444bfcc1461047b578063e985e9c51461049b578063f2fde38b146104bb578063f4ed0f46146104db578063f51f96dd146104f157600080fd5b806364edfbf01461039457806370a082311461039c578063715018a6146103bc5780638da5cb5b146103d157806395d89b41146103e6578063a22cb465146103fb578063a66ff0af1461041b57600080fd5b806325f0ea901161012957806325f0ea901461029b57806328c5440f146102bb57806329ec16dd146102e05780632a55205a146103005780633ccfd60b1461033f57806342842e0e146103545780636352211e1461037457600080fd5b806301ffc9a71461017c57806306fdde03146101b1578063081812fc146101d3578063095ea7b31461020b5780630f6a93491461022d5780631919fed71461025b57806323b872dd1461027b575b600080fd5b34801561018857600080fd5b5061019c610197366004612002565b610507565b60405190151581526020015b60405180910390f35b3480156101bd57600080fd5b506101c6610532565b6040516101a89190612259565b3480156101df57600080fd5b506101f36101ee366004612115565b6105c4565b6040516001600160a01b0390911681526020016101a8565b34801561021757600080fd5b5061022b610226366004611f25565b610651565b005b34801561023957600080fd5b5061024d610248366004611f4f565b610762565b6040519081526020016101a8565b34801561026757600080fd5b5061022b610276366004612115565b610791565b34801561028757600080fd5b5061022b610296366004611d28565b6107fb565b3480156102a757600080fd5b5061022b6102b6366004611e1b565b61082c565b3480156102c757600080fd5b506102d061091b565b6040516101a8949392919061226c565b3480156102ec57600080fd5b5061022b6102fb366004611ddf565b610a53565b34801561030c57600080fd5b5061032061031b36600461212e565b610aad565b604080516001600160a01b0390931683526020830191909152016101a8565b34801561034b57600080fd5b5061022b610b0a565b34801561036057600080fd5b5061022b61036f366004611d28565b610be0565b34801561038057600080fd5b506101f361038f366004612115565b610bfb565b61024d610c72565b3480156103a857600080fd5b5061024d6103b7366004611cda565b610d8c565b3480156103c857600080fd5b5061022b610e13565b3480156103dd57600080fd5b506101f3610e4e565b3480156103f257600080fd5b506101c6610e67565b34801561040757600080fd5b5061022b610416366004611ddf565b610e76565b34801561042757600080fd5b5061024d610436366004611cda565b610f37565b34801561044757600080fd5b5061022b610456366004611d64565b610fc3565b34801561046757600080fd5b506101c6610476366004612115565b610ffb565b34801561048757600080fd5b5061022b6104963660046120b2565b6110f3565b3480156104a757600080fd5b5061019c6104b6366004611cf5565b611149565b3480156104c757600080fd5b5061022b6104d6366004611cda565b611177565b3480156104e757600080fd5b5061024d60ce5481565b3480156104fd57600080fd5b5061024d60d25481565b600063152a902d60e11b6001600160e01b03198316148061052c575061052c82611214565b92915050565b6060606580546105419061255c565b80601f016020809104026020016040519081016040528092919081815260200182805461056d9061255c565b80156105ba5780601f1061058f576101008083540402835291602001916105ba565b820191906000526020600020905b81548152906001019060200180831161059d57829003601f168201915b5050505050905090565b60006105cf82611264565b6106355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b600061065c82610bfb565b9050806001600160a01b0316836001600160a01b031614156106ca5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161062c565b336001600160a01b03821614806106e657506106e68133611149565b6107535760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161062c565b61075d8383611281565b505050565b600061076c6112ef565b6107885760405162461bcd60e51b815260040161062c906123e1565b61052c8261135e565b3361079a610e4e565b6001600160a01b0316146107c05760405162461bcd60e51b815260040161062c906123ac565b60d28190556040518181527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a150565b610805338261143f565b6108215760405162461bcd60e51b815260040161062c90612418565b61075d838383611501565b600054610100900460ff1680610845575060005460ff16155b6108615760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015610883576000805461ffff19166101011790555b61088d8a8a6116a1565b610895611728565b61089e8b611177565b87516108b19060c99060208b0190611bc7565b5086516108c59060ca9060208a0190611bc7565b5060cb86905584516108de9060cc906020880190611bc7565b5060cd84905560ce83905560d08290556108fc60cf80546001019055565b801561090e576000805461ff00191690555b5050505050505050505050565b606060006060600060cc60cd5460ca60cb548380546109399061255c565b80601f01602080910402602001604051908101604052809291908181526020018280546109659061255c565b80156109b25780601f10610987576101008083540402835291602001916109b2565b820191906000526020600020905b81548152906001019060200180831161099557829003601f168201915b505050505093508180546109c59061255c565b80601f01602080910402602001604051908101604052809291908181526020018280546109f19061255c565b8015610a3e5780601f10610a1357610100808354040283529160200191610a3e565b820191906000526020600020905b815481529060010190602001808311610a2157829003601f168201915b50505050509150935093509350935090919293565b33610a5c610e4e565b6001600160a01b031614610a825760405162461bcd60e51b815260040161062c906123ac565b6001600160a01b0391909116600090815260d160205260409020805460ff1916911515919091179055565b60008080610ab9610e4e565b6001600160a01b03161415610adb57610ad0610e4e565b600091509150610b03565b610ae3610e4e565b61271060d05485610af491906124fa565b610afe91906124d8565b915091505b9250929050565b33610b13610e4e565b6001600160a01b031614610b395760405162461bcd60e51b815260040161062c906123ac565b6000610b43610e4e565b6001600160a01b0316476184d090604051600060405180830381858888f193505050503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b5050905080610bdd5760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b604482015260640161062c565b50565b61075d83838360405180602001604052806000815250610fc3565b6000818152606760205260408120546001600160a01b03168061052c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161062c565b60008060d25411610cb45760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b604482015260640161062c565b60d2543414610cf35760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b604482015260640161062c565b604080516001808252818301909252600091602080830190803683370190505090503381600081518110610d2957610d296125ad565b6001600160a01b0390921660209283029190910182015260d2546040805191825233928201929092527f60a6c75698fadb72223808131f9f9bb9db3afa32122db6d94fb8fc985a504baa910160405180910390a1610d868161135e565b91505090565b60006001600160a01b038216610df75760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161062c565b506001600160a01b031660009081526068602052604090205490565b33610e1c610e4e565b6001600160a01b031614610e425760405162461bcd60e51b815260040161062c906123ac565b610e4c60006117a3565b565b6000610e626097546001600160a01b031690565b905090565b6060606680546105419061255c565b6001600160a01b038216331415610ecb5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161062c565b336000818152606a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610f416112ef565b610f5d5760405162461bcd60e51b815260040161062c906123e1565b604080516001808252818301909252600091602080830190803683370190505090508281600081518110610f9357610f936125ad565b60200260200101906001600160a01b031690816001600160a01b031681525050610fbc8161135e565b9392505050565b610fcd338361143f565b610fe95760405162461bcd60e51b815260040161062c90612418565b610ff5848484846117f5565b50505050565b606061100682611264565b61103d5760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b604482015260640161062c565b7f0000000000000000000000007eb947242dbf042e6388c329a614165d735486706001600160a01b031663df30dba0611074610532565b60c960cc60ca8760ce546040518763ffffffff1660e01b815260040161109f969594939291906122a9565b60006040518083038186803b1580156110b757600080fd5b505afa1580156110cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261052c919081019061203c565b336110fc610e4e565b6001600160a01b0316146111225760405162461bcd60e51b815260040161062c906123ac565b81516111359060cc906020850190611bc7565b50805161075d9060ca906020840190611bc7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b33611180610e4e565b6001600160a01b0316146111a65760405162461bcd60e51b815260040161062c906123ac565b6001600160a01b03811661120b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062c565b610bdd816117a3565b60006001600160e01b031982166380ac58cd60e01b148061124557506001600160e01b03198216635b5e139f60e01b145b8061052c57506301ffc9a760e01b6001600160e01b031983161461052c565b6000908152606760205260409020546001600160a01b0316151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112b682610bfb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000336112fa610e4e565b6001600160a01b0316141561130f5750600190565b6000805260d16020527efa5413e7b01fc543d01f0911de573ace463b956369df4472f39030e8d98b775460ff16156113475750600190565b5033600090815260d1602052604090205460ff1690565b60008061136a60cf5490565b90506000600184518361137d91906124c0565b6113879190612519565b905060ce546000148061139c575060ce548111155b6113d35760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b604482015260640161062c565b806113dd60cf5490565b116114335761142084836113f060cf5490565b6113fa9190612519565b8151811061140a5761140a6125ad565b602002602001015161141b60cf5490565b611828565b61142e60cf80546001019055565b6113d3565b60cf545b949350505050565b600061144a82611264565b6114ab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161062c565b60006114b683610bfb565b9050806001600160a01b0316846001600160a01b031614806114f15750836001600160a01b03166114e6846105c4565b6001600160a01b0316145b8061143757506114378185611149565b826001600160a01b031661151482610bfb565b6001600160a01b03161461157c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161062c565b6001600160a01b0382166115de5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161062c565b6115e9600082611281565b6001600160a01b0383166000908152606860205260408120805460019290611612908490612519565b90915550506001600160a01b03821660009081526068602052604081208054600192906116409084906124c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16806116ba575060005460ff16155b6116d65760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff161580156116f8576000805461ffff19166101011790555b61170061195b565b61170861195b565b61171283836119c5565b801561075d576000805461ff0019169055505050565b600054610100900460ff1680611741575060005460ff16155b61175d5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff1615801561177f576000805461ffff19166101011790555b61178761195b565b61178f611a5a565b8015610bdd576000805461ff001916905550565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611800848484611501565b61180c84848484611aba565b610ff55760405162461bcd60e51b815260040161062c9061230c565b6001600160a01b03821661187e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161062c565b61188781611264565b156118d45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161062c565b6001600160a01b03821660009081526068602052604081208054600192906118fd9084906124c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff1680611974575060005460ff16155b6119905760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff1615801561178f576000805461ffff19166101011790558015610bdd576000805461ff001916905550565b600054610100900460ff16806119de575060005460ff16155b6119fa5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015611a1c576000805461ffff19166101011790555b8251611a2f906065906020860190611bc7565b508151611a43906066906020850190611bc7565b50801561075d576000805461ff0019169055505050565b600054610100900460ff1680611a73575060005460ff16155b611a8f5760405162461bcd60e51b815260040161062c9061235e565b600054610100900460ff16158015611ab1576000805461ffff19166101011790555b61178f336117a3565b60006001600160a01b0384163b15611bbc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611afe90339089908890889060040161221c565b602060405180830381600087803b158015611b1857600080fd5b505af1925050508015611b48575060408051601f3d908101601f19168201909252611b459181019061201f565b60015b611ba2573d808015611b76576040519150601f19603f3d011682016040523d82523d6000602084013e611b7b565b606091505b508051611b9a5760405162461bcd60e51b815260040161062c9061230c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611437565b506001949350505050565b828054611bd39061255c565b90600052602060002090601f016020900481019282611bf55760008555611c3b565b82601f10611c0e57805160ff1916838001178555611c3b565b82800160010185558215611c3b579182015b82811115611c3b578251825591602001919060010190611c20565b50611c47929150611c4b565b5090565b5b80821115611c475760008155600101611c4c565b6000611c73611c6e84612499565b612469565b9050828152838383011115611c8757600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114611cb557600080fd5b919050565b600082601f830112611ccb57600080fd5b610fbc83833560208501611c60565b600060208284031215611cec57600080fd5b610fbc82611c9e565b60008060408385031215611d0857600080fd5b611d1183611c9e565b9150611d1f60208401611c9e565b90509250929050565b600080600060608486031215611d3d57600080fd5b611d4684611c9e565b9250611d5460208501611c9e565b9150604084013590509250925092565b60008060008060808587031215611d7a57600080fd5b611d8385611c9e565b9350611d9160208601611c9e565b92506040850135915060608501356001600160401b03811115611db357600080fd5b8501601f81018713611dc457600080fd5b611dd387823560208401611c60565b91505092959194509250565b60008060408385031215611df257600080fd5b611dfb83611c9e565b915060208301358015158114611e1057600080fd5b809150509250929050565b6000806000806000806000806000806101408b8d031215611e3b57600080fd5b611e448b611c9e565b995060208b01356001600160401b0380821115611e6057600080fd5b611e6c8e838f01611cba565b9a5060408d0135915080821115611e8257600080fd5b611e8e8e838f01611cba565b995060608d0135915080821115611ea457600080fd5b611eb08e838f01611cba565b985060808d0135915080821115611ec657600080fd5b611ed28e838f01611cba565b975060a08d0135965060c08d0135915080821115611eef57600080fd5b50611efc8d828e01611cba565b94505060e08b013592506101008b013591506101208b013590509295989b9194979a5092959850565b60008060408385031215611f3857600080fd5b611f4183611c9e565b946020939093013593505050565b60006020808385031215611f6257600080fd5b82356001600160401b0380821115611f7957600080fd5b818501915085601f830112611f8d57600080fd5b813581811115611f9f57611f9f6125c3565b8060051b9150611fb0848301612469565b8181528481019084860184860187018a1015611fcb57600080fd5b600095505b83861015611ff557611fe181611c9e565b835260019590950194918601918601611fd0565b5098975050505050505050565b60006020828403121561201457600080fd5b8135610fbc816125d9565b60006020828403121561203157600080fd5b8151610fbc816125d9565b60006020828403121561204e57600080fd5b81516001600160401b0381111561206457600080fd5b8201601f8101841361207557600080fd5b8051612083611c6e82612499565b81815285602083850101111561209857600080fd5b6120a9826020830160208601612530565b95945050505050565b600080604083850312156120c557600080fd5b82356001600160401b03808211156120dc57600080fd5b6120e886838701611cba565b935060208501359150808211156120fe57600080fd5b5061210b85828601611cba565b9150509250929050565b60006020828403121561212757600080fd5b5035919050565b6000806040838503121561214157600080fd5b50508035926020909101359150565b60008151808452612168816020860160208601612530565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061219657607f831692505b60208084108214156121b857634e487b7160e01b600052602260045260246000fd5b838852602088018280156121d357600181146121e45761220f565b60ff1987168252828201975061220f565b60008981526020902060005b87811015612209578154848201529086019084016121f0565b83019850505b5050505050505092915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061224f90830184612150565b9695505050505050565b602081526000610fbc6020830184612150565b60808152600061227f6080830187612150565b85602084015282810360408401526122978186612150565b91505082606083015295945050505050565b60c0815260006122bc60c0830189612150565b82810360208401526122ce818961217c565b905082810360408401526122e2818861217c565b905082810360608401526122f6818761217c565b6080840195909552505060a00152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f4e6565647320746f20626520616e20616c6c6f776564206d696e746572000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b0381118282101715612491576124916125c3565b604052919050565b60006001600160401b038211156124b2576124b26125c3565b50601f01601f191660200190565b600082198211156124d3576124d3612597565b500190565b6000826124f557634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561251457612514612597565b500290565b60008282101561252b5761252b612597565b500390565b60005b8381101561254b578181015183820152602001612533565b83811115610ff55750506000910152565b600181811c9082168061257057607f821691505b6020821081141561259157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610bdd57600080fdfea2646970667358221220452b7be028ea3d70377ffae93beed863a4427e176b9d8dd40441de294f934c0b64736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007eb947242dbf042e6388c329a614165d73548670
-----Decoded View---------------
Arg [0] : _sharedNFTLogic (address): 0x7eB947242dbF042e6388C329A614165d73548670
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007eb947242dbf042e6388c329a614165d73548670
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.