Token Magic potions - Alchemists
Overview ERC-721
Total Supply:
993 MPALC
Holders:
270 addresses
Contract:
Balance
3 MPALC
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MagicPotionsWithWideRoyalties
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./MagicNFT.sol"; import './ERC2981ContractWideRoyalties.sol'; contract MagicPotionsWithWideRoyalties is ERC2981ContractWideRoyalties, MagicNFT { constructor( address magicToken, address revenueRecipient, uint256 _whitelistStart, uint256 _whitelistEnd, uint256 _reserveListStart, uint256 _reserveListEnd, uint256 _publicSaleStart, string memory tempUri ) MagicNFT( magicToken, revenueRecipient, _whitelistStart, _whitelistEnd, _reserveListStart, _reserveListEnd, _publicSaleStart, tempUri ) { } /// @notice Allows to set the royalties on the contract /// @dev This function in a real contract should be protected with a onlyOwner (or equivalent) modifier /// @param recipient the royalties recipient /// @param value royalties value (between 0 and 10000) function setRoyalties(address recipient, uint256 value) public onlyOwner { _setRoyalties(recipient, value); } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(MagicNFT, ERC2981Base) returns (bool) { return super.supportsInterface(interfaceId); } }
/* Crafted with love by Fueled on Bacon https://fueledonbacon.com */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ERC721A.sol"; contract MagicNFT is ERC721A, Ownable { using Strings for uint256; address private _revenueRecipient; address private immutable _magicToken; bytes32 private _whitelistMerkleRoot; bytes32 private _reserveListMerkleRoot; mapping(address=>uint256) private _mintedWLTokensByUser; mapping(address=>uint256) private _mintedRTokensByUser; string private _baseUri; string private _tempUri; bool private _revealed; bool private _overrideWhitelist; bool private _overrideReservelist; bool private _overridePublicSale; uint256 public constant AIRDROP_LIMIT = 444; uint256 public constant COLLECTION_SIZE = 6444; uint256 public constant PUBLIC_LIMIT = 10; uint256 public constant ETHER_PRICE = 0.025 ether; uint256 public constant MAGIC_PRICE = 140 ether; uint256 public immutable whitelistStart; uint256 public immutable whitelistEnd; uint256 public immutable reserveListStart; uint256 public immutable reserveListEnd; uint256 public immutable publicSaleStart; uint256 public airdropped; constructor( address magicToken, address revenueRecipient, uint256 _whitelistStart, uint256 _whitelistEnd, uint256 _reserveListStart, uint256 _reserveListEnd, uint256 _publicSaleStart, string memory tempUri ) ERC721A("Magic potions - Alchemists", "MPALC") { require(_whitelistStart > block.timestamp, "WRONG_WL_START"); require(_whitelistEnd > _whitelistStart, "WRONG_WL_END"); require(_reserveListStart > block.timestamp, "WRONG_RV_START"); require(_reserveListEnd > _reserveListStart, "WRONG_RV_END"); require(_publicSaleStart > block.timestamp, "WRONG_PS_START"); _magicToken = magicToken; _revenueRecipient = revenueRecipient; whitelistStart = _whitelistStart; whitelistEnd = _whitelistEnd; reserveListStart = _reserveListStart; reserveListEnd = _reserveListEnd; publicSaleStart = _publicSaleStart; _tempUri = tempUri; } /// @notice the initial 100 tokens will be minted to the team vault for use in giveaways and collaborations. function airdrop(address to, uint256 quantity) external onlyOwner { require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE"); airdropped += quantity; require(airdropped <= AIRDROP_LIMIT, "EXCEEDS_AIRDROP_LIMIT"); _safeMint(to, quantity); } function isWhitelistSaleActive() public view returns(bool){ require(_whitelistMerkleRoot != "", "EMPTY_MERKLEROOT"); if(_overrideWhitelist){ return true; } return block.timestamp > whitelistStart && block.timestamp < whitelistEnd; } function isReserveListSaleActive() public view returns(bool){ require(_reserveListMerkleRoot != "", "EMPTY_MERKLEROOT"); if(_overrideReservelist){ return true; } return block.timestamp > reserveListStart && block.timestamp < reserveListEnd; } function isPublicSaleActive() public view returns(bool){ if(_overridePublicSale){ return true; } return block.timestamp > publicSaleStart; } function toggleReveal() external onlyOwner { _revealed = !_revealed; } function toggleWhitelistSale() external onlyOwner { _overrideWhitelist = !_overrideWhitelist; } function toggleReserveSale() external onlyOwner { _overrideReservelist = !_overrideReservelist; } function togglePublicSale() external onlyOwner { _overridePublicSale = !_overridePublicSale; } function setBaseURI(string memory baseUri) external onlyOwner { _baseUri = baseUri; } function setPlaceholderURI(string memory tempUri) external onlyOwner { _tempUri = tempUri; } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { _whitelistMerkleRoot = merkleRoot; } function setReservelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { _reserveListMerkleRoot = merkleRoot; } function setRevenueRecipient(address recipient) external onlyOwner { require(recipient != address(0), "RECIPIENT_ZERO_ADDRESSS"); _revenueRecipient = recipient; } /// @dev override base uri. It will be combined with token ID function _baseURI() internal view override returns (string memory) { return _baseUri; } /// @notice Withdraw's contract's balance to the withdrawal address function withdrawETH() external { uint256 balance = address(this).balance; require(balance > 0, "NO_BALANCE"); (bool success, ) = payable(_revenueRecipient).call{ value: balance }(""); require(success, "WITHDRAW_FAILED"); } function withdraw(address token) external { IERC20 _token = IERC20(token); _token.transfer(_revenueRecipient, _token.balanceOf(address(this))); } function verifyWhitelist(bytes32[] calldata _merkleProof, address addr, uint256 quantity) public view returns(bool) { return (MerkleProof.verify(_merkleProof, _whitelistMerkleRoot, keccak256(abi.encode(addr, quantity))) == true); } function verifyReservelist(bytes32[] calldata _merkleProof, address addr, uint256 quantity) public view returns(bool) { return (MerkleProof.verify(_merkleProof, _reserveListMerkleRoot, keccak256(abi.encode(addr, quantity))) == true); } /// @param _merkleProof merkleproof /// @param maxToMint merkleproof value /// @param quantity less or equal maxToMint function whitelistMint(bytes32[] calldata _merkleProof, uint256 maxToMint, uint256 quantity) external payable { address account = _msgSender(); require(_mintedWLTokensByUser[account] + quantity <= maxToMint, "EXCEEDS_MAXIMUM"); require(isWhitelistSaleActive(), "PRESALE_INACTIVE"); require(verifyWhitelist(_merkleProof, account, maxToMint), "PRESALE_NOT_VERIFIED"); require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE"); uint256 cost = quantity * ETHER_PRICE; require(msg.value >= cost, "VALUE_TOO_LOW"); _mintedWLTokensByUser[account] += quantity; _safeMint(account, quantity); } function reserveListMint(bytes32[] calldata _merkleProof, uint256 maxToMint, uint256 quantity) external payable { address account = _msgSender(); require(_mintedRTokensByUser[account] + quantity <= maxToMint, "EXCEEDS_MAXIMUM"); require(isReserveListSaleActive(), "PRESALE_INACTIVE"); require(verifyReservelist(_merkleProof, account, maxToMint), "PRESALE_NOT_VERIFIED"); require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE"); uint256 cost = quantity * ETHER_PRICE; require(msg.value >= cost, "VALUE_TOO_LOW"); _mintedRTokensByUser[account] += quantity; _safeMint(account, quantity); } function mint(uint256 quantity) external payable { require(quantity <= PUBLIC_LIMIT, "CANT_MINT_MORE_THAN_10"); require(isPublicSaleActive(), "PUBLIC_SALE_NOT_ACTIVE"); require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE"); address account = _msgSender(); uint256 value = msg.value; if(value > 0) { uint256 cost = quantity * ETHER_PRICE; require(value >= cost, "VALUE_TOO_LOW"); } else { uint256 cost = quantity * MAGIC_PRICE; IERC20(_magicToken).transferFrom(account, address(this), cost); } _safeMint(account, quantity); } function tokenURI(uint256 id) public view override returns (string memory) { require(_exists(id), "INVALID_ID"); return _revealed ? string(abi.encodePacked(_baseURI(), id.toString(), ".json")) : _tempUri; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; import './ERC2981Base.sol'; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 /// @dev This implementation has the same royalties for each and every tokens abstract contract ERC2981ContractWideRoyalties is ERC2981Base { RoyaltyInfo private _royalties; /// @dev Sets token royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function _setRoyalties(address recipient, uint256 value) internal { require(value <= 10000, 'ERC2981Royalties: Too high'); _royalties = RoyaltyInfo(recipient, uint24(value)); } /// @inheritdoc IERC2981Royalties function royaltyInfo(uint256, uint256 value) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// 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 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs // Fork of ERC721A.sol (it's not the same one as on npm package erc721a because this one has extension methods removed) 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**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { 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; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 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 returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view 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 > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 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 = 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**256. 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**256. 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 (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 (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 v4.4.1 (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 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // 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 // 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 pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; import './IERC2981Royalties.sol'; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981Base is ERC165, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC2981Royalties).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo(uint256 _tokenId, uint256 _value) external view returns (address _receiver, uint256 _royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 200 }, "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":"magicToken","type":"address"},{"internalType":"address","name":"revenueRecipient","type":"address"},{"internalType":"uint256","name":"_whitelistStart","type":"uint256"},{"internalType":"uint256","name":"_whitelistEnd","type":"uint256"},{"internalType":"uint256","name":"_reserveListStart","type":"uint256"},{"internalType":"uint256","name":"_reserveListEnd","type":"uint256"},{"internalType":"uint256","name":"_publicSaleStart","type":"uint256"},{"internalType":"string","name":"tempUri","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":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","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":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":"AIRDROP_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTION_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHER_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAGIC_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airdropped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"isPublicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isReserveListSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","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":"publicSaleStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveListEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxToMint","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"reserveListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"reserveListStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tempUri","type":"string"}],"name":"setPlaceholderURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setReservelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"setRevenueRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","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":[],"name":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleReserveSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleWhitelistSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","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":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"verifyReservelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"verifyWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxToMint","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whitelistStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101406040523480156200001257600080fd5b50604051620031ba380380620031ba8339810160408190526200003591620003c1565b87878787878787876040518060400160405280601a81526020017f4d6167696320706f74696f6e73202d20416c6368656d69737473000000000000815250604051806040016040528060058152602001644d50414c4360d81b8152508160039080519060200190620000a9929190620002e8565b508051620000bf906004906020840190620002e8565b505050620000dc620000d66200029260201b60201c565b62000296565b428611620001225760405162461bcd60e51b815260206004820152600e60248201526d15d493d391d7d5d317d4d510549560921b60448201526064015b60405180910390fd5b858511620001625760405162461bcd60e51b815260206004820152600c60248201526b15d493d391d7d5d317d1539160a21b604482015260640162000119565b428411620001a45760405162461bcd60e51b815260206004820152600e60248201526d15d493d391d7d49597d4d510549560921b604482015260640162000119565b838311620001e45760405162461bcd60e51b815260206004820152600c60248201526b15d493d391d7d49597d1539160a21b604482015260640162000119565b428211620002265760405162461bcd60e51b815260206004820152600e60248201526d15d493d391d7d414d7d4d510549560921b604482015260640162000119565b6001600160a01b03888116608052600a80546001600160a01b03191691891691909117905560a086905260c085905260e084905261010083905261012082905280516200027b906010906020840190620002e8565b505050505050505050505050505050505062000530565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002f690620004f4565b90600052602060002090601f0160209004810192826200031a576000855562000365565b82601f106200033557805160ff191683800117855562000365565b8280016001018555821562000365579182015b828111156200036557825182559160200191906001019062000348565b506200037392915062000377565b5090565b5b8082111562000373576000815560010162000378565b80516001600160a01b0381168114620003a657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080600080600080610100898b031215620003df57600080fd5b620003ea896200038e565b97506020620003fb818b016200038e565b975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a015160018060401b03808211156200043a57600080fd5b818c0191508c601f8301126200044f57600080fd5b815181811115620004645762000464620003ab565b604051601f8201601f19908116603f011681019083821181831017156200048f576200048f620003ab565b816040528281528f86848701011115620004a857600080fd5b600093505b82841015620004cc5784840186015181850187015292850192620004ad565b82841115620004de5760008684830101525b8096505050505050509295985092959890939650565b600181811c908216806200050957607f821691505b6020821081036200052a57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516101005161012051612c17620005a3600039600081816104720152610b8f0152600081816104a601526112ef01526000818161084c01526112c50152600081816107b801526116420152600081816106bc01526116170152600061146d0152612c176000f3fe6080604052600436106102c85760003560e01c806389fcbdc511610175578063b98451cf116100dc578063e222c7f911610095578063f084222f1161006f578063f084222f146108b7578063f2fde38b146108d7578063fb195490146108f7578063fc5666a01461090a57600080fd5b8063e222c7f914610825578063e38f19151461083a578063e985e9c51461086e57600080fd5b8063b98451cf14610771578063bd32fb6614610786578063bfb6e0e7146107a6578063c87b56dd146107da578063d8258d95146107fa578063e086e5ec1461081057600080fd5b80639960c9541161012e5780639960c954146106de57806399c9c36d146106f3578063a0712d6814610709578063a22cb4651461071c578063a67d9c5e1461073c578063b88d4fde1461075157600080fd5b806389fcbdc5146106175780638ba4cc3c146106375780638c7ea24b146106575780638da5cb5b1461067757806395d89b4114610695578063994d3969146106aa57600080fd5b8063341a18bd1161023457806355f804b3116101ed5780636352211e116101c75780636352211e146105a55780636c8e4e4a146105c557806370a08231146105e2578063715018a61461060257600080fd5b806355f804b31461055b57806359eda1b51461057b5780635b8ad4291461059057600080fd5b8063341a18bd146104945780633574a2dd146104c857806337ae4d5c146104e857806342842e0e146104fb5780634b1d2f9d1461051b57806351cff8d91461053b57600080fd5b806318160ddd1161028657806318160ddd146103b357806319cc02aa146103d65780631e84c413146103ec57806323b872dd146104015780632a55205a146104215780633360caa01461046057600080fd5b8062c112bd146102cd57806301ffc9a714610302578063034d77941461032257806306fdde0314610339578063081812fc1461035b578063095ea7b314610393575b600080fd5b3480156102d957600080fd5b506102ed6102e83660046125a2565b610925565b60405190151581526020015b60405180910390f35b34801561030e57600080fd5b506102ed61031d366004612613565b6109ab565b34801561032e57600080fd5b506103376109bc565b005b34801561034557600080fd5b5061034e610a0e565b6040516102f9919061268f565b34801561036757600080fd5b5061037b6103763660046126a2565b610aa0565b6040516001600160a01b0390911681526020016102f9565b34801561039f57600080fd5b506103376103ae3660046126bb565b610ae4565b3480156103bf57600080fd5b50600254600154035b6040519081526020016102f9565b3480156103e257600080fd5b506103c860125481565b3480156103f857600080fd5b506102ed610b71565b34801561040d57600080fd5b5061033761041c3660046126e5565b610bb3565b34801561042d57600080fd5b5061044161043c366004612721565b610bbe565b604080516001600160a01b0390931683526020830191909152016102f9565b34801561046c57600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d457600080fd5b506103376104e33660046127ce565b610c12565b6103376104f6366004612816565b610c53565b34801561050757600080fd5b506103376105163660046126e5565b610df4565b34801561052757600080fd5b506102ed6105363660046125a2565b610e0f565b34801561054757600080fd5b50610337610556366004612866565b610e6e565b34801561056757600080fd5b506103376105763660046127ce565b610f58565b34801561058757600080fd5b50610337610f95565b34801561059c57600080fd5b50610337610fdc565b3480156105b157600080fd5b5061037b6105c03660046126a2565b61101a565b3480156105d157600080fd5b506103c8680796e3ea3f8ab0000081565b3480156105ee57600080fd5b506103c86105fd366004612866565b61102c565b34801561060e57600080fd5b5061033761107a565b34801561062357600080fd5b50610337610632366004612866565b6110b0565b34801561064357600080fd5b506103376106523660046126bb565b611152565b34801561066357600080fd5b506103376106723660046126bb565b611222565b34801561068357600080fd5b506009546001600160a01b031661037b565b3480156106a157600080fd5b5061034e611256565b3480156106b657600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ea57600080fd5b506102ed611265565b3480156106ff57600080fd5b506103c86101bc81565b6103376107173660046126a2565b611316565b34801561072857600080fd5b5061033761073736600461288f565b6114e9565b34801561074857600080fd5b506103c8600a81565b34801561075d57600080fd5b5061033761076c3660046128c6565b61157e565b34801561077d57600080fd5b506102ed6115b8565b34801561079257600080fd5b506103376107a13660046126a2565b611666565b3480156107b257600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156107e657600080fd5b5061034e6107f53660046126a2565b611695565b34801561080657600080fd5b506103c861192c81565b34801561081c57600080fd5b506103376117aa565b34801561083157600080fd5b5061033761187a565b34801561084657600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561087a57600080fd5b506102ed610889366004612941565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b3480156108c357600080fd5b506103376108d23660046126a2565b6118c5565b3480156108e357600080fd5b506103376108f2366004612866565b6118f4565b610337610905366004612816565b61198f565b34801561091657600080fd5b506103c86658d15e1762800081565b600061099b85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c54604080516001600160a01b038a16602082015290810188905290925060600190505b60405160208183030381529060405280519060200120611b18565b151560011490505b949350505050565b60006109b682611b2e565b92915050565b6009546001600160a01b031633146109ef5760405162461bcd60e51b81526004016109e690612974565b60405180910390fd5b6011805462ff0000198116620100009182900460ff1615909102179055565b606060038054610a1d906129a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a49906129a9565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b5050505050905090565b6000610aab82611b39565b610ac8576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610aef8261101a565b9050806001600160a01b0316836001600160a01b031603610b235760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610b435750610b418133610889565b155b15610b61576040516367d9dca160e11b815260040160405180910390fd5b610b6c838383611b65565b505050565b6011546000906301000000900460ff1615610b8c5750600190565b507f0000000000000000000000000000000000000000000000000000000000000000421190565b610b6c838383611bc1565b60408051808201909152600080546001600160a01b038116808452600160a01b90910462ffffff166020840181905290929061271090610bfe90866129f9565b610c089190612a2e565b9150509250929050565b6009546001600160a01b03163314610c3c5760405162461bcd60e51b81526004016109e690612974565b8051610c4f9060109060208401906124a2565b5050565b336000818152600e60205260409020548390610c70908490612a42565b1115610cb05760405162461bcd60e51b815260206004820152600f60248201526e455843454544535f4d4158494d554d60881b60448201526064016109e6565b610cb8611265565b610cf75760405162461bcd60e51b815260206004820152601060248201526f50524553414c455f494e41435449564560801b60448201526064016109e6565b610d0385858386610925565b610d465760405162461bcd60e51b815260206004820152601460248201527314149154d0531157d393d517d59154925192515160621b60448201526064016109e6565b61192c82610d576002546001540390565b610d619190612a42565b1115610d7f5760405162461bcd60e51b81526004016109e690612a5a565b6000610d926658d15e17628000846129f9565b905080341015610db45760405162461bcd60e51b81526004016109e690612a91565b6001600160a01b0382166000908152600e602052604081208054859290610ddc908490612a42565b90915550610dec90508284611dd5565b505050505050565b610b6c8383836040518060200160405280600081525061157e565b600061099b85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b54604080516001600160a01b038a1660208201529081018890529092506060019050610980565b600a546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa158015610ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee99190612ab8565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c9190612ad1565b6009546001600160a01b03163314610f825760405162461bcd60e51b81526004016109e690612974565b8051610c4f90600f9060208401906124a2565b6009546001600160a01b03163314610fbf5760405162461bcd60e51b81526004016109e690612974565b6011805461ff001981166101009182900460ff1615909102179055565b6009546001600160a01b031633146110065760405162461bcd60e51b81526004016109e690612974565b6011805460ff19811660ff90911615179055565b600061102582611def565b5192915050565b60006001600160a01b038216611055576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6009546001600160a01b031633146110a45760405162461bcd60e51b81526004016109e690612974565b6110ae6000611f0a565b565b6009546001600160a01b031633146110da5760405162461bcd60e51b81526004016109e690612974565b6001600160a01b0381166111305760405162461bcd60e51b815260206004820152601760248201527f524543495049454e545f5a45524f5f414444524553535300000000000000000060448201526064016109e6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b0316331461117c5760405162461bcd60e51b81526004016109e690612974565b61192c8161118d6002546001540390565b6111979190612a42565b11156111b55760405162461bcd60e51b81526004016109e690612a5a565b80601260008282546111c79190612a42565b90915550506012546101bc10156112185760405162461bcd60e51b8152602060048201526015602482015274115610d1515114d7d05254911493d417d312535255605a1b60448201526064016109e6565b610c4f8282611dd5565b6009546001600160a01b0316331461124c5760405162461bcd60e51b81526004016109e690612974565b610c4f8282611f5c565b606060048054610a1d906129a9565b6000600c546000036112ac5760405162461bcd60e51b815260206004820152601060248201526f115354151657d3515492d3115493d3d560821b60448201526064016109e6565b60115462010000900460ff16156112c35750600190565b7f00000000000000000000000000000000000000000000000000000000000000004211801561131157507f000000000000000000000000000000000000000000000000000000000000000042105b905090565b600a8111156113605760405162461bcd60e51b8152602060048201526016602482015275043414e545f4d494e545f4d4f52455f5448414e5f31360541b60448201526064016109e6565b611368610b71565b6113ad5760405162461bcd60e51b81526020600482015260166024820152755055424c49435f53414c455f4e4f545f41435449564560501b60448201526064016109e6565b61192c816113be6002546001540390565b6113c89190612a42565b11156113e65760405162461bcd60e51b81526004016109e690612a5a565b333480156114295760006114016658d15e17628000856129f9565b9050808210156114235760405162461bcd60e51b81526004016109e690612a91565b506114df565b600061143e680796e3ea3f8ab00000856129f9565b6040516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af11580156114b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114dc9190612ad1565b50505b610b6c8284611dd5565b336001600160a01b038316036115125760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611589848484611bc1565b61159584848484611ff8565b6115b2576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000600b546000036115ff5760405162461bcd60e51b815260206004820152601060248201526f115354151657d3515492d3115493d3d560821b60448201526064016109e6565b601154610100900460ff16156116155750600190565b7f0000000000000000000000000000000000000000000000000000000000000000421180156113115750507f0000000000000000000000000000000000000000000000000000000000000000421090565b6009546001600160a01b031633146116905760405162461bcd60e51b81526004016109e690612974565b600b55565b60606116a082611b39565b6116d95760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b60448201526064016109e6565b60115460ff1661177357601080546116f0906129a9565b80601f016020809104026020016040519081016040528092919081815260200182805461171c906129a9565b80156117695780601f1061173e57610100808354040283529160200191611769565b820191906000526020600020905b81548152906001019060200180831161174c57829003601f168201915b50505050506109b6565b61177b6120f7565b61178483612106565b604051602001611795929190612aee565b60405160208183030381529060405292915050565b47806117e55760405162461bcd60e51b815260206004820152600a6024820152694e4f5f42414c414e434560b01b60448201526064016109e6565b600a546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611832576040519150601f19603f3d011682016040523d82523d6000602084013e611837565b606091505b5050905080610c4f5760405162461bcd60e51b815260206004820152600f60248201526e15d2551211149055d7d19052531151608a1b60448201526064016109e6565b6009546001600160a01b031633146118a45760405162461bcd60e51b81526004016109e690612974565b6011805463ff00000019811663010000009182900460ff1615909102179055565b6009546001600160a01b031633146118ef5760405162461bcd60e51b81526004016109e690612974565b600c55565b6009546001600160a01b0316331461191e5760405162461bcd60e51b81526004016109e690612974565b6001600160a01b0381166119835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109e6565b61198c81611f0a565b50565b336000818152600d602052604090205483906119ac908490612a42565b11156119ec5760405162461bcd60e51b815260206004820152600f60248201526e455843454544535f4d4158494d554d60881b60448201526064016109e6565b6119f46115b8565b611a335760405162461bcd60e51b815260206004820152601060248201526f50524553414c455f494e41435449564560801b60448201526064016109e6565b611a3f85858386610e0f565b611a825760405162461bcd60e51b815260206004820152601460248201527314149154d0531157d393d517d59154925192515160621b60448201526064016109e6565b61192c82611a936002546001540390565b611a9d9190612a42565b1115611abb5760405162461bcd60e51b81526004016109e690612a5a565b6000611ace6658d15e17628000846129f9565b905080341015611af05760405162461bcd60e51b81526004016109e690612a91565b6001600160a01b0382166000908152600d602052604081208054859290610ddc908490612a42565b600082611b258584612206565b14949350505050565b60006109b6826122b2565b6000600154821080156109b6575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611bcc82611def565b80519091506000906001600160a01b0316336001600160a01b03161480611bfa57508151611bfa9033610889565b80611c15575033611c0a84610aa0565b6001600160a01b0316145b905080611c3557604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611c6a5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611c9157604051633a954ecd60e21b815260040160405180910390fd5b611ca16000848460000151611b65565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611d8b57600154811015611d8b57825160008281526005602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610c4f8282604051806020016040528060008152506122f2565b60408051606081018252600080825260208201819052918101919091526001548290811015611ef157600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611eef5780516001600160a01b031615611e86579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611eea579392505050565b611e86565b505b604051636f96cda160e11b815260040160405180910390fd5b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612710811115611fae5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f206869676800000000000060448201526064016109e6565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260008054600160a01b9093026001600160b81b0319909316909117919091179055565b60006001600160a01b0384163b156120ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061203c903390899088908890600401612b2d565b6020604051808303816000875af1925050508015612077575060408051601f3d908101601f1916820190925261207491810190612b6a565b60015b6120d5573d8080156120a5576040519150601f19603f3d011682016040523d82523d6000602084013e6120aa565b606091505b5080516000036120cd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506109a3565b5060016109a3565b6060600f8054610a1d906129a9565b60608160000361212d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612157578061214181612b87565b91506121509050600a83612a2e565b9150612131565b6000816001600160401b0381111561217157612171612743565b6040519080825280601f01601f19166020018201604052801561219b576020820181803683370190505b5090505b84156109a3576121b0600183612ba0565b91506121bd600a86612bb7565b6121c8906030612a42565b60f81b8183815181106121dd576121dd612bcb565b60200101906001600160f81b031916908160001a9053506121ff600a86612a2e565b945061219f565b600081815b84518110156122aa57600085828151811061222857612228612bcb565b6020026020010151905080831161226a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612297565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806122a281612b87565b91505061220b565b509392505050565b60006001600160e01b031982166380ac58cd60e01b14806122e357506001600160e01b03198216635b5e139f60e01b145b806109b657506109b6826122ff565b610b6c8383836001612334565b60006001600160e01b0319821663152a902d60e11b14806109b657506301ffc9a760e01b6001600160e01b03198316146109b6565b6001546001600160a01b03851661235d57604051622e076360e81b815260040160405180910390fd5b8360000361237e5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526005909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156124995760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561246f575061246d6000888488611ff8565b155b1561248d576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612418565b50600155611dce565b8280546124ae906129a9565b90600052602060002090601f0160209004810192826124d05760008555612516565b82601f106124e957805160ff1916838001178555612516565b82800160010185558215612516579182015b828111156125165782518255916020019190600101906124fb565b50612522929150612526565b5090565b5b808211156125225760008155600101612527565b60008083601f84011261254d57600080fd5b5081356001600160401b0381111561256457600080fd5b6020830191508360208260051b850101111561257f57600080fd5b9250929050565b80356001600160a01b038116811461259d57600080fd5b919050565b600080600080606085870312156125b857600080fd5b84356001600160401b038111156125ce57600080fd5b6125da8782880161253b565b90955093506125ed905060208601612586565b9396929550929360400135925050565b6001600160e01b03198116811461198c57600080fd5b60006020828403121561262557600080fd5b8135612630816125fd565b9392505050565b60005b8381101561265257818101518382015260200161263a565b838111156115b25750506000910152565b6000815180845261267b816020860160208601612637565b601f01601f19169290920160200192915050565b6020815260006126306020830184612663565b6000602082840312156126b457600080fd5b5035919050565b600080604083850312156126ce57600080fd5b6126d783612586565b946020939093013593505050565b6000806000606084860312156126fa57600080fd5b61270384612586565b925061271160208501612586565b9150604084013590509250925092565b6000806040838503121561273457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561277357612773612743565b604051601f8501601f19908116603f0116810190828211818310171561279b5761279b612743565b816040528093508581528686860111156127b457600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156127e057600080fd5b81356001600160401b038111156127f657600080fd5b8201601f8101841361280757600080fd5b6109a384823560208401612759565b6000806000806060858703121561282c57600080fd5b84356001600160401b0381111561284257600080fd5b61284e8782880161253b565b90989097506020870135966040013595509350505050565b60006020828403121561287857600080fd5b61263082612586565b801515811461198c57600080fd5b600080604083850312156128a257600080fd5b6128ab83612586565b915060208301356128bb81612881565b809150509250929050565b600080600080608085870312156128dc57600080fd5b6128e585612586565b93506128f360208601612586565b92506040850135915060608501356001600160401b0381111561291557600080fd5b8501601f8101871361292657600080fd5b61293587823560208401612759565b91505092959194509250565b6000806040838503121561295457600080fd5b61295d83612586565b915061296b60208401612586565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806129bd57607f821691505b6020821081036129dd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a1357612a136129e3565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612a3d57612a3d612a18565b500490565b60008219821115612a5557612a556129e3565b500190565b60208082526017908201527f455843454544535f434f4c4c454354494f4e5f53495a45000000000000000000604082015260600190565b6020808252600d908201526c56414c55455f544f4f5f4c4f5760981b604082015260600190565b600060208284031215612aca57600080fd5b5051919050565b600060208284031215612ae357600080fd5b815161263081612881565b60008351612b00818460208801612637565b835190830190612b14818360208801612637565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612b6090830184612663565b9695505050505050565b600060208284031215612b7c57600080fd5b8151612630816125fd565b600060018201612b9957612b996129e3565b5060010190565b600082821015612bb257612bb26129e3565b500390565b600082612bc657612bc6612a18565b500690565b634e487b7160e01b600052603260045260246000fdfea26469706673582212200e481299ff8a2559610cd8c4c1f17b340351770701f49dc72254790267659b9564736f6c634300080d0033000000000000000000000000539bde0d7dbd336b79148aa742883198bbf603420000000000000000000000009f3b4c7f863d4d3615aa203a230d18ea4db465820000000000000000000000000000000000000000000000000000000062e2c0900000000000000000000000000000000000000000000000000000000062e4120f0000000000000000000000000000000000000000000000000000000062e412100000000000000000000000000000000000000000000000000000000062e5638f0000000000000000000000000000000000000000000000000000000062e563900000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f6d6574612d6d616769632d706f74696f6e732e73332e616d617a6f6e6177732e636f6d2f6a736f6e2f302e6a736f6e000000000000000000
Deployed Bytecode
0x6080604052600436106102c85760003560e01c806389fcbdc511610175578063b98451cf116100dc578063e222c7f911610095578063f084222f1161006f578063f084222f146108b7578063f2fde38b146108d7578063fb195490146108f7578063fc5666a01461090a57600080fd5b8063e222c7f914610825578063e38f19151461083a578063e985e9c51461086e57600080fd5b8063b98451cf14610771578063bd32fb6614610786578063bfb6e0e7146107a6578063c87b56dd146107da578063d8258d95146107fa578063e086e5ec1461081057600080fd5b80639960c9541161012e5780639960c954146106de57806399c9c36d146106f3578063a0712d6814610709578063a22cb4651461071c578063a67d9c5e1461073c578063b88d4fde1461075157600080fd5b806389fcbdc5146106175780638ba4cc3c146106375780638c7ea24b146106575780638da5cb5b1461067757806395d89b4114610695578063994d3969146106aa57600080fd5b8063341a18bd1161023457806355f804b3116101ed5780636352211e116101c75780636352211e146105a55780636c8e4e4a146105c557806370a08231146105e2578063715018a61461060257600080fd5b806355f804b31461055b57806359eda1b51461057b5780635b8ad4291461059057600080fd5b8063341a18bd146104945780633574a2dd146104c857806337ae4d5c146104e857806342842e0e146104fb5780634b1d2f9d1461051b57806351cff8d91461053b57600080fd5b806318160ddd1161028657806318160ddd146103b357806319cc02aa146103d65780631e84c413146103ec57806323b872dd146104015780632a55205a146104215780633360caa01461046057600080fd5b8062c112bd146102cd57806301ffc9a714610302578063034d77941461032257806306fdde0314610339578063081812fc1461035b578063095ea7b314610393575b600080fd5b3480156102d957600080fd5b506102ed6102e83660046125a2565b610925565b60405190151581526020015b60405180910390f35b34801561030e57600080fd5b506102ed61031d366004612613565b6109ab565b34801561032e57600080fd5b506103376109bc565b005b34801561034557600080fd5b5061034e610a0e565b6040516102f9919061268f565b34801561036757600080fd5b5061037b6103763660046126a2565b610aa0565b6040516001600160a01b0390911681526020016102f9565b34801561039f57600080fd5b506103376103ae3660046126bb565b610ae4565b3480156103bf57600080fd5b50600254600154035b6040519081526020016102f9565b3480156103e257600080fd5b506103c860125481565b3480156103f857600080fd5b506102ed610b71565b34801561040d57600080fd5b5061033761041c3660046126e5565b610bb3565b34801561042d57600080fd5b5061044161043c366004612721565b610bbe565b604080516001600160a01b0390931683526020830191909152016102f9565b34801561046c57600080fd5b506103c87f0000000000000000000000000000000000000000000000000000000062e5639081565b3480156104a057600080fd5b506103c87f0000000000000000000000000000000000000000000000000000000062e5638f81565b3480156104d457600080fd5b506103376104e33660046127ce565b610c12565b6103376104f6366004612816565b610c53565b34801561050757600080fd5b506103376105163660046126e5565b610df4565b34801561052757600080fd5b506102ed6105363660046125a2565b610e0f565b34801561054757600080fd5b50610337610556366004612866565b610e6e565b34801561056757600080fd5b506103376105763660046127ce565b610f58565b34801561058757600080fd5b50610337610f95565b34801561059c57600080fd5b50610337610fdc565b3480156105b157600080fd5b5061037b6105c03660046126a2565b61101a565b3480156105d157600080fd5b506103c8680796e3ea3f8ab0000081565b3480156105ee57600080fd5b506103c86105fd366004612866565b61102c565b34801561060e57600080fd5b5061033761107a565b34801561062357600080fd5b50610337610632366004612866565b6110b0565b34801561064357600080fd5b506103376106523660046126bb565b611152565b34801561066357600080fd5b506103376106723660046126bb565b611222565b34801561068357600080fd5b506009546001600160a01b031661037b565b3480156106a157600080fd5b5061034e611256565b3480156106b657600080fd5b506103c87f0000000000000000000000000000000000000000000000000000000062e2c09081565b3480156106ea57600080fd5b506102ed611265565b3480156106ff57600080fd5b506103c86101bc81565b6103376107173660046126a2565b611316565b34801561072857600080fd5b5061033761073736600461288f565b6114e9565b34801561074857600080fd5b506103c8600a81565b34801561075d57600080fd5b5061033761076c3660046128c6565b61157e565b34801561077d57600080fd5b506102ed6115b8565b34801561079257600080fd5b506103376107a13660046126a2565b611666565b3480156107b257600080fd5b506103c87f0000000000000000000000000000000000000000000000000000000062e4120f81565b3480156107e657600080fd5b5061034e6107f53660046126a2565b611695565b34801561080657600080fd5b506103c861192c81565b34801561081c57600080fd5b506103376117aa565b34801561083157600080fd5b5061033761187a565b34801561084657600080fd5b506103c87f0000000000000000000000000000000000000000000000000000000062e4121081565b34801561087a57600080fd5b506102ed610889366004612941565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b3480156108c357600080fd5b506103376108d23660046126a2565b6118c5565b3480156108e357600080fd5b506103376108f2366004612866565b6118f4565b610337610905366004612816565b61198f565b34801561091657600080fd5b506103c86658d15e1762800081565b600061099b85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c54604080516001600160a01b038a16602082015290810188905290925060600190505b60405160208183030381529060405280519060200120611b18565b151560011490505b949350505050565b60006109b682611b2e565b92915050565b6009546001600160a01b031633146109ef5760405162461bcd60e51b81526004016109e690612974565b60405180910390fd5b6011805462ff0000198116620100009182900460ff1615909102179055565b606060038054610a1d906129a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a49906129a9565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b5050505050905090565b6000610aab82611b39565b610ac8576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610aef8261101a565b9050806001600160a01b0316836001600160a01b031603610b235760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610b435750610b418133610889565b155b15610b61576040516367d9dca160e11b815260040160405180910390fd5b610b6c838383611b65565b505050565b6011546000906301000000900460ff1615610b8c5750600190565b507f0000000000000000000000000000000000000000000000000000000062e56390421190565b610b6c838383611bc1565b60408051808201909152600080546001600160a01b038116808452600160a01b90910462ffffff166020840181905290929061271090610bfe90866129f9565b610c089190612a2e565b9150509250929050565b6009546001600160a01b03163314610c3c5760405162461bcd60e51b81526004016109e690612974565b8051610c4f9060109060208401906124a2565b5050565b336000818152600e60205260409020548390610c70908490612a42565b1115610cb05760405162461bcd60e51b815260206004820152600f60248201526e455843454544535f4d4158494d554d60881b60448201526064016109e6565b610cb8611265565b610cf75760405162461bcd60e51b815260206004820152601060248201526f50524553414c455f494e41435449564560801b60448201526064016109e6565b610d0385858386610925565b610d465760405162461bcd60e51b815260206004820152601460248201527314149154d0531157d393d517d59154925192515160621b60448201526064016109e6565b61192c82610d576002546001540390565b610d619190612a42565b1115610d7f5760405162461bcd60e51b81526004016109e690612a5a565b6000610d926658d15e17628000846129f9565b905080341015610db45760405162461bcd60e51b81526004016109e690612a91565b6001600160a01b0382166000908152600e602052604081208054859290610ddc908490612a42565b90915550610dec90508284611dd5565b505050505050565b610b6c8383836040518060200160405280600081525061157e565b600061099b85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b54604080516001600160a01b038a1660208201529081018890529092506060019050610980565b600a546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa158015610ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee99190612ab8565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c9190612ad1565b6009546001600160a01b03163314610f825760405162461bcd60e51b81526004016109e690612974565b8051610c4f90600f9060208401906124a2565b6009546001600160a01b03163314610fbf5760405162461bcd60e51b81526004016109e690612974565b6011805461ff001981166101009182900460ff1615909102179055565b6009546001600160a01b031633146110065760405162461bcd60e51b81526004016109e690612974565b6011805460ff19811660ff90911615179055565b600061102582611def565b5192915050565b60006001600160a01b038216611055576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6009546001600160a01b031633146110a45760405162461bcd60e51b81526004016109e690612974565b6110ae6000611f0a565b565b6009546001600160a01b031633146110da5760405162461bcd60e51b81526004016109e690612974565b6001600160a01b0381166111305760405162461bcd60e51b815260206004820152601760248201527f524543495049454e545f5a45524f5f414444524553535300000000000000000060448201526064016109e6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b0316331461117c5760405162461bcd60e51b81526004016109e690612974565b61192c8161118d6002546001540390565b6111979190612a42565b11156111b55760405162461bcd60e51b81526004016109e690612a5a565b80601260008282546111c79190612a42565b90915550506012546101bc10156112185760405162461bcd60e51b8152602060048201526015602482015274115610d1515114d7d05254911493d417d312535255605a1b60448201526064016109e6565b610c4f8282611dd5565b6009546001600160a01b0316331461124c5760405162461bcd60e51b81526004016109e690612974565b610c4f8282611f5c565b606060048054610a1d906129a9565b6000600c546000036112ac5760405162461bcd60e51b815260206004820152601060248201526f115354151657d3515492d3115493d3d560821b60448201526064016109e6565b60115462010000900460ff16156112c35750600190565b7f0000000000000000000000000000000000000000000000000000000062e412104211801561131157507f0000000000000000000000000000000000000000000000000000000062e5638f42105b905090565b600a8111156113605760405162461bcd60e51b8152602060048201526016602482015275043414e545f4d494e545f4d4f52455f5448414e5f31360541b60448201526064016109e6565b611368610b71565b6113ad5760405162461bcd60e51b81526020600482015260166024820152755055424c49435f53414c455f4e4f545f41435449564560501b60448201526064016109e6565b61192c816113be6002546001540390565b6113c89190612a42565b11156113e65760405162461bcd60e51b81526004016109e690612a5a565b333480156114295760006114016658d15e17628000856129f9565b9050808210156114235760405162461bcd60e51b81526004016109e690612a91565b506114df565b600061143e680796e3ea3f8ab00000856129f9565b6040516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018390529192507f000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342909116906323b872dd906064016020604051808303816000875af11580156114b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114dc9190612ad1565b50505b610b6c8284611dd5565b336001600160a01b038316036115125760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611589848484611bc1565b61159584848484611ff8565b6115b2576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000600b546000036115ff5760405162461bcd60e51b815260206004820152601060248201526f115354151657d3515492d3115493d3d560821b60448201526064016109e6565b601154610100900460ff16156116155750600190565b7f0000000000000000000000000000000000000000000000000000000062e2c090421180156113115750507f0000000000000000000000000000000000000000000000000000000062e4120f421090565b6009546001600160a01b031633146116905760405162461bcd60e51b81526004016109e690612974565b600b55565b60606116a082611b39565b6116d95760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b60448201526064016109e6565b60115460ff1661177357601080546116f0906129a9565b80601f016020809104026020016040519081016040528092919081815260200182805461171c906129a9565b80156117695780601f1061173e57610100808354040283529160200191611769565b820191906000526020600020905b81548152906001019060200180831161174c57829003601f168201915b50505050506109b6565b61177b6120f7565b61178483612106565b604051602001611795929190612aee565b60405160208183030381529060405292915050565b47806117e55760405162461bcd60e51b815260206004820152600a6024820152694e4f5f42414c414e434560b01b60448201526064016109e6565b600a546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611832576040519150601f19603f3d011682016040523d82523d6000602084013e611837565b606091505b5050905080610c4f5760405162461bcd60e51b815260206004820152600f60248201526e15d2551211149055d7d19052531151608a1b60448201526064016109e6565b6009546001600160a01b031633146118a45760405162461bcd60e51b81526004016109e690612974565b6011805463ff00000019811663010000009182900460ff1615909102179055565b6009546001600160a01b031633146118ef5760405162461bcd60e51b81526004016109e690612974565b600c55565b6009546001600160a01b0316331461191e5760405162461bcd60e51b81526004016109e690612974565b6001600160a01b0381166119835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109e6565b61198c81611f0a565b50565b336000818152600d602052604090205483906119ac908490612a42565b11156119ec5760405162461bcd60e51b815260206004820152600f60248201526e455843454544535f4d4158494d554d60881b60448201526064016109e6565b6119f46115b8565b611a335760405162461bcd60e51b815260206004820152601060248201526f50524553414c455f494e41435449564560801b60448201526064016109e6565b611a3f85858386610e0f565b611a825760405162461bcd60e51b815260206004820152601460248201527314149154d0531157d393d517d59154925192515160621b60448201526064016109e6565b61192c82611a936002546001540390565b611a9d9190612a42565b1115611abb5760405162461bcd60e51b81526004016109e690612a5a565b6000611ace6658d15e17628000846129f9565b905080341015611af05760405162461bcd60e51b81526004016109e690612a91565b6001600160a01b0382166000908152600d602052604081208054859290610ddc908490612a42565b600082611b258584612206565b14949350505050565b60006109b6826122b2565b6000600154821080156109b6575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611bcc82611def565b80519091506000906001600160a01b0316336001600160a01b03161480611bfa57508151611bfa9033610889565b80611c15575033611c0a84610aa0565b6001600160a01b0316145b905080611c3557604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611c6a5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611c9157604051633a954ecd60e21b815260040160405180910390fd5b611ca16000848460000151611b65565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611d8b57600154811015611d8b57825160008281526005602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610c4f8282604051806020016040528060008152506122f2565b60408051606081018252600080825260208201819052918101919091526001548290811015611ef157600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611eef5780516001600160a01b031615611e86579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611eea579392505050565b611e86565b505b604051636f96cda160e11b815260040160405180910390fd5b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612710811115611fae5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f206869676800000000000060448201526064016109e6565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260008054600160a01b9093026001600160b81b0319909316909117919091179055565b60006001600160a01b0384163b156120ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061203c903390899088908890600401612b2d565b6020604051808303816000875af1925050508015612077575060408051601f3d908101601f1916820190925261207491810190612b6a565b60015b6120d5573d8080156120a5576040519150601f19603f3d011682016040523d82523d6000602084013e6120aa565b606091505b5080516000036120cd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506109a3565b5060016109a3565b6060600f8054610a1d906129a9565b60608160000361212d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612157578061214181612b87565b91506121509050600a83612a2e565b9150612131565b6000816001600160401b0381111561217157612171612743565b6040519080825280601f01601f19166020018201604052801561219b576020820181803683370190505b5090505b84156109a3576121b0600183612ba0565b91506121bd600a86612bb7565b6121c8906030612a42565b60f81b8183815181106121dd576121dd612bcb565b60200101906001600160f81b031916908160001a9053506121ff600a86612a2e565b945061219f565b600081815b84518110156122aa57600085828151811061222857612228612bcb565b6020026020010151905080831161226a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612297565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806122a281612b87565b91505061220b565b509392505050565b60006001600160e01b031982166380ac58cd60e01b14806122e357506001600160e01b03198216635b5e139f60e01b145b806109b657506109b6826122ff565b610b6c8383836001612334565b60006001600160e01b0319821663152a902d60e11b14806109b657506301ffc9a760e01b6001600160e01b03198316146109b6565b6001546001600160a01b03851661235d57604051622e076360e81b815260040160405180910390fd5b8360000361237e5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526005909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156124995760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561246f575061246d6000888488611ff8565b155b1561248d576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612418565b50600155611dce565b8280546124ae906129a9565b90600052602060002090601f0160209004810192826124d05760008555612516565b82601f106124e957805160ff1916838001178555612516565b82800160010185558215612516579182015b828111156125165782518255916020019190600101906124fb565b50612522929150612526565b5090565b5b808211156125225760008155600101612527565b60008083601f84011261254d57600080fd5b5081356001600160401b0381111561256457600080fd5b6020830191508360208260051b850101111561257f57600080fd5b9250929050565b80356001600160a01b038116811461259d57600080fd5b919050565b600080600080606085870312156125b857600080fd5b84356001600160401b038111156125ce57600080fd5b6125da8782880161253b565b90955093506125ed905060208601612586565b9396929550929360400135925050565b6001600160e01b03198116811461198c57600080fd5b60006020828403121561262557600080fd5b8135612630816125fd565b9392505050565b60005b8381101561265257818101518382015260200161263a565b838111156115b25750506000910152565b6000815180845261267b816020860160208601612637565b601f01601f19169290920160200192915050565b6020815260006126306020830184612663565b6000602082840312156126b457600080fd5b5035919050565b600080604083850312156126ce57600080fd5b6126d783612586565b946020939093013593505050565b6000806000606084860312156126fa57600080fd5b61270384612586565b925061271160208501612586565b9150604084013590509250925092565b6000806040838503121561273457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561277357612773612743565b604051601f8501601f19908116603f0116810190828211818310171561279b5761279b612743565b816040528093508581528686860111156127b457600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156127e057600080fd5b81356001600160401b038111156127f657600080fd5b8201601f8101841361280757600080fd5b6109a384823560208401612759565b6000806000806060858703121561282c57600080fd5b84356001600160401b0381111561284257600080fd5b61284e8782880161253b565b90989097506020870135966040013595509350505050565b60006020828403121561287857600080fd5b61263082612586565b801515811461198c57600080fd5b600080604083850312156128a257600080fd5b6128ab83612586565b915060208301356128bb81612881565b809150509250929050565b600080600080608085870312156128dc57600080fd5b6128e585612586565b93506128f360208601612586565b92506040850135915060608501356001600160401b0381111561291557600080fd5b8501601f8101871361292657600080fd5b61293587823560208401612759565b91505092959194509250565b6000806040838503121561295457600080fd5b61295d83612586565b915061296b60208401612586565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806129bd57607f821691505b6020821081036129dd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a1357612a136129e3565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612a3d57612a3d612a18565b500490565b60008219821115612a5557612a556129e3565b500190565b60208082526017908201527f455843454544535f434f4c4c454354494f4e5f53495a45000000000000000000604082015260600190565b6020808252600d908201526c56414c55455f544f4f5f4c4f5760981b604082015260600190565b600060208284031215612aca57600080fd5b5051919050565b600060208284031215612ae357600080fd5b815161263081612881565b60008351612b00818460208801612637565b835190830190612b14818360208801612637565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612b6090830184612663565b9695505050505050565b600060208284031215612b7c57600080fd5b8151612630816125fd565b600060018201612b9957612b996129e3565b5060010190565b600082821015612bb257612bb26129e3565b500390565b600082612bc657612bc6612a18565b500690565b634e487b7160e01b600052603260045260246000fdfea26469706673582212200e481299ff8a2559610cd8c4c1f17b340351770701f49dc72254790267659b9564736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000539bde0d7dbd336b79148aa742883198bbf603420000000000000000000000009f3b4c7f863d4d3615aa203a230d18ea4db465820000000000000000000000000000000000000000000000000000000062e2c0900000000000000000000000000000000000000000000000000000000062e4120f0000000000000000000000000000000000000000000000000000000062e412100000000000000000000000000000000000000000000000000000000062e5638f0000000000000000000000000000000000000000000000000000000062e563900000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f6d6574612d6d616769632d706f74696f6e732e73332e616d617a6f6e6177732e636f6d2f6a736f6e2f302e6a736f6e000000000000000000
-----Decoded View---------------
Arg [0] : magicToken (address): 0x539bdE0d7Dbd336b79148AA742883198BBF60342
Arg [1] : revenueRecipient (address): 0x9F3b4c7f863d4d3615Aa203A230D18EA4DB46582
Arg [2] : _whitelistStart (uint256): 1659027600
Arg [3] : _whitelistEnd (uint256): 1659113999
Arg [4] : _reserveListStart (uint256): 1659114000
Arg [5] : _reserveListEnd (uint256): 1659200399
Arg [6] : _publicSaleStart (uint256): 1659200400
Arg [7] : tempUri (string): https://meta-magic-potions.s3.amazonaws.com/json/0.json
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342
Arg [1] : 0000000000000000000000009f3b4c7f863d4d3615aa203a230d18ea4db46582
Arg [2] : 0000000000000000000000000000000000000000000000000000000062e2c090
Arg [3] : 0000000000000000000000000000000000000000000000000000000062e4120f
Arg [4] : 0000000000000000000000000000000000000000000000000000000062e41210
Arg [5] : 0000000000000000000000000000000000000000000000000000000062e5638f
Arg [6] : 0000000000000000000000000000000000000000000000000000000062e56390
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000037
Arg [9] : 68747470733a2f2f6d6574612d6d616769632d706f74696f6e732e73332e616d
Arg [10] : 617a6f6e6177732e636f6d2f6a736f6e2f302e6a736f6e000000000000000000