ERC-721
Overview
Max Total Supply
513 METADAONFT
Holders
181
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 METADAONFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MetaDaoNft
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './utils/MerkleProof.sol'; import '@openzeppelin/contracts/access/AccessControlEnumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'erc721a/contracts/ERC721A.sol'; /** * @title Meta DAO NFT * * @notice This implements the contract for the Meta DAO NFT. * Contract can be paused by disabling public mints and creating a bogus merkle * root tree for the whitelist. Funds from sales can be withdrawn any time by * anyone and will withdrawn to founders + artist. All founders on the contract * share a 90% split and can be removed. The artist gets a 10% split and * can never be removed. */ contract MetaDaoNft is ERC721A, Ownable, AccessControlEnumerable { /// @dev The price of a single mint in Ether uint256 public constant PRICE = 0.04 ether; /// @dev Hardcoded cap on the maximum number of mints. uint256 public constant MAX_MINTS = 4444; /// @dev A role for people who are project founders. bytes32 public constant FOUNDER_ROLE = keccak256('FOUNDER_ROLE'); /// @dev A role for the artist. bytes32 public constant ARTIST_ROLE = keccak256('ARTIST_ROLE'); /// @dev Holds the value of the baseURI for token generation string private _baseTokenURI; /// @dev A mapping of addresses to claimable mints mapping(address => uint256) public staffAllocations; /** * @dev Indicates if public minting is opened. If true, addresses not on the * whitelist can mint tokens. If false, the address must be on the whitelist * to mint. */ bool public isPublicMintingAllowed = false; /** * @dev A merkle tree root for the whitelist. The merkle tree is generated * off-chain to save gas, and the root is stored on contract for verification. */ bytes32 private _whitelistMerkleRoot; /// @dev An event emitted when the mint was successful. event SuccessfulMint(uint256 numMints, address recipient); /// @dev An event emitted when funds have been received. event ReceivedFunds(uint256 msgValue); /// @dev Gates functions that should only be called by the contract admins. modifier onlyAdmin() { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), 'Must be an admin.'); _; // Executes the rest of the modified function } /// @dev Gates functions that should only be called by people who have claimable free mints modifier onlyWithAllocation() { uint256 claimableMints = staffAllocations[_msgSender()]; require(claimableMints > 0, 'Must have claimable mints'); _; // Executes the rest of the modified function } /** * @dev Gates functions that should only be called if there are mints left * * @param numMints The number of mints attempting to be minted. */ modifier onlyWithMintsLeft(uint256 numMints) { require(totalSupply() != MAX_MINTS, 'Soldout!'); require(totalSupply() + numMints <= MAX_MINTS, 'Not enough mints left.'); _; // Executes the rest of the modified function } /** * @notice Deploys the contract, sets the baseTokenURI, sets the the max * mints, roles for founders and disables public minting. * * @param founders The addresses of founders to be granted founder role. * @param artist The address of the artist to be granted artist role. * @param staff The address of the staff members who will be granted 5 free mints * @param newBaseURI The base URI for the artwork generated for this contract */ constructor( address[] memory founders, address artist, address[] memory staff, string memory newBaseURI ) ERC721A('Meta DAO NFT', 'METADAONFT') { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _baseTokenURI = newBaseURI; for (uint256 i = 0; i < staff.length; i++) { address staffAddress = staff[i]; staffAllocations[staffAddress] = 5; // 5 claimable mints per staff member } for (uint256 i = 0; i < founders.length; i++) { address founderAddress = founders[i]; staffAllocations[founderAddress] = 20; // 20 claimable mints per founder } staffAllocations[artist] = 20; // 20 claimable mints for artist _setupRole(ARTIST_ROLE, artist); for (uint256 i = 0; i < founders.length; i++) { _setupRole(FOUNDER_ROLE, founders[i]); } } function _baseURI() internal view override returns (string memory) { return _baseTokenURI; } /** * @notice Admin-only function to set the whitelist with a merkle root that * is generated off-chain. * * @param whitelistMerkleRoot An off-chain-generated merkle root for a list * of addresses that should be whitelisted. For more info on generating * merkle roots off chain for this contract, see: * https://dev.to/0xmojo7/merkle-tree-solidity-sc-validation-568m */ function updateWhitelist(bytes32 whitelistMerkleRoot) public onlyAdmin { _whitelistMerkleRoot = whitelistMerkleRoot; } /** * @notice Verifies the whitelist status of a recipient address. * @dev To generate the parameters for this function, see: * https://dev.to/0xmojo7/merkle-tree-solidity-sc-validation-568m * https://github.com/miguelmota/merkletreejs/ * * @param recipient The address to check. * @param _proof Array of hex values denoting the kekkack hashes of leaves * in the merkle root tree leading to verified address. * @param _positions Array of string values of 'left' or 'right' denoting the * position of the address in the corresponding _proof array to navigate to * the verifiable address. * * @return True if the address is whitelisted, false otherwise. */ function verifyWhitelist( address recipient, bytes32[] memory _proof, uint256[] memory _positions ) public view returns (bool) { if (_proof.length == 0 || _positions.length == 0) { return false; } else { bytes32 _leaf = keccak256(abi.encodePacked(recipient)); return MerkleProof.verify(_whitelistMerkleRoot, _leaf, _proof, _positions); } } /** * @notice Mints new tokens for the recipient. Admins can mint any number of * free tokens per transaction, for use in marketing purposes or to give away. * During whitelist, the sender must be whitelisted and provide a proof and * position in the Merkle Tree. During whitelist, there's a max of 2 mints * per tx. During public sales, there's a max of 5 mints per tx. The value * of the transaction must be at least the mint price multiplied by the * number of mints being minted. * * @dev To generate the _proof and _positions parameters for this function, see: * https://dev.to/0xmojo7/merkle-tree-solidity-sc-validation-568m * https://github.com/miguelmota/merkletreejs/ * * @param recipient The address to receive the newly minted tokens * @param numMints The number of mints to mint * @param _proof Array of hex values denoting the kekkack hashes of leaves * in the merkle root tree leading to verified address. Used to verify the * recipient is whitelisted, if minting during whitelist period. * @param _positions Array of string values of 'left' or 'right' denoting the * position of the address in the corresponding _proof array to navigate to * the verifiable address. Used to verify the is whitelisted, if minting * during whitelist period. */ function mint( address recipient, uint8 numMints, bytes32[] memory _proof, uint256[] memory _positions ) public payable onlyWithMintsLeft(numMints) { require(numMints > 0, 'Must provide an amount to mint.'); if (!hasRole(DEFAULT_ADMIN_ROLE, _msgSender())) { require(msg.value >= PRICE * numMints, 'Value below price'); if (isPublicMintingAllowed) { require(numMints <= 5, 'Can mint a max of 5 during public sale'); } else { require(verifyWhitelist(_msgSender(), _proof, _positions), 'Not on whitelist.'); require(numMints <= 2, 'Can mint a max of 2 during presale'); } } _safeMint(recipient, numMints); emit SuccessfulMint(numMints, recipient); } /** * @notice Mints claimable tokens for staff members, artist, and founders. * * @dev This function pulls the allocations from the staffAllocations map, * and mints the appropriate number of mints for the address claiming, then * marks the mints as claimed by setting the value in the map to 0. */ function staffMint() public onlyWithAllocation onlyWithMintsLeft(staffAllocations[_msgSender()]) { _safeMint(_msgSender(), staffAllocations[_msgSender()]); staffAllocations[_msgSender()] = 0; emit SuccessfulMint(staffAllocations[_msgSender()], _msgSender()); } /** * @notice Enables public minting. When enabled, addresses that are not on * the whitelist are able to mint. */ function allowPublicMinting() public onlyAdmin { isPublicMintingAllowed = true; } /** * @notice Enables public minting. When enabled, addresses that are not on * the whitelist are able to mint. */ function disallowPublicMinting() public onlyAdmin { isPublicMintingAllowed = false; } /** * @dev All interfaces need to support `supportsInterface`. This function * checks if the provided interface ID is supported. * * @param interfaceId The interface ID to check. * * @return True if the interface is supported (AccessControlEnumerable, * ERC721, ERC721Enumerable), false otherwise. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721A) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Withdraws all funds from contract address. Founders get 90%, * artist gets remaining 10%. * */ function withdrawAll() public { uint256 balance = address(this).balance; uint256 founderCount = getRoleMemberCount(FOUNDER_ROLE); require(balance > 0, 'Nothing to withdraw.'); // 90% split between founders uint256 founderBalance = (balance * 9) / 10; for (uint256 i = 0; i < founderCount; i++) { address member = getRoleMember(FOUNDER_ROLE, i); _withdraw(member, founderBalance / founderCount); } uint256 artistBalance = address(this).balance; // Should be the remaining 10%. address artist = getRoleMember(ARTIST_ROLE, 0); _withdraw(artist, artistBalance); } /** * @dev Encapsulates the logic of withdrawing funds from the contract to * a given address. * * @param recipient The address to receive the funds. * @param amount The amount of funds to be withdrawn. */ function _withdraw(address recipient, uint256 amount) private { (bool success, ) = recipient.call{value: amount}(''); require(success, 'Transfer failed.'); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Proves inclusion on a merkle tree. */ library MerkleProof { // @notice verifies a proof of inclusion of a value in a Merkle tree function verify( bytes32 root, bytes32 leaf, bytes32[] memory proof, uint256[] memory positions ) internal pure returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (positions[i] == 1) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash == root; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; } // Compiler will pack the following // _currentIndex and _burnCounter into a single 256bit word. // The tokenId of the next token to be minted. uint128 internal _currentIndex; // The number of tokens burned. uint128 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @dev See {IERC721Enumerable-tokenByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenByIndex(uint256 index) public view override returns (uint256) { uint256 numMintedSoFar = _currentIndex; uint256 tokenIdsIdx; // Counter overflow is impossible as the loop breaks when // uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (!ownership.burned) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert TokenIndexOutOfBounds(); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds(); uint256 numMintedSoFar = _currentIndex; uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when // uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } // Execution should never reach this point. revert(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _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 { _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 { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data)) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = uint128(updatedIndex); } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @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); } } } }
{ "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"founders","type":"address[]"},{"internalType":"address","name":"artist","type":"address"},{"internalType":"address[]","name":"staff","type":"address[]"},{"internalType":"string","name":"newBaseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"ReceivedFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numMints","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"SuccessfulMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ARTIST_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FOUNDER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowPublicMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disallowPublicMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMintingAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint8","name":"numMints","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256[]","name":"_positions","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"payable","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"staffAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"staffMint","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"whitelistMerkleRoot","type":"bytes32"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256[]","name":"_positions","type":"uint256[]"}],"name":"verifyWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600c805460ff191690553480156200001b57600080fd5b50604051620031f9380380620031f98339810160408190526200003e91620005cd565b604080518082018252600c81526b13595d1848111053c813919560a21b60208083019182528351808501909452600a84526913515510511053d3919560b21b908401528151919291620000949160019162000430565b508051620000aa90600290602084019062000430565b505050620000c7620000c16200027160201b60201c565b62000275565b620000d4600033620002c7565b8051620000e990600a90602084019062000430565b5060005b82518110156200014b5760008382815181106200010e576200010e620006ea565b6020908102919091018101516001600160a01b03166000908152600b90915260409020600590555080620001428162000700565b915050620000ed565b5060005b8451811015620001ad576000858281518110620001705762000170620006ea565b6020908102919091018101516001600160a01b03166000908152600b90915260409020601490555080620001a48162000700565b9150506200014f565b506001600160a01b0383166000908152600b6020526040902060149055620001f67f877a78dc988c0ec5f58453b44888a55eb39755c3d5ed8d8ea990912aa3ef29c684620002c7565b60005b84518110156200026657620002517f7ed687a8f2955bd2ba7ca08227e1e364d132be747f42fb733165f923021b02258683815181106200023d576200023d620006ea565b6020026020010151620002c760201b60201c565b806200025d8162000700565b915050620001f9565b505050505062000767565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002d38282620002d7565b5050565b620002ee82826200031a60201b6200139e1760201c565b60008281526009602090815260409091206200031591839062001424620003be821b17901c565b505050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620002d35760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200037a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620003d5836001600160a01b038416620003de565b90505b92915050565b60008181526001830160205260408120546200042757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003d8565b506000620003d8565b8280546200043e906200072a565b90600052602060002090601f016020900481019282620004625760008555620004ad565b82601f106200047d57805160ff1916838001178555620004ad565b82800160010185558215620004ad579182015b82811115620004ad57825182559160200191906001019062000490565b50620004bb929150620004bf565b5090565b5b80821115620004bb5760008155600101620004c0565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620005175762000517620004d6565b604052919050565b80516001600160a01b03811681146200053757600080fd5b919050565b600082601f8301126200054e57600080fd5b815160206001600160401b038211156200056c576200056c620004d6565b8160051b6200057d828201620004ec565b92835284810182019282810190878511156200059857600080fd5b83870192505b84831015620005c257620005b2836200051f565b825291830191908301906200059e565b979650505050505050565b60008060008060808587031215620005e457600080fd5b84516001600160401b0380821115620005fc57600080fd5b6200060a888389016200053c565b9550602091506200061d8288016200051f565b94506040870151818111156200063257600080fd5b6200064089828a016200053c565b9450506060870151818111156200065657600080fd5b8701601f810189136200066857600080fd5b8051828111156200067d576200067d620004d6565b62000691601f8201601f19168501620004ec565b92508083528984828401011115620006a857600080fd5b60005b81811015620006c8578281018501518482018601528401620006ab565b81811115620006da5760008583860101525b5096999598509396509450505050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156200072357634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200073f57607f821691505b602082108114156200076157634e487b7160e01b600052602260045260246000fd5b50919050565b612a8280620007776000396000f3fe6080604052600436106101cb5760003560e01c806301ffc9a7146101d057806306fdde0314610205578063081812fc14610227578063095ea7b31461025f57806318160ddd146102815780632152cb02146102a457806323b872dd146102c4578063248a9ca3146102e457806328931087146103045780632f2ff15d146103195780632f745c591461033957806336568abe1461035957806342842e0e14610379578063430f8949146103995780634f6ccce7146103b35780636352211e146103d357806370a08231146103f3578063715018a614610413578063853828b6146104285780638d859f3e1461043d5780638da5cb5b146104585780639010d07c1461046d578063916f3fd31461048d57806391d14854146104a057806395d89b41146104c05780639b6a6f44146104d5578063a217fddf14610502578063a22cb46514610517578063a966a0df14610537578063b88d4fde14610559578063c1e6f30414610579578063c5762ef71461059b578063c87b56dd146105b0578063ca15c873146105d0578063cce132d1146105f0578063d4c04ef214610606578063d547741f14610626578063e6e6cfd314610646578063e985e9c51461065b578063f2fde38b146106a4575b600080fd5b3480156101dc57600080fd5b506101f06101eb366004612263565b6106c4565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6106d5565b6040516101fc91906122d8565b34801561023357600080fd5b506102476102423660046122eb565b610767565b6040516001600160a01b0390911681526020016101fc565b34801561026b57600080fd5b5061027f61027a366004612320565b6107ab565b005b34801561028d57600080fd5b50610296610839565b6040519081526020016101fc565b3480156102b057600080fd5b5061027f6102bf3660046122eb565b610858565b3480156102d057600080fd5b5061027f6102df36600461234a565b61088d565b3480156102f057600080fd5b506102966102ff3660046122eb565b610898565b34801561031057600080fd5b5061027f6108ad565b34801561032557600080fd5b5061027f610334366004612386565b6108e0565b34801561034557600080fd5b50610296610354366004612320565b6108fd565b34801561036557600080fd5b5061027f610374366004612386565b6109f9565b34801561038557600080fd5b5061027f61039436600461234a565b610a77565b3480156103a557600080fd5b50600c546101f09060ff1681565b3480156103bf57600080fd5b506102966103ce3660046122eb565b610a92565b3480156103df57600080fd5b506102476103ee3660046122eb565b610b3c565b3480156103ff57600080fd5b5061029661040e3660046123b2565b610b4e565b34801561041f57600080fd5b5061027f610b9c565b34801561043457600080fd5b5061027f610bd7565b34801561044957600080fd5b50610296668e1bc9bf04000081565b34801561046457600080fd5b50610247610cd1565b34801561047957600080fd5b506102476104883660046123cd565b610ce0565b61027f61049b3660046124c3565b610cff565b3480156104ac57600080fd5b506101f06104bb366004612386565b610f7c565b3480156104cc57600080fd5b5061021a610fa7565b3480156104e157600080fd5b506102966104f03660046123b2565b600b6020526000908152604090205481565b34801561050e57600080fd5b50610296600081565b34801561052357600080fd5b5061027f61053236600461254f565b610fb6565b34801561054357600080fd5b506102966000805160206129cd83398151915281565b34801561056557600080fd5b5061027f61057436600461258b565b61104c565b34801561058557600080fd5b50610296600080516020612a2d83398151915281565b3480156105a757600080fd5b5061027f611086565b3480156105bc57600080fd5b5061021a6105cb3660046122eb565b6110bc565b3480156105dc57600080fd5b506102966105eb3660046122eb565b611140565b3480156105fc57600080fd5b5061029661115c81565b34801561061257600080fd5b506101f061062136600461264a565b611157565b34801561063257600080fd5b5061027f610641366004612386565b6111c1565b34801561065257600080fd5b5061027f6111de565b34801561066757600080fd5b506101f06106763660046126bd565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106b057600080fd5b5061027f6106bf3660046123b2565b6112fe565b60006106cf82611439565b92915050565b6060600180546106e4906126e7565b80601f0160208091040260200160405190810160405280929190818152602001828054610710906126e7565b801561075d5780601f106107325761010080835404028352916020019161075d565b820191906000526020600020905b81548152906001019060200180831161074057829003601f168201915b5050505050905090565b60006107728261145e565b61078f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006107b682610b3c565b9050806001600160a01b0316836001600160a01b031614156107eb5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061080b57506108098133610676565b155b15610829576040516367d9dca160e11b815260040160405180910390fd5b610834838383611492565b505050565b6000546001600160801b03600160801b82048116918116919091031690565b610863600033610f7c565b6108885760405162461bcd60e51b815260040161087f90612722565b60405180910390fd5b600d55565b6108348383836114ee565b60009081526008602052604090206001015490565b6108b8600033610f7c565b6108d45760405162461bcd60e51b815260040161087f90612722565b600c805460ff19169055565b6108e982610898565b6108f381336116f5565b6108348383611759565b600061090883610b4e565b8210610927576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b838110156109f357600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529061099f57506109eb565b80516001600160a01b0316156109b457805192505b876001600160a01b0316836001600160a01b031614156109e957868414156109e2575093506106cf92505050565b6001909301925b505b600101610938565b50600080fd5b6001600160a01b0381163314610a695760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161087f565b610a73828261177b565b5050565b6108348383836040518060200160405280600081525061104c565b600080546001600160801b031681805b82811015610b2257600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290610b195785831415610b125750949350505050565b6001909201915b50600101610aa2565b506040516329c8c00760e21b815260040160405180910390fd5b6000610b478261179d565b5192915050565b60006001600160a01b038216610b77576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b33610ba5610cd1565b6001600160a01b031614610bcb5760405162461bcd60e51b815260040161087f9061274d565b610bd560006118bf565b565b476000610bf1600080516020612a2d833981519152611140565b905060008211610c3a5760405162461bcd60e51b81526020600482015260146024820152732737ba3434b733903a37903bb4ba34323930bb9760611b604482015260640161087f565b6000600a610c49846009612798565b610c5391906127cd565b905060005b82811015610ca2576000610c7a600080516020612a2d83398151915283610ce0565b9050610c8f81610c8a86866127cd565b611911565b5080610c9a816127e1565b915050610c58565b50476000610cbe6000805160206129cd83398151915282610ce0565b9050610cca8183611911565b5050505050565b6007546001600160a01b031690565b6000828152600960205260408120610cf890836119a7565b9392505050565b8260ff1661115c610d0e610839565b1415610d2c5760405162461bcd60e51b815260040161087f906127fc565b61115c81610d38610839565b610d42919061281e565b1115610d605760405162461bcd60e51b815260040161087f90612836565b60008460ff1611610db35760405162461bcd60e51b815260206004820152601f60248201527f4d7573742070726f7669646520616e20616d6f756e7420746f206d696e742e00604482015260640161087f565b610dbe600033610f7c565b610f3657610dd660ff8516668e1bc9bf040000612798565b341015610e195760405162461bcd60e51b815260206004820152601160248201527056616c75652062656c6f7720707269636560781b604482015260640161087f565b600c5460ff1615610e8c5760058460ff161115610e875760405162461bcd60e51b815260206004820152602660248201527f43616e206d696e742061206d6178206f66203520647572696e67207075626c69604482015265632073616c6560d01b606482015260840161087f565b610f36565b610e97338484611157565b610ed75760405162461bcd60e51b81526020600482015260116024820152702737ba1037b7103bb434ba32b634b9ba1760791b604482015260640161087f565b60028460ff161115610f365760405162461bcd60e51b815260206004820152602260248201527f43616e206d696e742061206d6178206f66203220647572696e672070726573616044820152616c6560f01b606482015260840161087f565b610f43858560ff166119b3565b6040805160ff861681526001600160a01b03871660208201526000805160206129ed833981519152910160405180910390a15050505050565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600280546106e4906126e7565b6001600160a01b038216331415610fe05760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6110578484846114ee565b611063848484846119cd565b611080576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b611091600033610f7c565b6110ad5760405162461bcd60e51b815260040161087f90612722565b600c805460ff19166001179055565b60606110c78261145e565b6110e457604051630a14c4b560e41b815260040160405180910390fd5b60006110ee611adc565b905080516000141561110f5760405180602001604052806000815250610cf8565b8061111984611aeb565b60405160200161112a929190612866565b6040516020818303038152906040529392505050565b60008181526009602052604081206106cf90611be8565b600082516000148061116857508151155b1561117557506000610cf8565b6040516001600160601b0319606086901b1660208201526000906034016040516020818303038152906040528051906020012090506111b8600d54828686611bf2565b95945050505050565b6111ca82610898565b6111d481336116f5565b610834838361177b565b336000908152600b6020526040902054806112375760405162461bcd60e51b81526020600482015260196024820152784d757374206861766520636c61696d61626c65206d696e747360381b604482015260640161087f565b336000908152600b602052604090205461115c611252610839565b14156112705760405162461bcd60e51b815260040161087f906127fc565b61115c8161127c610839565b611286919061281e565b11156112a45760405162461bcd60e51b815260040161087f90612836565b336000818152600b60205260409020546112be91906119b3565b336000818152600b6020908152604080832083905580519283529082019290925281516000805160206129ed833981519152929181900390910190a15050565b33611307610cd1565b6001600160a01b03161461132d5760405162461bcd60e51b815260040161087f9061274d565b6001600160a01b0381166113925760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087f565b61139b816118bf565b50565b6113a88282610f7c565b610a735760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556113e03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610cf8836001600160a01b038416611cbd565b60006001600160e01b03198216635a05180f60e01b14806106cf57506106cf82611d0c565b600080546001600160801b0316821080156106cf575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006114f98261179d565b80519091506000906001600160a01b0316336001600160a01b03161480611527575081516115279033610676565b8061154257503361153784610767565b6001600160a01b0316145b90508061156257604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146115975760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166115be57604051633a954ecd60e21b815260040160405180910390fd5b6115ce6000848460000151611492565b6001600160a01b03858116600090815260046020908152604080832080546001600160401b03198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166116c0576000546001600160801b03168110156116c057825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b0316600080516020612a0d83398151915260405160405180910390a4610cca565b6116ff8282610f7c565b610a7357611717816001600160a01b03166014611d31565b611722836020611d31565b604051602001611733929190612895565b60408051601f198184030181529082905262461bcd60e51b825261087f916004016122d8565b611763828261139e565b60008281526009602052604090206108349082611424565b6117858282611ecc565b60008281526009602052604090206108349082611f33565b60408051606081018252600080825260208201819052918101829052905482906001600160801b03168110156118a657600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906118a45780516001600160a01b03161561183b579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561189f579392505050565b61183b565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461195e576040519150601f19603f3d011682016040523d82523d6000602084013e611963565b606091505b50509050806108345760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161087f565b6000610cf88383611f48565b610a73828260405180602001604052806000815250611f72565b60006001600160a01b0384163b15611ad057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611a11903390899088908890600401612904565b602060405180830381600087803b158015611a2b57600080fd5b505af1925050508015611a5b575060408051601f3d908101601f19168201909252611a5891810190612941565b60015b611ab6573d808015611a89576040519150601f19603f3d011682016040523d82523d6000602084013e611a8e565b606091505b508051611aae576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ad4565b5060015b949350505050565b6060600a80546106e4906126e7565b606081611b0f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b395780611b23816127e1565b9150611b329050600a836127cd565b9150611b13565b6000816001600160401b03811115611b5357611b536123ef565b6040519080825280601f01601f191660200182016040528015611b7d576020820181803683370190505b5090505b8415611ad457611b9260018361295e565b9150611b9f600a86612975565b611baa90603061281e565b60f81b818381518110611bbf57611bbf612989565b60200101906001600160f81b031916908160001a905350611be1600a866127cd565b9450611b81565b60006106cf825490565b600083815b8451811015611cb1576000858281518110611c1457611c14612989565b60200260200101519050848281518110611c3057611c30612989565b602002602001015160011415611c71576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611c9e565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611ca9816127e1565b915050611bf7565b50909414949350505050565b6000818152600183016020526040812054611d04575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106cf565b5060006106cf565b60006001600160e01b03198216637965db0b60e01b14806106cf57506106cf82611f7f565b60606000611d40836002612798565b611d4b90600261281e565b6001600160401b03811115611d6257611d626123ef565b6040519080825280601f01601f191660200182016040528015611d8c576020820181803683370190505b509050600360fc1b81600081518110611da757611da7612989565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611dd657611dd6612989565b60200101906001600160f81b031916908160001a9053506000611dfa846002612798565b611e0590600161281e565b90505b6001811115611e7d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e3957611e39612989565b1a60f81b828281518110611e4f57611e4f612989565b60200101906001600160f81b031916908160001a90535060049490941c93611e768161299f565b9050611e08565b508315610cf85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161087f565b611ed68282610f7c565b15610a735760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610cf8836001600160a01b038416611fea565b6000826000018281548110611f5f57611f5f612989565b9060005260206000200154905092915050565b61083483838360016120dd565b60006001600160e01b031982166380ac58cd60e01b1480611fb057506001600160e01b03198216635b5e139f60e01b145b80611fcb57506001600160e01b0319821663780e9d6360e01b145b806106cf57506301ffc9a760e01b6001600160e01b03198316146106cf565b600081815260018301602052604081205480156120d357600061200e60018361295e565b85549091506000906120229060019061295e565b905081811461208757600086600001828154811061204257612042612989565b906000526020600020015490508087600001848154811061206557612065612989565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612098576120986129b6565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106cf565b60009150506106cf565b6000546001600160801b03166001600160a01b03851661210f57604051622e076360e81b815260040160405180910390fd5b8361212d5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b6001600160401b031990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156122275760405182906001600160a01b03891690600090600080516020612a0d833981519152908290a48380156121fd57506121fb60008884886119cd565b155b1561221b576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016121b8565b50600080546001600160801b0319166001600160801b0392909216919091179055610cca565b6001600160e01b03198116811461139b57600080fd5b60006020828403121561227557600080fd5b8135610cf88161224d565b60005b8381101561229b578181015183820152602001612283565b838111156110805750506000910152565b600081518084526122c4816020860160208601612280565b601f01601f19169290920160200192915050565b602081526000610cf860208301846122ac565b6000602082840312156122fd57600080fd5b5035919050565b80356001600160a01b038116811461231b57600080fd5b919050565b6000806040838503121561233357600080fd5b61233c83612304565b946020939093013593505050565b60008060006060848603121561235f57600080fd5b61236884612304565b925061237660208501612304565b9150604084013590509250925092565b6000806040838503121561239957600080fd5b823591506123a960208401612304565b90509250929050565b6000602082840312156123c457600080fd5b610cf882612304565b600080604083850312156123e057600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561242d5761242d6123ef565b604052919050565b60006001600160401b0382111561244e5761244e6123ef565b5060051b60200190565b600082601f83011261246957600080fd5b8135602061247e61247983612435565b612405565b82815260059290921b8401810191818101908684111561249d57600080fd5b8286015b848110156124b857803583529183019183016124a1565b509695505050505050565b600080600080608085870312156124d957600080fd5b6124e285612304565b9350602085013560ff811681146124f857600080fd5b925060408501356001600160401b038082111561251457600080fd5b61252088838901612458565b9350606087013591508082111561253657600080fd5b5061254387828801612458565b91505092959194509250565b6000806040838503121561256257600080fd5b61256b83612304565b91506020830135801515811461258057600080fd5b809150509250929050565b600080600080608085870312156125a157600080fd5b6125aa85612304565b935060206125b9818701612304565b93506040860135925060608601356001600160401b03808211156125dc57600080fd5b818801915088601f8301126125f057600080fd5b813581811115612602576126026123ef565b612614601f8201601f19168501612405565b9150808252898482850101111561262a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060006060848603121561265f57600080fd5b61266884612304565b925060208401356001600160401b038082111561268457600080fd5b61269087838801612458565b935060408601359150808211156126a657600080fd5b506126b386828701612458565b9150509250925092565b600080604083850312156126d057600080fd5b6126d983612304565b91506123a960208401612304565b600181811c908216806126fb57607f821691505b6020821081141561271c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526011908201527026bab9ba1031329030b71030b236b4b71760791b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156127b2576127b2612782565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826127dc576127dc6127b7565b500490565b60006000198214156127f5576127f5612782565b5060010190565b602080825260089082015267536f6c646f75742160c01b604082015260600190565b6000821982111561283157612831612782565b500190565b6020808252601690820152752737ba1032b737bab3b41036b4b73a39903632b33a1760511b604082015260600190565b60008351612878818460208801612280565b83519083019061288c818360208801612280565b01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516128c7816017850160208801612280565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516128f8816028840160208801612280565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612937908301846122ac565b9695505050505050565b60006020828403121561295357600080fd5b8151610cf88161224d565b60008282101561297057612970612782565b500390565b600082612984576129846127b7565b500690565b634e487b7160e01b600052603260045260246000fd5b6000816129ae576129ae612782565b506000190190565b634e487b7160e01b600052603160045260246000fdfe877a78dc988c0ec5f58453b44888a55eb39755c3d5ed8d8ea990912aa3ef29c6527efdb0e41693cd8cbb9c6d2d35c8563b7b73cfdd0790d7d2588c893b91b8c6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef7ed687a8f2955bd2ba7ca08227e1e364d132be747f42fb733165f923021b0225a26469706673582212202b0b03ca065dba0cf50f8397605f302028d504a5351b021f88e85ecf023e937a64736f6c634300080900330000000000000000000000000000000000000000000000000000000000000080000000000000000000000000627137fc6cfa3fbfa0ed936fb4b5d66fb383dbe800000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000025d53e88ae482e6612bed27d040b370c7e09838c00000000000000000000000032bf741d6df2c00a0687b834fec84d2a2b80388c0000000000000000000000000000000000000000000000000000000000000007000000000000000000000000367c9122748a56e3174df6a2c6bcc9d634fd2bea000000000000000000000000fba6ccdf60c712bf96c094d989ddf412d1559a62000000000000000000000000c383039f20d6f438c60782cb7a04ec18dab5b66e00000000000000000000000084b8da634d034ff8067503cea37828c77a9cbeab000000000000000000000000914efe0cb888791163aba4a5c9ce03da349e34d70000000000000000000000000ec88a8b2973b21e38f8c46a6cafade2514df73c000000000000000000000000614672b1df0da50d65472222c610980f86be39650000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5668335532316b34756132624c35376f6b52664c52314b48706576444264586d687751524b364179784267712f00000000000000000000
Deployed Bytecode
0x6080604052600436106101cb5760003560e01c806301ffc9a7146101d057806306fdde0314610205578063081812fc14610227578063095ea7b31461025f57806318160ddd146102815780632152cb02146102a457806323b872dd146102c4578063248a9ca3146102e457806328931087146103045780632f2ff15d146103195780632f745c591461033957806336568abe1461035957806342842e0e14610379578063430f8949146103995780634f6ccce7146103b35780636352211e146103d357806370a08231146103f3578063715018a614610413578063853828b6146104285780638d859f3e1461043d5780638da5cb5b146104585780639010d07c1461046d578063916f3fd31461048d57806391d14854146104a057806395d89b41146104c05780639b6a6f44146104d5578063a217fddf14610502578063a22cb46514610517578063a966a0df14610537578063b88d4fde14610559578063c1e6f30414610579578063c5762ef71461059b578063c87b56dd146105b0578063ca15c873146105d0578063cce132d1146105f0578063d4c04ef214610606578063d547741f14610626578063e6e6cfd314610646578063e985e9c51461065b578063f2fde38b146106a4575b600080fd5b3480156101dc57600080fd5b506101f06101eb366004612263565b6106c4565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6106d5565b6040516101fc91906122d8565b34801561023357600080fd5b506102476102423660046122eb565b610767565b6040516001600160a01b0390911681526020016101fc565b34801561026b57600080fd5b5061027f61027a366004612320565b6107ab565b005b34801561028d57600080fd5b50610296610839565b6040519081526020016101fc565b3480156102b057600080fd5b5061027f6102bf3660046122eb565b610858565b3480156102d057600080fd5b5061027f6102df36600461234a565b61088d565b3480156102f057600080fd5b506102966102ff3660046122eb565b610898565b34801561031057600080fd5b5061027f6108ad565b34801561032557600080fd5b5061027f610334366004612386565b6108e0565b34801561034557600080fd5b50610296610354366004612320565b6108fd565b34801561036557600080fd5b5061027f610374366004612386565b6109f9565b34801561038557600080fd5b5061027f61039436600461234a565b610a77565b3480156103a557600080fd5b50600c546101f09060ff1681565b3480156103bf57600080fd5b506102966103ce3660046122eb565b610a92565b3480156103df57600080fd5b506102476103ee3660046122eb565b610b3c565b3480156103ff57600080fd5b5061029661040e3660046123b2565b610b4e565b34801561041f57600080fd5b5061027f610b9c565b34801561043457600080fd5b5061027f610bd7565b34801561044957600080fd5b50610296668e1bc9bf04000081565b34801561046457600080fd5b50610247610cd1565b34801561047957600080fd5b506102476104883660046123cd565b610ce0565b61027f61049b3660046124c3565b610cff565b3480156104ac57600080fd5b506101f06104bb366004612386565b610f7c565b3480156104cc57600080fd5b5061021a610fa7565b3480156104e157600080fd5b506102966104f03660046123b2565b600b6020526000908152604090205481565b34801561050e57600080fd5b50610296600081565b34801561052357600080fd5b5061027f61053236600461254f565b610fb6565b34801561054357600080fd5b506102966000805160206129cd83398151915281565b34801561056557600080fd5b5061027f61057436600461258b565b61104c565b34801561058557600080fd5b50610296600080516020612a2d83398151915281565b3480156105a757600080fd5b5061027f611086565b3480156105bc57600080fd5b5061021a6105cb3660046122eb565b6110bc565b3480156105dc57600080fd5b506102966105eb3660046122eb565b611140565b3480156105fc57600080fd5b5061029661115c81565b34801561061257600080fd5b506101f061062136600461264a565b611157565b34801561063257600080fd5b5061027f610641366004612386565b6111c1565b34801561065257600080fd5b5061027f6111de565b34801561066757600080fd5b506101f06106763660046126bd565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106b057600080fd5b5061027f6106bf3660046123b2565b6112fe565b60006106cf82611439565b92915050565b6060600180546106e4906126e7565b80601f0160208091040260200160405190810160405280929190818152602001828054610710906126e7565b801561075d5780601f106107325761010080835404028352916020019161075d565b820191906000526020600020905b81548152906001019060200180831161074057829003601f168201915b5050505050905090565b60006107728261145e565b61078f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006107b682610b3c565b9050806001600160a01b0316836001600160a01b031614156107eb5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061080b57506108098133610676565b155b15610829576040516367d9dca160e11b815260040160405180910390fd5b610834838383611492565b505050565b6000546001600160801b03600160801b82048116918116919091031690565b610863600033610f7c565b6108885760405162461bcd60e51b815260040161087f90612722565b60405180910390fd5b600d55565b6108348383836114ee565b60009081526008602052604090206001015490565b6108b8600033610f7c565b6108d45760405162461bcd60e51b815260040161087f90612722565b600c805460ff19169055565b6108e982610898565b6108f381336116f5565b6108348383611759565b600061090883610b4e565b8210610927576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b838110156109f357600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529061099f57506109eb565b80516001600160a01b0316156109b457805192505b876001600160a01b0316836001600160a01b031614156109e957868414156109e2575093506106cf92505050565b6001909301925b505b600101610938565b50600080fd5b6001600160a01b0381163314610a695760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161087f565b610a73828261177b565b5050565b6108348383836040518060200160405280600081525061104c565b600080546001600160801b031681805b82811015610b2257600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290610b195785831415610b125750949350505050565b6001909201915b50600101610aa2565b506040516329c8c00760e21b815260040160405180910390fd5b6000610b478261179d565b5192915050565b60006001600160a01b038216610b77576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b33610ba5610cd1565b6001600160a01b031614610bcb5760405162461bcd60e51b815260040161087f9061274d565b610bd560006118bf565b565b476000610bf1600080516020612a2d833981519152611140565b905060008211610c3a5760405162461bcd60e51b81526020600482015260146024820152732737ba3434b733903a37903bb4ba34323930bb9760611b604482015260640161087f565b6000600a610c49846009612798565b610c5391906127cd565b905060005b82811015610ca2576000610c7a600080516020612a2d83398151915283610ce0565b9050610c8f81610c8a86866127cd565b611911565b5080610c9a816127e1565b915050610c58565b50476000610cbe6000805160206129cd83398151915282610ce0565b9050610cca8183611911565b5050505050565b6007546001600160a01b031690565b6000828152600960205260408120610cf890836119a7565b9392505050565b8260ff1661115c610d0e610839565b1415610d2c5760405162461bcd60e51b815260040161087f906127fc565b61115c81610d38610839565b610d42919061281e565b1115610d605760405162461bcd60e51b815260040161087f90612836565b60008460ff1611610db35760405162461bcd60e51b815260206004820152601f60248201527f4d7573742070726f7669646520616e20616d6f756e7420746f206d696e742e00604482015260640161087f565b610dbe600033610f7c565b610f3657610dd660ff8516668e1bc9bf040000612798565b341015610e195760405162461bcd60e51b815260206004820152601160248201527056616c75652062656c6f7720707269636560781b604482015260640161087f565b600c5460ff1615610e8c5760058460ff161115610e875760405162461bcd60e51b815260206004820152602660248201527f43616e206d696e742061206d6178206f66203520647572696e67207075626c69604482015265632073616c6560d01b606482015260840161087f565b610f36565b610e97338484611157565b610ed75760405162461bcd60e51b81526020600482015260116024820152702737ba1037b7103bb434ba32b634b9ba1760791b604482015260640161087f565b60028460ff161115610f365760405162461bcd60e51b815260206004820152602260248201527f43616e206d696e742061206d6178206f66203220647572696e672070726573616044820152616c6560f01b606482015260840161087f565b610f43858560ff166119b3565b6040805160ff861681526001600160a01b03871660208201526000805160206129ed833981519152910160405180910390a15050505050565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600280546106e4906126e7565b6001600160a01b038216331415610fe05760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6110578484846114ee565b611063848484846119cd565b611080576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b611091600033610f7c565b6110ad5760405162461bcd60e51b815260040161087f90612722565b600c805460ff19166001179055565b60606110c78261145e565b6110e457604051630a14c4b560e41b815260040160405180910390fd5b60006110ee611adc565b905080516000141561110f5760405180602001604052806000815250610cf8565b8061111984611aeb565b60405160200161112a929190612866565b6040516020818303038152906040529392505050565b60008181526009602052604081206106cf90611be8565b600082516000148061116857508151155b1561117557506000610cf8565b6040516001600160601b0319606086901b1660208201526000906034016040516020818303038152906040528051906020012090506111b8600d54828686611bf2565b95945050505050565b6111ca82610898565b6111d481336116f5565b610834838361177b565b336000908152600b6020526040902054806112375760405162461bcd60e51b81526020600482015260196024820152784d757374206861766520636c61696d61626c65206d696e747360381b604482015260640161087f565b336000908152600b602052604090205461115c611252610839565b14156112705760405162461bcd60e51b815260040161087f906127fc565b61115c8161127c610839565b611286919061281e565b11156112a45760405162461bcd60e51b815260040161087f90612836565b336000818152600b60205260409020546112be91906119b3565b336000818152600b6020908152604080832083905580519283529082019290925281516000805160206129ed833981519152929181900390910190a15050565b33611307610cd1565b6001600160a01b03161461132d5760405162461bcd60e51b815260040161087f9061274d565b6001600160a01b0381166113925760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087f565b61139b816118bf565b50565b6113a88282610f7c565b610a735760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556113e03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610cf8836001600160a01b038416611cbd565b60006001600160e01b03198216635a05180f60e01b14806106cf57506106cf82611d0c565b600080546001600160801b0316821080156106cf575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006114f98261179d565b80519091506000906001600160a01b0316336001600160a01b03161480611527575081516115279033610676565b8061154257503361153784610767565b6001600160a01b0316145b90508061156257604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146115975760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166115be57604051633a954ecd60e21b815260040160405180910390fd5b6115ce6000848460000151611492565b6001600160a01b03858116600090815260046020908152604080832080546001600160401b03198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166116c0576000546001600160801b03168110156116c057825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b0316600080516020612a0d83398151915260405160405180910390a4610cca565b6116ff8282610f7c565b610a7357611717816001600160a01b03166014611d31565b611722836020611d31565b604051602001611733929190612895565b60408051601f198184030181529082905262461bcd60e51b825261087f916004016122d8565b611763828261139e565b60008281526009602052604090206108349082611424565b6117858282611ecc565b60008281526009602052604090206108349082611f33565b60408051606081018252600080825260208201819052918101829052905482906001600160801b03168110156118a657600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906118a45780516001600160a01b03161561183b579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561189f579392505050565b61183b565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461195e576040519150601f19603f3d011682016040523d82523d6000602084013e611963565b606091505b50509050806108345760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161087f565b6000610cf88383611f48565b610a73828260405180602001604052806000815250611f72565b60006001600160a01b0384163b15611ad057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611a11903390899088908890600401612904565b602060405180830381600087803b158015611a2b57600080fd5b505af1925050508015611a5b575060408051601f3d908101601f19168201909252611a5891810190612941565b60015b611ab6573d808015611a89576040519150601f19603f3d011682016040523d82523d6000602084013e611a8e565b606091505b508051611aae576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ad4565b5060015b949350505050565b6060600a80546106e4906126e7565b606081611b0f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b395780611b23816127e1565b9150611b329050600a836127cd565b9150611b13565b6000816001600160401b03811115611b5357611b536123ef565b6040519080825280601f01601f191660200182016040528015611b7d576020820181803683370190505b5090505b8415611ad457611b9260018361295e565b9150611b9f600a86612975565b611baa90603061281e565b60f81b818381518110611bbf57611bbf612989565b60200101906001600160f81b031916908160001a905350611be1600a866127cd565b9450611b81565b60006106cf825490565b600083815b8451811015611cb1576000858281518110611c1457611c14612989565b60200260200101519050848281518110611c3057611c30612989565b602002602001015160011415611c71576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611c9e565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611ca9816127e1565b915050611bf7565b50909414949350505050565b6000818152600183016020526040812054611d04575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106cf565b5060006106cf565b60006001600160e01b03198216637965db0b60e01b14806106cf57506106cf82611f7f565b60606000611d40836002612798565b611d4b90600261281e565b6001600160401b03811115611d6257611d626123ef565b6040519080825280601f01601f191660200182016040528015611d8c576020820181803683370190505b509050600360fc1b81600081518110611da757611da7612989565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611dd657611dd6612989565b60200101906001600160f81b031916908160001a9053506000611dfa846002612798565b611e0590600161281e565b90505b6001811115611e7d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e3957611e39612989565b1a60f81b828281518110611e4f57611e4f612989565b60200101906001600160f81b031916908160001a90535060049490941c93611e768161299f565b9050611e08565b508315610cf85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161087f565b611ed68282610f7c565b15610a735760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610cf8836001600160a01b038416611fea565b6000826000018281548110611f5f57611f5f612989565b9060005260206000200154905092915050565b61083483838360016120dd565b60006001600160e01b031982166380ac58cd60e01b1480611fb057506001600160e01b03198216635b5e139f60e01b145b80611fcb57506001600160e01b0319821663780e9d6360e01b145b806106cf57506301ffc9a760e01b6001600160e01b03198316146106cf565b600081815260018301602052604081205480156120d357600061200e60018361295e565b85549091506000906120229060019061295e565b905081811461208757600086600001828154811061204257612042612989565b906000526020600020015490508087600001848154811061206557612065612989565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612098576120986129b6565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106cf565b60009150506106cf565b6000546001600160801b03166001600160a01b03851661210f57604051622e076360e81b815260040160405180910390fd5b8361212d5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b6001600160401b031990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156122275760405182906001600160a01b03891690600090600080516020612a0d833981519152908290a48380156121fd57506121fb60008884886119cd565b155b1561221b576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016121b8565b50600080546001600160801b0319166001600160801b0392909216919091179055610cca565b6001600160e01b03198116811461139b57600080fd5b60006020828403121561227557600080fd5b8135610cf88161224d565b60005b8381101561229b578181015183820152602001612283565b838111156110805750506000910152565b600081518084526122c4816020860160208601612280565b601f01601f19169290920160200192915050565b602081526000610cf860208301846122ac565b6000602082840312156122fd57600080fd5b5035919050565b80356001600160a01b038116811461231b57600080fd5b919050565b6000806040838503121561233357600080fd5b61233c83612304565b946020939093013593505050565b60008060006060848603121561235f57600080fd5b61236884612304565b925061237660208501612304565b9150604084013590509250925092565b6000806040838503121561239957600080fd5b823591506123a960208401612304565b90509250929050565b6000602082840312156123c457600080fd5b610cf882612304565b600080604083850312156123e057600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561242d5761242d6123ef565b604052919050565b60006001600160401b0382111561244e5761244e6123ef565b5060051b60200190565b600082601f83011261246957600080fd5b8135602061247e61247983612435565b612405565b82815260059290921b8401810191818101908684111561249d57600080fd5b8286015b848110156124b857803583529183019183016124a1565b509695505050505050565b600080600080608085870312156124d957600080fd5b6124e285612304565b9350602085013560ff811681146124f857600080fd5b925060408501356001600160401b038082111561251457600080fd5b61252088838901612458565b9350606087013591508082111561253657600080fd5b5061254387828801612458565b91505092959194509250565b6000806040838503121561256257600080fd5b61256b83612304565b91506020830135801515811461258057600080fd5b809150509250929050565b600080600080608085870312156125a157600080fd5b6125aa85612304565b935060206125b9818701612304565b93506040860135925060608601356001600160401b03808211156125dc57600080fd5b818801915088601f8301126125f057600080fd5b813581811115612602576126026123ef565b612614601f8201601f19168501612405565b9150808252898482850101111561262a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060006060848603121561265f57600080fd5b61266884612304565b925060208401356001600160401b038082111561268457600080fd5b61269087838801612458565b935060408601359150808211156126a657600080fd5b506126b386828701612458565b9150509250925092565b600080604083850312156126d057600080fd5b6126d983612304565b91506123a960208401612304565b600181811c908216806126fb57607f821691505b6020821081141561271c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526011908201527026bab9ba1031329030b71030b236b4b71760791b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156127b2576127b2612782565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826127dc576127dc6127b7565b500490565b60006000198214156127f5576127f5612782565b5060010190565b602080825260089082015267536f6c646f75742160c01b604082015260600190565b6000821982111561283157612831612782565b500190565b6020808252601690820152752737ba1032b737bab3b41036b4b73a39903632b33a1760511b604082015260600190565b60008351612878818460208801612280565b83519083019061288c818360208801612280565b01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516128c7816017850160208801612280565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516128f8816028840160208801612280565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612937908301846122ac565b9695505050505050565b60006020828403121561295357600080fd5b8151610cf88161224d565b60008282101561297057612970612782565b500390565b600082612984576129846127b7565b500690565b634e487b7160e01b600052603260045260246000fd5b6000816129ae576129ae612782565b506000190190565b634e487b7160e01b600052603160045260246000fdfe877a78dc988c0ec5f58453b44888a55eb39755c3d5ed8d8ea990912aa3ef29c6527efdb0e41693cd8cbb9c6d2d35c8563b7b73cfdd0790d7d2588c893b91b8c6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef7ed687a8f2955bd2ba7ca08227e1e364d132be747f42fb733165f923021b0225a26469706673582212202b0b03ca065dba0cf50f8397605f302028d504a5351b021f88e85ecf023e937a64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000627137fc6cfa3fbfa0ed936fb4b5d66fb383dbe800000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000025d53e88ae482e6612bed27d040b370c7e09838c00000000000000000000000032bf741d6df2c00a0687b834fec84d2a2b80388c0000000000000000000000000000000000000000000000000000000000000007000000000000000000000000367c9122748a56e3174df6a2c6bcc9d634fd2bea000000000000000000000000fba6ccdf60c712bf96c094d989ddf412d1559a62000000000000000000000000c383039f20d6f438c60782cb7a04ec18dab5b66e00000000000000000000000084b8da634d034ff8067503cea37828c77a9cbeab000000000000000000000000914efe0cb888791163aba4a5c9ce03da349e34d70000000000000000000000000ec88a8b2973b21e38f8c46a6cafade2514df73c000000000000000000000000614672b1df0da50d65472222c610980f86be39650000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5668335532316b34756132624c35376f6b52664c52314b48706576444264586d687751524b364179784267712f00000000000000000000
-----Decoded View---------------
Arg [0] : founders (address[]): 0x25d53e88ae482e6612bEd27d040B370c7e09838c,0x32BF741D6DF2C00A0687b834FeC84D2A2B80388c
Arg [1] : artist (address): 0x627137FC6cFa3fbfa0ed936fB4B5d66fB383DBE8
Arg [2] : staff (address[]): 0x367c9122748a56e3174DF6A2C6bcc9D634FD2beA,0xFBA6cCdf60c712Bf96c094D989DDf412d1559A62,0xC383039F20d6F438C60782cB7A04Ec18dAb5b66e,0x84B8Da634d034Ff8067503CEA37828c77A9CBEab,0x914efE0Cb888791163ABa4a5c9CE03DA349E34d7,0x0ec88a8b2973B21E38F8c46A6CafAdE2514DF73c,0x614672b1df0DA50D65472222C610980f86BE3965
Arg [3] : newBaseURI (string): ipfs://QmVh3U21k4ua2bL57okRfLR1KHpevDBdXmhwQRK6AyxBgq/
-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 000000000000000000000000627137fc6cfa3fbfa0ed936fb4b5d66fb383dbe8
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [5] : 00000000000000000000000025d53e88ae482e6612bed27d040b370c7e09838c
Arg [6] : 00000000000000000000000032bf741d6df2c00a0687b834fec84d2a2b80388c
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [8] : 000000000000000000000000367c9122748a56e3174df6a2c6bcc9d634fd2bea
Arg [9] : 000000000000000000000000fba6ccdf60c712bf96c094d989ddf412d1559a62
Arg [10] : 000000000000000000000000c383039f20d6f438c60782cb7a04ec18dab5b66e
Arg [11] : 00000000000000000000000084b8da634d034ff8067503cea37828c77a9cbeab
Arg [12] : 000000000000000000000000914efe0cb888791163aba4a5c9ce03da349e34d7
Arg [13] : 0000000000000000000000000ec88a8b2973b21e38f8c46a6cafade2514df73c
Arg [14] : 000000000000000000000000614672b1df0da50d65472222c610980f86be3965
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [16] : 697066733a2f2f516d5668335532316b34756132624c35376f6b52664c52314b
Arg [17] : 48706576444264586d687751524b364179784267712f00000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.