ERC-721
Overview
Max Total Supply
350 MLC
Holders
254
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 MLCLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BookCoin721
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* ___ ___ ___ ___ ___ ___ /__/\ / /\ ___ / /\ ___ _____ / /\ / /\ / /\ ___ | |::\ / /:/_ / /\ / /::\ / /\ / /::\ / /::\ / /::\ / /::\ /__/| | |:|:\ / /:/ /\ / /:/ / /:/\:\ ___ ___ / /:/ / /:/\:\ / /:/\:\ / /:/\:\ / /:/\:\ | |:| __|__|:|\:\ / /:/ /:/_ / /:/ / /:/~/::\/__/\ / /\/__/::\ / /:/~/::\ / /:/~/:/ / /:/~/::\ / /:/~/:/ | |:| /__/::::| \:\/__/:/ /:/ /\/ /::\/__/:/ /:/\:\ \:\ / /:/\__\/\:\__/__/:/ /:/\:/__/:/ /:/__/__/:/ /:/\:\/__/:/ /:/_____|__|:| \ \:\~~\__\/\ \:\/:/ /:/__/:/\:\ \:\/:/__\/\ \:\ /:/ \ \:\/\ \:\/:/~/:| \:\/:::::| \:\/:/__\/\ \:\/:::::/__/::::\ \ \:\ \ \::/ /:/\__\/ \:\ \::/ \ \:\/:/ \__\::/\ \::/ /:/ \ \::/~~~~ \ \::/ \ \::/~~~~ ~\~~\:\ \ \:\ \ \:\/:/ \ \:\ \:\ \ \::/ /__/:/ \ \:\/:/ \ \:\ \ \:\ \ \:\ \ \:\ \ \:\ \ \::/ \__\/\ \:\ \__\/ \__\/ \ \::/ \ \:\ \ \:\ \ \:\ \__\/ \__\/ \__\/ \__\/ ___ ___ _\__\/ __\__\/ _\__\/ \__\/ / /\ / /\ / /\ / /::\ / /\ / /:/ / /::\ / /::\ / /:/\:\ / /:/_ / /:/ / /:/\:\ / /:/\:\ / /:/ \:\ / /:/ /\ / /:/ ___ / /:/~/::\ / /:/~/:/ /__/:/ \__\:|/ /:/ /::\ /__/:/ / /\/__/:/ /:/\:\/__/:/ /:/__\ \:\ / /:/__/:/ /:/\:\ \ \:\ / /:/\ \:\/:/__\/\ \:\/:::::/\ \:\ /:/\ \:\/:/~/:/ \ \:\ /:/ \ \::/ \ \::/~~~~ \ \:\/:/ \ \::/ /:/ \ \:\/:/ \ \:\ \ \:\ \ \::/ \__\/ /:/ \ \::/ \ \:\ \ \:\ \__\/ /__/:/ \__\/ \__\/ \__\/ \__\/ */ /// @title BookCoin's Metalibrary Card NFT Collection /// @author audie.eth /// @notice Become a Founder of the MetaLibrary — Giving You an Early Mint Pass to Future Drops, The Founder's Club, $BKCN Token*, & More. /// @dev Mint windows coded into contract, merkle trees are additive and don't need to repeat pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract BookCoin721 is ERC2981, ERC721, Ownable { using Counters for Counters.Counter; // mutable properties bytes32 private _rootPreSale; bytes32 private _rootGroup1; bytes32 private _rootGroup2; string private _baseTokenURI = "https://bookcoin.mypinata.cloud/ipfs/QmeeCAhgji7J4vqWxmXFvbSjvKc7etscXsF8maJTBmdvJc/"; string private _contractUri = "https://bookcoin.mypinata.cloud/ipfs/QmSCmtnvf2AQDLbwWEgRYmeYPagLbsxRR8cv6xyXEW9EvS"; uint256 private _preSaleStartTime = 1650315600; // Mon Apr 18 2022 21:00:00 GMT+0000 uint256 private _groupOneStartTime = 1650376800; // Tue Apr 19 2022 14:00:00 GMT+0000 uint256 private _groupTwoStartTime = 1650387600; // Tue Apr 19 2022 17:00:00 GMT+0000 uint256 private _publicMintStartTime = 1650355200; // Tue Apr 19 2022 08:00:00 GMT+0000 // counter for incrementing tokenID Counters.Counter private _nextTokenId; // map of addresses to count of NFTs minted mapping(address => uint16) public mintNum; // fixed properties uint256 public supplyLimit = 777; uint256 public mintPrice = 0.15 ether; uint256 public mintLimitSwitchTime = _groupTwoStartTime; // also set with group two below uint16 public firstMintLimit = 1; uint16 public secondMintLimit = 5; // EIP2981 properties address royaltyAddr = 0x83958d93Aa1Dd637f265F8FF324FC358e94c40dB; uint96 royaltyPercent = 1000; // denominator is 10000, so this is 10% /** * @notice Contructor for the NFT * @param name The long name of the NFT collection * @param symbol The short, all caps symbol for the collection * @param merklerootPreSale The merkle root for the presale allowed minters * @param merklerootGroup1 The merkle root for the group one allowed minters * @param merklerootGroup2 The merkle root for the group two allowed minters */ constructor( string memory name, string memory symbol, bytes32 merklerootPreSale, bytes32 merklerootGroup1, bytes32 merklerootGroup2 ) ERC2981() ERC721(name, symbol) Ownable() { _setDefaultRoyalty(royaltyAddr, royaltyPercent); _rootPreSale = merklerootPreSale; _rootGroup1 = merklerootGroup1; _rootGroup2 = merklerootGroup2; _nextTokenId.increment(); } /** * @notice Sets the ERC2981 default royalty info * @param receiver The address to receive default royalty payouts * @param feeNumerator The royalty fee in basis points, set over a denominatory of 10000 */ function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner { super._setDefaultRoyalty(receiver, feeNumerator); } /** * @notice Given a caller with a matching proof, and at least mint price ETH sent, mints the next NFT * @param proof A merkle proof that confirms the sender's address is in the list of approved minters */ function mint(bytes32[] calldata proof) external payable { // only the address on the merkle tree can mint, no others - means tree can be public address account = _msgSender(); require( msg.value >= mintPrice, "Ether value sent lower than mint price" ); require(_verify(_leaf(account), proof), "Invalid merkle proof"); require(_withinMintLimit(account, 1), "Already Minted"); _mintOne(account); } /** * @notice Allow minting more than one NFT in one call, up to the mint limit * @param proof A merkle proof that confirms the sender's address is in the list of approved minters * @param numberToMint The number of NFTs to mint * @dev The number of NFTs that can me minted is limited by the mint limit, which changes */ function mintBatch(bytes32[] calldata proof, uint16 numberToMint) external payable { address account = _msgSender(); require( msg.value >= mintPrice * numberToMint, "Ether value sent lower than mint price" ); require(_verify(_leaf(account), proof), "Invalid merkle proof"); require(_withinMintLimit(account, numberToMint), "Already Minted"); for (uint256 i = 0; i < numberToMint; i++) { _mintOne(account); } } /** * @notice Owner only mint function to mint reserves or giveaways * @param account The address to receive all the minted NFTs * @param numberToMint The number of NFTs to mint */ function ownerMint(address account, uint96 numberToMint) external onlyOwner { for (uint256 i = 0; i < numberToMint; i++) { _mintOne(account); } } /** * @notice View to see current mint limit * @return limit Current mint limit */ function mintLimit() public view returns(uint16){ if (block.timestamp <= mintLimitSwitchTime){ return firstMintLimit; } return secondMintLimit; } /** * @notice Allows the owner to withdraw the Ether collected from minting */ function withdrawEther() public onlyOwner { payable(_msgSender()).transfer(address(this).balance); } /** * @notice Overrides EIP721 and EIP2981 supportsInterface function * @param interfaceId Is supplied from anyone/contract calling this function, as defined in ERC 165 * @return supports A boolean saying if this contract supports the interface or not */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Shows maximum supply * @return uint256 Returns the maximum number of mintable NFTs */ function maxSupply() public view returns (uint256) { // total supply is the total minted return supplyLimit; } /** * @notice Shows total supply * @return uint256 Returns total existing supply */ function totalSupply() public view returns (uint256) { // total supply is the total minted return _nextTokenId.current() - 1; } /** * @notice Provides the root being used for presale approved minter list */ function preSaleRoot() public view returns (bytes32) { return _rootPreSale; } /** * @notice Allows the owner to set a new presale merkle root * @param newPreSaleRoot A merkle root created from a list of approved presale minters */ function setPreSaleRoot(bytes32 newPreSaleRoot) public onlyOwner { _rootPreSale = newPreSaleRoot; } /** * @notice Provides the root being used for group one approved minter list */ function preGroupOneRoot() public view returns (bytes32) { return _rootPreSale; } /** * @notice Provides the root being used for group one approved minter list * @param newGroupOneRoot A merkle root created from a list of approved group one minters */ function setGroupOneRoot(bytes32 newGroupOneRoot) public onlyOwner { _rootGroup1 = newGroupOneRoot; } /** * @notice Provides the root being used for group two approved minter list */ function preGroupTwoRoot() public view returns (bytes32) { return _rootPreSale; } /** * @notice Provides the root being used for group two approved minter list * @param newGroupTwoRoot A merkle root created from a list of approved group two minters */ function setGroupTwoRoot(bytes32 newGroupTwoRoot) public onlyOwner { _rootGroup2 = newGroupTwoRoot; } /** * @notice Retrieves the presale mint start time * @return date The unix time stamp for when presale mint starts */ function preSaleStartTime() public view returns (uint256) { return _preSaleStartTime; } /** * @notice Set the timestamp after which presale mint opens * @param newPreSaleStart The unix time stamp presale mint will start * @dev This time is when minting begins, should be set first */ function setPreSaleStartTime(uint256 newPreSaleStart) public onlyOwner { _preSaleStartTime = newPreSaleStart; } /** * @notice Retrieves the group one mint start time * @return date The unix time stamp for when group one mint starts */ function groupOneStartTime() public view returns (uint256) { return _groupOneStartTime; } /** * @notice Set the timestamp after which group one mint opens * @param newGroupOneStart The unix time stamp group one mint will start */ function setGroupOneStartTime(uint256 newGroupOneStart) public onlyOwner { require( newGroupOneStart > _preSaleStartTime, "Set time greater than presale time" ); _groupOneStartTime = newGroupOneStart; } /** * @notice Retrieves the group two mint start time * @return date The unix time stamp for when group two mint starts */ function groupTwoStartTime() public view returns (uint256) { return _groupTwoStartTime; } /** * @notice Set the timestamp after which group two mint opens * @param newGroupTwoStart The unix time stamp group two mint will start * @dev The mint limit switch is coded in here, needs to change with this time */ function setGroupTwoStartTime(uint256 newGroupTwoStart) public onlyOwner { require( newGroupTwoStart > _groupOneStartTime, "Set time greater than group one time" ); _groupTwoStartTime = newGroupTwoStart; mintLimitSwitchTime = newGroupTwoStart; } /** * @notice Retrieves the public mint start time * @return date The unix time stamp for when public mint starts */ function publicMintStartTime() public view returns (uint256) { return _publicMintStartTime; } /** * @notice Set the timestamp after which public mint opens * @param newPublicMintStart The unix time stamp public mint will start */ function setPublicMintStartTime(uint256 newPublicMintStart) public onlyOwner { require( newPublicMintStart > _groupTwoStartTime, "Set time greater than group two time" ); _publicMintStartTime = newPublicMintStart; } /** * @notice Gets next mint token id * @return uint256 The number of next token id to mint */ function getNextTokenId() public view returns (uint256) { return _nextTokenId.current(); } /** * @notice Provides collection metadata URI * @return string The contract metadata URI */ function contractURI() public view returns (string memory) { return _contractUri; } /** * @notice Sets the collection metadata URI * @param newContractUri The URI set for the collection metadata */ function setContractURI(string memory newContractUri) public onlyOwner { _contractUri = newContractUri; } /** * @notice Sets the token metadata base URI * @param uri The baseURI for the token metadata */ function setBaseURI(string memory uri) public onlyOwner { _baseTokenURI = uri; } /** * @notice Provides the URI for the specific token's metadata * @param tokenId The token ID for which you want the metadat URL * @dev This will only return for existing token IDs, and expects the file to end in .json */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string( abi.encodePacked( baseURI, Strings.toString(tokenId), ".json" ) ) : ""; } /** * @notice Confirms and address and proof will allow minting * @param account The address to use as a merkle leaf * @param proof The merkle proof you want to check is valid with the address * @dev This needs the address, proof, and time to be correct. Time check is in internal _verify function */ function canMint(address account, bytes32[] calldata proof) public view returns (bool) { return _verify(_leaf(account), proof); } function _withinMintLimit(address account, uint16 mintCount) internal view returns (bool) { uint16 num = mintNum[account]; if (block.timestamp <= mintLimitSwitchTime) { require( num + mintCount <= firstMintLimit, "Attempting to mint past limit" ); } else { require( num + mintCount <= secondMintLimit, "Attempting to mint past limit" ); } return true; } function _baseURI() internal view override returns (string memory) { return _baseTokenURI; } function _mintOne(address account) internal { require( _nextTokenId.current() <= supplyLimit, "Cannot mint beyond supply limit" ); _safeMint(account, _nextTokenId.current()); _nextTokenId.increment(); mintNum[account]++; } function _leaf(address account) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account)); } function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { bool presale = false; bool groupone = false; bool grouptwo = false; uint256 currentBlockTime = block.timestamp; if (currentBlockTime > _publicMintStartTime) { return true; } if (currentBlockTime > _groupTwoStartTime) { grouptwo = MerkleProof.verify(proof, _rootGroup2, leaf); } if (currentBlockTime > _groupOneStartTime) { groupone = MerkleProof.verify(proof, _rootGroup1, leaf); } if (currentBlockTime > _preSaleStartTime) { presale = MerkleProof.verify(proof, _rootPreSale, leaf); } return (presale || groupone || grouptwo); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @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.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (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 = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // 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 (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 (last updated v4.5.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
{ "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":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"merklerootPreSale","type":"bytes32"},{"internalType":"bytes32","name":"merklerootGroup1","type":"bytes32"},{"internalType":"bytes32","name":"merklerootGroup2","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"canMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstMintLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"groupOneStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"groupTwoStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint16","name":"numberToMint","type":"uint16"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintLimitSwitchTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintNum","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"address","name":"account","type":"address"},{"internalType":"uint96","name":"numberToMint","type":"uint96"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preGroupOneRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preGroupTwoRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSaleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondMintLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractUri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newGroupOneRoot","type":"bytes32"}],"name":"setGroupOneRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newGroupOneStart","type":"uint256"}],"name":"setGroupOneStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newGroupTwoRoot","type":"bytes32"}],"name":"setGroupTwoRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newGroupTwoStart","type":"uint256"}],"name":"setGroupTwoStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newPreSaleRoot","type":"bytes32"}],"name":"setPreSaleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPreSaleStart","type":"uint256"}],"name":"setPreSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPublicMintStart","type":"uint256"}],"name":"setPublicMintStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610100604052605460808181529062002ff160a03980516200002a91600c9160209091019062000311565b5060405180608001604052806053815260200162002f9e6053913980516200005b91600d9160209091019062000311565b5063625dd150600e5563625ec060600f5563625eea90601081905563625e6c00601155610309601455670214e8348c4f0000601555601655601780547783958d93aa1dd637f265f8ff324fc358e94c40db000500016001600160c01b0319909116179055601880546001600160601b0319166103e8179055348015620000e057600080fd5b506040516200304538038062003045833981016040819052620001039162000484565b8451859085906200011c90600290602085019062000311565b5080516200013290600390602084019062000311565b5050506200014f62000149620001ad60201b60201c565b620001b1565b6017546018546200017b9164010000000090046001600160a01b0316906001600160601b031662000203565b6009839055600a829055600b819055620001a2601262000308602090811b6200156217901c565b505050505062000546565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620002775760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002cf5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200026e565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b80546001019055565b8280546200031f9062000509565b90600052602060002090601f0160209004810192826200034357600085556200038e565b82601f106200035e57805160ff19168380011785556200038e565b828001600101855582156200038e579182015b828111156200038e57825182559160200191906001019062000371565b506200039c929150620003a0565b5090565b5b808211156200039c5760008155600101620003a1565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620003df57600080fd5b81516001600160401b0380821115620003fc57620003fc620003b7565b604051601f8301601f19908116603f01168101908282118183101715620004275762000427620003b7565b816040528381526020925086838588010111156200044457600080fd5b600091505b8382101562000468578582018301518183018401529082019062000449565b838211156200047a5760008385830101525b9695505050505050565b600080600080600060a086880312156200049d57600080fd5b85516001600160401b0380821115620004b557600080fd5b620004c389838a01620003cd565b96506020880151915080821115620004da57600080fd5b50620004e988828901620003cd565b60408801516060890151608090990151979a919950979695509350505050565b600181811c908216806200051e57607f821691505b602082108114156200054057634e487b7160e01b600052602260045260246000fd5b50919050565b612a4880620005566000396000f3fe6080604052600436106102c95760003560e01c80637362377b11610175578063bfaaade7116100dc578063dddb9bad11610095578063e985e9c51161006f578063e985e9c5146107ee578063f2fde38b1461080e578063fd4444c31461082e578063fe042d491461085f57600080fd5b8063dddb9bad146107a4578063e3460540146107b9578063e8a3d485146107d957600080fd5b8063bfaaade7146104cb578063c87b56dd14610725578063caa0f92a14610745578063cbd0fffe1461075a578063d3cf00a31461077a578063d5abeb011461078f57600080fd5b8063996517cf1161012e578063996517cf1461068a578063a22cb4651461069f578063b040533b146106bf578063b77a147b146106df578063b88d4fde146106f2578063bb15a5221461071257600080fd5b80637362377b14610602578063846438c0146104cb5780638da5cb5b1461061757806390c2266f14610635578063938e3d7b1461065557806395d89b411461067557600080fd5b80632910c6f01161023457806355f804b3116101ed578063665f4583116101c7578063665f4583146105965780636817c76c146105b757806370a08231146105cd578063715018a6146105ed57600080fd5b806355f804b3146105365780635fcd80a6146105565780636352211e1461057657600080fd5b80632910c6f01461046c5780632a55205a1461048c5780633154b9c2146104cb57806334a421d9146104e057806335379e2a1461050057806342842e0e1461051657600080fd5b80631499f936116102865780631499f936146103be57806318160ddd146103de57806318cc7e6b146103f357806319d1997a1461040857806323b872dd1461041e57806324bf54b21461043e57600080fd5b806301ffc9a7146102ce57806304634d8d1461030357806306d65af31461032557806306fdde0314610344578063081812fc14610366578063095ea7b31461039e575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004612275565b61087f565b60405190151581526020015b60405180910390f35b34801561030f57600080fd5b5061032361031e3660046122ae565b610890565b005b34801561033157600080fd5b50600e545b6040519081526020016102fa565b34801561035057600080fd5b506103596108d1565b6040516102fa9190612349565b34801561037257600080fd5b5061038661038136600461235c565b610963565b6040516001600160a01b0390911681526020016102fa565b3480156103aa57600080fd5b506103236103b9366004612375565b6109f8565b3480156103ca57600080fd5b506103236103d936600461235c565b610b0e565b3480156103ea57600080fd5b50610336610b9f565b3480156103ff57600080fd5b50601054610336565b34801561041457600080fd5b5061033660145481565b34801561042a57600080fd5b5061032361043936600461239f565b610bbb565b34801561044a57600080fd5b506017546104599061ffff1681565b60405161ffff90911681526020016102fa565b34801561047857600080fd5b5061032361048736600461235c565b610bec565b34801561049857600080fd5b506104ac6104a73660046123db565b610c1b565b604080516001600160a01b0390931683526020830191909152016102fa565b3480156104d757600080fd5b50600954610336565b3480156104ec57600080fd5b506103236104fb36600461235c565b610cc9565b34801561050c57600080fd5b5061033660165481565b34801561052257600080fd5b5061032361053136600461239f565b610cf8565b34801561054257600080fd5b50610323610551366004612489565b610d13565b34801561056257600080fd5b5061032361057136600461235c565b610d50565b34801561058257600080fd5b5061038661059136600461235c565b610ddc565b3480156105a257600080fd5b506017546104599062010000900461ffff1681565b3480156105c357600080fd5b5061033660155481565b3480156105d957600080fd5b506103366105e83660046124d2565b610e53565b3480156105f957600080fd5b50610323610eda565b34801561060e57600080fd5b50610323610f10565b34801561062357600080fd5b506008546001600160a01b0316610386565b34801561064157600080fd5b506103236106503660046122ae565b610f69565b34801561066157600080fd5b50610323610670366004612489565b610fc2565b34801561068157600080fd5b50610359610fff565b34801561069657600080fd5b5061045961100e565b3480156106ab57600080fd5b506103236106ba3660046124ed565b611035565b3480156106cb57600080fd5b506103236106da36600461235c565b611040565b6103236106ed366004612563565b61106f565b3480156106fe57600080fd5b5061032361070d3660046125a5565b61116c565b610323610720366004612621565b6111a4565b34801561073157600080fd5b5061035961074036600461235c565b6112d7565b34801561075157600080fd5b506103366113b2565b34801561076657600080fd5b506102ee61077536600461267f565b6113bd565b34801561078657600080fd5b50601154610336565b34801561079b57600080fd5b50601454610336565b3480156107b057600080fd5b50600f54610336565b3480156107c557600080fd5b506103236107d436600461235c565b6113d3565b3480156107e557600080fd5b5061035961145e565b3480156107fa57600080fd5b506102ee6108093660046126d2565b61146d565b34801561081a57600080fd5b506103236108293660046124d2565b61149b565b34801561083a57600080fd5b506104596108493660046124d2565b60136020526000908152604090205461ffff1681565b34801561086b57600080fd5b5061032361087a36600461235c565b611533565b600061088a8261156b565b92915050565b6008546001600160a01b031633146108c35760405162461bcd60e51b81526004016108ba90612705565b60405180910390fd5b6108cd82826115ab565b5050565b6060600280546108e09061273a565b80601f016020809104026020016040519081016040528092919081815260200182805461090c9061273a565b80156109595780601f1061092e57610100808354040283529160200191610959565b820191906000526020600020905b81548152906001019060200180831161093c57829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166109dc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ba565b506000908152600660205260409020546001600160a01b031690565b6000610a0382610ddc565b9050806001600160a01b0316836001600160a01b03161415610a715760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108ba565b336001600160a01b0382161480610a8d5750610a8d813361146d565b610aff5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108ba565b610b0983836116a8565b505050565b6008546001600160a01b03163314610b385760405162461bcd60e51b81526004016108ba90612705565b600f548111610b955760405162461bcd60e51b8152602060048201526024808201527f5365742074696d652067726561746572207468616e2067726f7570206f6e652060448201526374696d6560e01b60648201526084016108ba565b6010819055601655565b60006001610bac60125490565b610bb6919061278b565b905090565b610bc53382611716565b610be15760405162461bcd60e51b81526004016108ba906127a2565b610b098383836117e5565b6008546001600160a01b03163314610c165760405162461bcd60e51b81526004016108ba90612705565b600b55565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c905750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610caf906001600160601b0316876127f3565b610cb99190612828565b91519350909150505b9250929050565b6008546001600160a01b03163314610cf35760405162461bcd60e51b81526004016108ba90612705565b600a55565b610b098383836040518060200160405280600081525061116c565b6008546001600160a01b03163314610d3d5760405162461bcd60e51b81526004016108ba90612705565b80516108cd90600c9060208401906121c6565b6008546001600160a01b03163314610d7a5760405162461bcd60e51b81526004016108ba90612705565b6010548111610dd75760405162461bcd60e51b8152602060048201526024808201527f5365742074696d652067726561746572207468616e2067726f75702074776f2060448201526374696d6560e01b60648201526084016108ba565b601155565b6000818152600460205260408120546001600160a01b03168061088a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108ba565b60006001600160a01b038216610ebe5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108ba565b506001600160a01b031660009081526005602052604090205490565b6008546001600160a01b03163314610f045760405162461bcd60e51b81526004016108ba90612705565b610f0e6000611981565b565b6008546001600160a01b03163314610f3a5760405162461bcd60e51b81526004016108ba90612705565b60405133904780156108fc02916000818181858888f19350505050158015610f66573d6000803e3d6000fd5b50565b6008546001600160a01b03163314610f935760405162461bcd60e51b81526004016108ba90612705565b60005b816001600160601b0316811015610b0957610fb0836119d3565b80610fba8161283c565b915050610f96565b6008546001600160a01b03163314610fec5760405162461bcd60e51b81526004016108ba90612705565b80516108cd90600d9060208401906121c6565b6060600380546108e09061273a565b60006016544211611024575060175461ffff1690565b5060175462010000900461ffff1690565b6108cd338383611a8d565b6008546001600160a01b0316331461106a5760405162461bcd60e51b81526004016108ba90612705565b600e55565b60155433903410156110935760405162461bcd60e51b81526004016108ba90612857565b6110d861109f82611b5c565b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9b92505050565b61111b5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016108ba565b611126816001611c27565b6111635760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e48135a5b9d195960921b60448201526064016108ba565b610b09816119d3565b6111763383611716565b6111925760405162461bcd60e51b81526004016108ba906127a2565b61119e84848484611d2b565b50505050565b60155433906111b89061ffff8416906127f3565b3410156111d75760405162461bcd60e51b81526004016108ba90612857565b61121c6111e382611b5c565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9b92505050565b61125f5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016108ba565b6112698183611c27565b6112a65760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e48135a5b9d195960921b60448201526064016108ba565b60005b8261ffff168110156112d0576112be826119d3565b806112c88161283c565b9150506112a9565b5050505050565b6000818152600460205260409020546060906001600160a01b03166113565760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108ba565b6000611360611d5e565b9050600081511161138057604051806020016040528060008152506113ab565b8061138a84611d6d565b60405160200161139b92919061289d565b6040516020818303038152906040525b9392505050565b6000610bb660125490565b60006113cb61109f85611b5c565b949350505050565b6008546001600160a01b031633146113fd5760405162461bcd60e51b81526004016108ba90612705565b600e5481116114595760405162461bcd60e51b815260206004820152602260248201527f5365742074696d652067726561746572207468616e2070726573616c652074696044820152616d6560f01b60648201526084016108ba565b600f55565b6060600d80546108e09061273a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b031633146114c55760405162461bcd60e51b81526004016108ba90612705565b6001600160a01b03811661152a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ba565b610f6681611981565b6008546001600160a01b0316331461155d5760405162461bcd60e51b81526004016108ba90612705565b600955565b80546001019055565b60006001600160e01b031982166380ac58cd60e01b148061159c57506001600160e01b03198216635b5e139f60e01b145b8061088a575061088a82611e6b565b6127106001600160601b03821611156116195760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016108ba565b6001600160a01b03821661166f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108ba565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116dd82610ddc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600460205260408120546001600160a01b031661178f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ba565b600061179a83610ddc565b9050806001600160a01b0316846001600160a01b031614806117d55750836001600160a01b03166117ca84610963565b6001600160a01b0316145b806113cb57506113cb818561146d565b826001600160a01b03166117f882610ddc565b6001600160a01b03161461185c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108ba565b6001600160a01b0382166118be5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108ba565b6118c96000826116a8565b6001600160a01b03831660009081526005602052604081208054600192906118f290849061278b565b90915550506001600160a01b03821660009081526005602052604081208054600192906119209084906128dc565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6014546012541115611a275760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206d696e74206265796f6e6420737570706c79206c696d69740060448201526064016108ba565b611a3981611a3460125490565b611ea0565b611a47601280546001019055565b6001600160a01b0381166000908152601360205260408120805461ffff1691611a6f836128f4565b91906101000a81548161ffff021916908361ffff1602179055505050565b816001600160a01b0316836001600160a01b03161415611aef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108ba565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b6011546000908190819081904290811115611bbd57600194505050505061088a565b601054811115611bd757611bd486600b5489611eba565b91505b600f54811115611bf157611bee86600a5489611eba565b92505b600e54811115611c0b57611c088660095489611eba565b93505b8380611c145750825b80611c1c5750815b979650505050505050565b6001600160a01b03821660009081526013602052604081205460165461ffff909116904211611cb85760175461ffff16611c618483612916565b61ffff161115611cb35760405162461bcd60e51b815260206004820152601d60248201527f417474656d7074696e6720746f206d696e742070617374206c696d697400000060448201526064016108ba565b611d21565b60175462010000900461ffff16611ccf8483612916565b61ffff161115611d215760405162461bcd60e51b815260206004820152601d60248201527f417474656d7074696e6720746f206d696e742070617374206c696d697400000060448201526064016108ba565b5060019392505050565b611d368484846117e5565b611d4284848484611ed0565b61119e5760405162461bcd60e51b81526004016108ba9061293c565b6060600c80546108e09061273a565b606081611d915750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611dbb5780611da58161283c565b9150611db49050600a83612828565b9150611d95565b60008167ffffffffffffffff811115611dd657611dd66123fd565b6040519080825280601f01601f191660200182016040528015611e00576020820181803683370190505b5090505b84156113cb57611e1560018361278b565b9150611e22600a8661298e565b611e2d9060306128dc565b60f81b818381518110611e4257611e426129a2565b60200101906001600160f81b031916908160001a905350611e64600a86612828565b9450611e04565b60006001600160e01b0319821663152a902d60e11b148061088a57506301ffc9a760e01b6001600160e01b031983161461088a565b6108cd828260405180602001604052806000815250611fdd565b600082611ec78584612010565b14949350505050565b60006001600160a01b0384163b15611fd257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f149033908990889088906004016129b8565b602060405180830381600087803b158015611f2e57600080fd5b505af1925050508015611f5e575060408051601f3d908101601f19168201909252611f5b918101906129f5565b60015b611fb8573d808015611f8c576040519150601f19603f3d011682016040523d82523d6000602084013e611f91565b606091505b508051611fb05760405162461bcd60e51b81526004016108ba9061293c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506113cb565b506001949350505050565b611fe78383612084565b611ff46000848484611ed0565b610b095760405162461bcd60e51b81526004016108ba9061293c565b600081815b845181101561207c576000858281518110612032576120326129a2565b602002602001015190508083116120585760008381526020829052604090209250612069565b600081815260208490526040902092505b50806120748161283c565b915050612015565b509392505050565b6001600160a01b0382166120da5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108ba565b6000818152600460205260409020546001600160a01b03161561213f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108ba565b6001600160a01b03821660009081526005602052604081208054600192906121689084906128dc565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546121d29061273a565b90600052602060002090601f0160209004810192826121f4576000855561223a565b82601f1061220d57805160ff191683800117855561223a565b8280016001018555821561223a579182015b8281111561223a57825182559160200191906001019061221f565b5061224692915061224a565b5090565b5b80821115612246576000815560010161224b565b6001600160e01b031981168114610f6657600080fd5b60006020828403121561228757600080fd5b81356113ab8161225f565b80356001600160a01b03811681146122a957600080fd5b919050565b600080604083850312156122c157600080fd5b6122ca83612292565b915060208301356001600160601b03811681146122e657600080fd5b809150509250929050565b60005b8381101561230c5781810151838201526020016122f4565b8381111561119e5750506000910152565b600081518084526123358160208601602086016122f1565b601f01601f19169290920160200192915050565b6020815260006113ab602083018461231d565b60006020828403121561236e57600080fd5b5035919050565b6000806040838503121561238857600080fd5b61239183612292565b946020939093013593505050565b6000806000606084860312156123b457600080fd5b6123bd84612292565b92506123cb60208501612292565b9150604084013590509250925092565b600080604083850312156123ee57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561242e5761242e6123fd565b604051601f8501601f19908116603f01168101908282118183101715612456576124566123fd565b8160405280935085815286868601111561246f57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561249b57600080fd5b813567ffffffffffffffff8111156124b257600080fd5b8201601f810184136124c357600080fd5b6113cb84823560208401612413565b6000602082840312156124e457600080fd5b6113ab82612292565b6000806040838503121561250057600080fd5b61250983612292565b9150602083013580151581146122e657600080fd5b60008083601f84011261253057600080fd5b50813567ffffffffffffffff81111561254857600080fd5b6020830191508360208260051b8501011115610cc257600080fd5b6000806020838503121561257657600080fd5b823567ffffffffffffffff81111561258d57600080fd5b6125998582860161251e565b90969095509350505050565b600080600080608085870312156125bb57600080fd5b6125c485612292565b93506125d260208601612292565b925060408501359150606085013567ffffffffffffffff8111156125f557600080fd5b8501601f8101871361260657600080fd5b61261587823560208401612413565b91505092959194509250565b60008060006040848603121561263657600080fd5b833567ffffffffffffffff81111561264d57600080fd5b6126598682870161251e565b909450925050602084013561ffff8116811461267457600080fd5b809150509250925092565b60008060006040848603121561269457600080fd5b61269d84612292565b9250602084013567ffffffffffffffff8111156126b957600080fd5b6126c58682870161251e565b9497909650939450505050565b600080604083850312156126e557600080fd5b6126ee83612292565b91506126fc60208401612292565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061274e57607f821691505b6020821081141561276f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561279d5761279d612775565b500390565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600081600019048311821515161561280d5761280d612775565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261283757612837612812565b500490565b600060001982141561285057612850612775565b5060010190565b60208082526026908201527f45746865722076616c75652073656e74206c6f776572207468616e206d696e7460408201526520707269636560d01b606082015260800190565b600083516128af8184602088016122f1565b8351908301906128c38183602088016122f1565b64173539b7b760d91b9101908152600501949350505050565b600082198211156128ef576128ef612775565b500190565b600061ffff8083168181141561290c5761290c612775565b6001019392505050565b600061ffff80831681851680830382111561293357612933612775565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261299d5761299d612812565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129eb9083018461231d565b9695505050505050565b600060208284031215612a0757600080fd5b81516113ab8161225f56fea26469706673582212205de9e20bc21d6ca1c606ec2b489bd496abe08284281ff1d380a2f93879592e2f64736f6c6343000809003368747470733a2f2f626f6f6b636f696e2e6d7970696e6174612e636c6f75642f697066732f516d53436d746e7666324151444c627757456752596d65595061674c62737852523863763678795845573945765368747470733a2f2f626f6f6b636f696e2e6d7970696e6174612e636c6f75642f697066732f516d6565434168676a69374a34767157786d58467662536a764b633765747363587346386d614a54426d64764a632f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0e49689bf1ef6adc40a1954743f3171d586d19d795f5de84757d377633c96cf62839917f2a15ecafd5677df487c43f87484f09671e8a3079e7df95404793c4dccbcf2a8f2d06a2f1b1e7919ba2dce9d2952255591f8af6e60e61a861b414e7b8a000000000000000000000000000000000000000000000000000000000000001a426f6f6b436f696e204d6574616c69627261727920436172647300000000000000000000000000000000000000000000000000000000000000000000000000034d4c430000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102c95760003560e01c80637362377b11610175578063bfaaade7116100dc578063dddb9bad11610095578063e985e9c51161006f578063e985e9c5146107ee578063f2fde38b1461080e578063fd4444c31461082e578063fe042d491461085f57600080fd5b8063dddb9bad146107a4578063e3460540146107b9578063e8a3d485146107d957600080fd5b8063bfaaade7146104cb578063c87b56dd14610725578063caa0f92a14610745578063cbd0fffe1461075a578063d3cf00a31461077a578063d5abeb011461078f57600080fd5b8063996517cf1161012e578063996517cf1461068a578063a22cb4651461069f578063b040533b146106bf578063b77a147b146106df578063b88d4fde146106f2578063bb15a5221461071257600080fd5b80637362377b14610602578063846438c0146104cb5780638da5cb5b1461061757806390c2266f14610635578063938e3d7b1461065557806395d89b411461067557600080fd5b80632910c6f01161023457806355f804b3116101ed578063665f4583116101c7578063665f4583146105965780636817c76c146105b757806370a08231146105cd578063715018a6146105ed57600080fd5b806355f804b3146105365780635fcd80a6146105565780636352211e1461057657600080fd5b80632910c6f01461046c5780632a55205a1461048c5780633154b9c2146104cb57806334a421d9146104e057806335379e2a1461050057806342842e0e1461051657600080fd5b80631499f936116102865780631499f936146103be57806318160ddd146103de57806318cc7e6b146103f357806319d1997a1461040857806323b872dd1461041e57806324bf54b21461043e57600080fd5b806301ffc9a7146102ce57806304634d8d1461030357806306d65af31461032557806306fdde0314610344578063081812fc14610366578063095ea7b31461039e575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004612275565b61087f565b60405190151581526020015b60405180910390f35b34801561030f57600080fd5b5061032361031e3660046122ae565b610890565b005b34801561033157600080fd5b50600e545b6040519081526020016102fa565b34801561035057600080fd5b506103596108d1565b6040516102fa9190612349565b34801561037257600080fd5b5061038661038136600461235c565b610963565b6040516001600160a01b0390911681526020016102fa565b3480156103aa57600080fd5b506103236103b9366004612375565b6109f8565b3480156103ca57600080fd5b506103236103d936600461235c565b610b0e565b3480156103ea57600080fd5b50610336610b9f565b3480156103ff57600080fd5b50601054610336565b34801561041457600080fd5b5061033660145481565b34801561042a57600080fd5b5061032361043936600461239f565b610bbb565b34801561044a57600080fd5b506017546104599061ffff1681565b60405161ffff90911681526020016102fa565b34801561047857600080fd5b5061032361048736600461235c565b610bec565b34801561049857600080fd5b506104ac6104a73660046123db565b610c1b565b604080516001600160a01b0390931683526020830191909152016102fa565b3480156104d757600080fd5b50600954610336565b3480156104ec57600080fd5b506103236104fb36600461235c565b610cc9565b34801561050c57600080fd5b5061033660165481565b34801561052257600080fd5b5061032361053136600461239f565b610cf8565b34801561054257600080fd5b50610323610551366004612489565b610d13565b34801561056257600080fd5b5061032361057136600461235c565b610d50565b34801561058257600080fd5b5061038661059136600461235c565b610ddc565b3480156105a257600080fd5b506017546104599062010000900461ffff1681565b3480156105c357600080fd5b5061033660155481565b3480156105d957600080fd5b506103366105e83660046124d2565b610e53565b3480156105f957600080fd5b50610323610eda565b34801561060e57600080fd5b50610323610f10565b34801561062357600080fd5b506008546001600160a01b0316610386565b34801561064157600080fd5b506103236106503660046122ae565b610f69565b34801561066157600080fd5b50610323610670366004612489565b610fc2565b34801561068157600080fd5b50610359610fff565b34801561069657600080fd5b5061045961100e565b3480156106ab57600080fd5b506103236106ba3660046124ed565b611035565b3480156106cb57600080fd5b506103236106da36600461235c565b611040565b6103236106ed366004612563565b61106f565b3480156106fe57600080fd5b5061032361070d3660046125a5565b61116c565b610323610720366004612621565b6111a4565b34801561073157600080fd5b5061035961074036600461235c565b6112d7565b34801561075157600080fd5b506103366113b2565b34801561076657600080fd5b506102ee61077536600461267f565b6113bd565b34801561078657600080fd5b50601154610336565b34801561079b57600080fd5b50601454610336565b3480156107b057600080fd5b50600f54610336565b3480156107c557600080fd5b506103236107d436600461235c565b6113d3565b3480156107e557600080fd5b5061035961145e565b3480156107fa57600080fd5b506102ee6108093660046126d2565b61146d565b34801561081a57600080fd5b506103236108293660046124d2565b61149b565b34801561083a57600080fd5b506104596108493660046124d2565b60136020526000908152604090205461ffff1681565b34801561086b57600080fd5b5061032361087a36600461235c565b611533565b600061088a8261156b565b92915050565b6008546001600160a01b031633146108c35760405162461bcd60e51b81526004016108ba90612705565b60405180910390fd5b6108cd82826115ab565b5050565b6060600280546108e09061273a565b80601f016020809104026020016040519081016040528092919081815260200182805461090c9061273a565b80156109595780601f1061092e57610100808354040283529160200191610959565b820191906000526020600020905b81548152906001019060200180831161093c57829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166109dc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ba565b506000908152600660205260409020546001600160a01b031690565b6000610a0382610ddc565b9050806001600160a01b0316836001600160a01b03161415610a715760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108ba565b336001600160a01b0382161480610a8d5750610a8d813361146d565b610aff5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108ba565b610b0983836116a8565b505050565b6008546001600160a01b03163314610b385760405162461bcd60e51b81526004016108ba90612705565b600f548111610b955760405162461bcd60e51b8152602060048201526024808201527f5365742074696d652067726561746572207468616e2067726f7570206f6e652060448201526374696d6560e01b60648201526084016108ba565b6010819055601655565b60006001610bac60125490565b610bb6919061278b565b905090565b610bc53382611716565b610be15760405162461bcd60e51b81526004016108ba906127a2565b610b098383836117e5565b6008546001600160a01b03163314610c165760405162461bcd60e51b81526004016108ba90612705565b600b55565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c905750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610caf906001600160601b0316876127f3565b610cb99190612828565b91519350909150505b9250929050565b6008546001600160a01b03163314610cf35760405162461bcd60e51b81526004016108ba90612705565b600a55565b610b098383836040518060200160405280600081525061116c565b6008546001600160a01b03163314610d3d5760405162461bcd60e51b81526004016108ba90612705565b80516108cd90600c9060208401906121c6565b6008546001600160a01b03163314610d7a5760405162461bcd60e51b81526004016108ba90612705565b6010548111610dd75760405162461bcd60e51b8152602060048201526024808201527f5365742074696d652067726561746572207468616e2067726f75702074776f2060448201526374696d6560e01b60648201526084016108ba565b601155565b6000818152600460205260408120546001600160a01b03168061088a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108ba565b60006001600160a01b038216610ebe5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108ba565b506001600160a01b031660009081526005602052604090205490565b6008546001600160a01b03163314610f045760405162461bcd60e51b81526004016108ba90612705565b610f0e6000611981565b565b6008546001600160a01b03163314610f3a5760405162461bcd60e51b81526004016108ba90612705565b60405133904780156108fc02916000818181858888f19350505050158015610f66573d6000803e3d6000fd5b50565b6008546001600160a01b03163314610f935760405162461bcd60e51b81526004016108ba90612705565b60005b816001600160601b0316811015610b0957610fb0836119d3565b80610fba8161283c565b915050610f96565b6008546001600160a01b03163314610fec5760405162461bcd60e51b81526004016108ba90612705565b80516108cd90600d9060208401906121c6565b6060600380546108e09061273a565b60006016544211611024575060175461ffff1690565b5060175462010000900461ffff1690565b6108cd338383611a8d565b6008546001600160a01b0316331461106a5760405162461bcd60e51b81526004016108ba90612705565b600e55565b60155433903410156110935760405162461bcd60e51b81526004016108ba90612857565b6110d861109f82611b5c565b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9b92505050565b61111b5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016108ba565b611126816001611c27565b6111635760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e48135a5b9d195960921b60448201526064016108ba565b610b09816119d3565b6111763383611716565b6111925760405162461bcd60e51b81526004016108ba906127a2565b61119e84848484611d2b565b50505050565b60155433906111b89061ffff8416906127f3565b3410156111d75760405162461bcd60e51b81526004016108ba90612857565b61121c6111e382611b5c565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9b92505050565b61125f5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016108ba565b6112698183611c27565b6112a65760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e48135a5b9d195960921b60448201526064016108ba565b60005b8261ffff168110156112d0576112be826119d3565b806112c88161283c565b9150506112a9565b5050505050565b6000818152600460205260409020546060906001600160a01b03166113565760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108ba565b6000611360611d5e565b9050600081511161138057604051806020016040528060008152506113ab565b8061138a84611d6d565b60405160200161139b92919061289d565b6040516020818303038152906040525b9392505050565b6000610bb660125490565b60006113cb61109f85611b5c565b949350505050565b6008546001600160a01b031633146113fd5760405162461bcd60e51b81526004016108ba90612705565b600e5481116114595760405162461bcd60e51b815260206004820152602260248201527f5365742074696d652067726561746572207468616e2070726573616c652074696044820152616d6560f01b60648201526084016108ba565b600f55565b6060600d80546108e09061273a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b031633146114c55760405162461bcd60e51b81526004016108ba90612705565b6001600160a01b03811661152a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ba565b610f6681611981565b6008546001600160a01b0316331461155d5760405162461bcd60e51b81526004016108ba90612705565b600955565b80546001019055565b60006001600160e01b031982166380ac58cd60e01b148061159c57506001600160e01b03198216635b5e139f60e01b145b8061088a575061088a82611e6b565b6127106001600160601b03821611156116195760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016108ba565b6001600160a01b03821661166f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108ba565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116dd82610ddc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600460205260408120546001600160a01b031661178f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ba565b600061179a83610ddc565b9050806001600160a01b0316846001600160a01b031614806117d55750836001600160a01b03166117ca84610963565b6001600160a01b0316145b806113cb57506113cb818561146d565b826001600160a01b03166117f882610ddc565b6001600160a01b03161461185c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108ba565b6001600160a01b0382166118be5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108ba565b6118c96000826116a8565b6001600160a01b03831660009081526005602052604081208054600192906118f290849061278b565b90915550506001600160a01b03821660009081526005602052604081208054600192906119209084906128dc565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6014546012541115611a275760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206d696e74206265796f6e6420737570706c79206c696d69740060448201526064016108ba565b611a3981611a3460125490565b611ea0565b611a47601280546001019055565b6001600160a01b0381166000908152601360205260408120805461ffff1691611a6f836128f4565b91906101000a81548161ffff021916908361ffff1602179055505050565b816001600160a01b0316836001600160a01b03161415611aef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108ba565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b6011546000908190819081904290811115611bbd57600194505050505061088a565b601054811115611bd757611bd486600b5489611eba565b91505b600f54811115611bf157611bee86600a5489611eba565b92505b600e54811115611c0b57611c088660095489611eba565b93505b8380611c145750825b80611c1c5750815b979650505050505050565b6001600160a01b03821660009081526013602052604081205460165461ffff909116904211611cb85760175461ffff16611c618483612916565b61ffff161115611cb35760405162461bcd60e51b815260206004820152601d60248201527f417474656d7074696e6720746f206d696e742070617374206c696d697400000060448201526064016108ba565b611d21565b60175462010000900461ffff16611ccf8483612916565b61ffff161115611d215760405162461bcd60e51b815260206004820152601d60248201527f417474656d7074696e6720746f206d696e742070617374206c696d697400000060448201526064016108ba565b5060019392505050565b611d368484846117e5565b611d4284848484611ed0565b61119e5760405162461bcd60e51b81526004016108ba9061293c565b6060600c80546108e09061273a565b606081611d915750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611dbb5780611da58161283c565b9150611db49050600a83612828565b9150611d95565b60008167ffffffffffffffff811115611dd657611dd66123fd565b6040519080825280601f01601f191660200182016040528015611e00576020820181803683370190505b5090505b84156113cb57611e1560018361278b565b9150611e22600a8661298e565b611e2d9060306128dc565b60f81b818381518110611e4257611e426129a2565b60200101906001600160f81b031916908160001a905350611e64600a86612828565b9450611e04565b60006001600160e01b0319821663152a902d60e11b148061088a57506301ffc9a760e01b6001600160e01b031983161461088a565b6108cd828260405180602001604052806000815250611fdd565b600082611ec78584612010565b14949350505050565b60006001600160a01b0384163b15611fd257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f149033908990889088906004016129b8565b602060405180830381600087803b158015611f2e57600080fd5b505af1925050508015611f5e575060408051601f3d908101601f19168201909252611f5b918101906129f5565b60015b611fb8573d808015611f8c576040519150601f19603f3d011682016040523d82523d6000602084013e611f91565b606091505b508051611fb05760405162461bcd60e51b81526004016108ba9061293c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506113cb565b506001949350505050565b611fe78383612084565b611ff46000848484611ed0565b610b095760405162461bcd60e51b81526004016108ba9061293c565b600081815b845181101561207c576000858281518110612032576120326129a2565b602002602001015190508083116120585760008381526020829052604090209250612069565b600081815260208490526040902092505b50806120748161283c565b915050612015565b509392505050565b6001600160a01b0382166120da5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108ba565b6000818152600460205260409020546001600160a01b03161561213f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108ba565b6001600160a01b03821660009081526005602052604081208054600192906121689084906128dc565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546121d29061273a565b90600052602060002090601f0160209004810192826121f4576000855561223a565b82601f1061220d57805160ff191683800117855561223a565b8280016001018555821561223a579182015b8281111561223a57825182559160200191906001019061221f565b5061224692915061224a565b5090565b5b80821115612246576000815560010161224b565b6001600160e01b031981168114610f6657600080fd5b60006020828403121561228757600080fd5b81356113ab8161225f565b80356001600160a01b03811681146122a957600080fd5b919050565b600080604083850312156122c157600080fd5b6122ca83612292565b915060208301356001600160601b03811681146122e657600080fd5b809150509250929050565b60005b8381101561230c5781810151838201526020016122f4565b8381111561119e5750506000910152565b600081518084526123358160208601602086016122f1565b601f01601f19169290920160200192915050565b6020815260006113ab602083018461231d565b60006020828403121561236e57600080fd5b5035919050565b6000806040838503121561238857600080fd5b61239183612292565b946020939093013593505050565b6000806000606084860312156123b457600080fd5b6123bd84612292565b92506123cb60208501612292565b9150604084013590509250925092565b600080604083850312156123ee57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561242e5761242e6123fd565b604051601f8501601f19908116603f01168101908282118183101715612456576124566123fd565b8160405280935085815286868601111561246f57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561249b57600080fd5b813567ffffffffffffffff8111156124b257600080fd5b8201601f810184136124c357600080fd5b6113cb84823560208401612413565b6000602082840312156124e457600080fd5b6113ab82612292565b6000806040838503121561250057600080fd5b61250983612292565b9150602083013580151581146122e657600080fd5b60008083601f84011261253057600080fd5b50813567ffffffffffffffff81111561254857600080fd5b6020830191508360208260051b8501011115610cc257600080fd5b6000806020838503121561257657600080fd5b823567ffffffffffffffff81111561258d57600080fd5b6125998582860161251e565b90969095509350505050565b600080600080608085870312156125bb57600080fd5b6125c485612292565b93506125d260208601612292565b925060408501359150606085013567ffffffffffffffff8111156125f557600080fd5b8501601f8101871361260657600080fd5b61261587823560208401612413565b91505092959194509250565b60008060006040848603121561263657600080fd5b833567ffffffffffffffff81111561264d57600080fd5b6126598682870161251e565b909450925050602084013561ffff8116811461267457600080fd5b809150509250925092565b60008060006040848603121561269457600080fd5b61269d84612292565b9250602084013567ffffffffffffffff8111156126b957600080fd5b6126c58682870161251e565b9497909650939450505050565b600080604083850312156126e557600080fd5b6126ee83612292565b91506126fc60208401612292565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061274e57607f821691505b6020821081141561276f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561279d5761279d612775565b500390565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600081600019048311821515161561280d5761280d612775565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261283757612837612812565b500490565b600060001982141561285057612850612775565b5060010190565b60208082526026908201527f45746865722076616c75652073656e74206c6f776572207468616e206d696e7460408201526520707269636560d01b606082015260800190565b600083516128af8184602088016122f1565b8351908301906128c38183602088016122f1565b64173539b7b760d91b9101908152600501949350505050565b600082198211156128ef576128ef612775565b500190565b600061ffff8083168181141561290c5761290c612775565b6001019392505050565b600061ffff80831681851680830382111561293357612933612775565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261299d5761299d612812565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129eb9083018461231d565b9695505050505050565b600060208284031215612a0757600080fd5b81516113ab8161225f56fea26469706673582212205de9e20bc21d6ca1c606ec2b489bd496abe08284281ff1d380a2f93879592e2f64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0e49689bf1ef6adc40a1954743f3171d586d19d795f5de84757d377633c96cf62839917f2a15ecafd5677df487c43f87484f09671e8a3079e7df95404793c4dccbcf2a8f2d06a2f1b1e7919ba2dce9d2952255591f8af6e60e61a861b414e7b8a000000000000000000000000000000000000000000000000000000000000001a426f6f6b436f696e204d6574616c69627261727920436172647300000000000000000000000000000000000000000000000000000000000000000000000000034d4c430000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): BookCoin Metalibrary Cards
Arg [1] : symbol (string): MLC
Arg [2] : merklerootPreSale (bytes32): 0xe49689bf1ef6adc40a1954743f3171d586d19d795f5de84757d377633c96cf62
Arg [3] : merklerootGroup1 (bytes32): 0x839917f2a15ecafd5677df487c43f87484f09671e8a3079e7df95404793c4dcc
Arg [4] : merklerootGroup2 (bytes32): 0xbcf2a8f2d06a2f1b1e7919ba2dce9d2952255591f8af6e60e61a861b414e7b8a
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : e49689bf1ef6adc40a1954743f3171d586d19d795f5de84757d377633c96cf62
Arg [3] : 839917f2a15ecafd5677df487c43f87484f09671e8a3079e7df95404793c4dcc
Arg [4] : bcf2a8f2d06a2f1b1e7919ba2dce9d2952255591f8af6e60e61a861b414e7b8a
Arg [5] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [6] : 426f6f6b436f696e204d6574616c696272617279204361726473000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 4d4c430000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.