ERC-721
Overview
Max Total Supply
12 BONSAI NFT FARM COLLAB
Holders
11
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 BONSAI NFT FARM COLLABLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Collab
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "./ERC4906.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Collab is ERC4906, ReentrancyGuard, Ownable { using Strings for uint256; //////////////////////////////////////////////////////////////////////////////////// // Constant & variable //////////////////////////////////////////////////////////////////////////////////// uint public rd1Price; uint public pbPrice; uint public rd1StrTime; uint public rd1EndTime; uint public pbStrTime; uint public pbEndTime; uint public revealTime; uint public maxMintCount; string private CID; string private revealCID; bytes32 private rd1MerkleRoot; mapping(address => uint) public mintedCount; address payable public depositAddress; constructor( address payable _depositAddress, string memory _CID, string memory _revealCID, uint _rd1Price, uint _pbPrice, uint _maxMintCount ) ERC4906("BNFC", "BONSAI NFT FARM COLLAB") { depositAddress = _depositAddress; CID = _CID; revealCID = _revealCID; rd1Price = _rd1Price; pbPrice = _pbPrice; maxMintCount = _maxMintCount; } //////////////////////////////////////////////////////////////////////////////////// // User Function //////////////////////////////////////////////////////////////////////////////////// function Mint(bytes32[] calldata _proof, uint _upperLimit, uint _amount) external payable nonReentrant { require((_totalMinted() + _amount) <= maxMintCount, "Beyond Max Supply"); uint price; uint section = GetRoundSection(); if (section == 1) { require(CheckValidityPlusLimit(_proof, rd1MerkleRoot, _upperLimit), "Not on the AllowList1"); require((_amount + mintedCount[msg.sender]) <= _upperLimit, "Cannot mint more than your upper limit"); price = rd1Price * _amount; } else if (section == 3) { price = pbPrice * _amount; } else { require(false, "Not a sale period"); } require(price == msg.value, "Different amounts"); depositAddress.transfer(address(this).balance); unchecked{ mintedCount[msg.sender] += _amount; } _safeMint(msg.sender, _amount); } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), "Not exists"); if (block.timestamp < revealTime) { return string(abi.encodePacked(revealCID)); } return string(abi.encodePacked(CID, Strings.toString(_tokenId), ".json")); } // before:0, round1:1, public:3, after:9 function GetRoundSection() public view returns (uint) { if (block.timestamp < rd1StrTime) { return 0; } else if (rd1StrTime < block.timestamp && block.timestamp < rd1EndTime) { return 1; } else if (pbStrTime < block.timestamp && block.timestamp < pbEndTime) { return 3; } return 9; } function GetMintCount() external view returns (uint) { return _totalMinted(); } function getAllowFlg() external view returns(bool) { return _getAllowFlg(); } //////////////////////////////////////////////////////////////////////////////////// // Owner Function //////////////////////////////////////////////////////////////////////////////////// function OwnerMint(address _toAddress, uint256 _amount) public onlyOwner { _safeMint(_toAddress, _amount); } function BulkMint(address[] calldata _toAddress, uint[] calldata _amount) external onlyOwner { for(uint i = 0; i < _toAddress.length;) { OwnerMint(_toAddress[i], _amount[i]); unchecked{ i++; } } } function SetMaxMintCount(uint256 _amount) external onlyOwner { require(_totalMinted() <= _amount, "mintCount <= _amount"); maxMintCount = _amount; } function SetPrice(uint _rd1Price, uint _pbPrice) external onlyOwner { rd1Price = _rd1Price; pbPrice = _pbPrice; } function SetRoundSection( uint256 _rd1StrTime, uint256 _rd1EndTime, uint256 _pbStrTime, uint256 _pbEndTime) external onlyOwner { rd1StrTime = _rd1StrTime; rd1EndTime = _rd1EndTime; pbStrTime = _pbStrTime; pbEndTime = _pbEndTime; } function SetRevealTime(uint256 _revealTime) external onlyOwner { revealTime = _revealTime; } function SetCID(string calldata _CID, string calldata _revealCID) external onlyOwner { CID = _CID; revealCID = _revealCID; } function SetDepositAddress(address payable _depositAddress) external onlyOwner { depositAddress = _depositAddress; } function SetAllowList(bytes32 _merkleRoot) external onlyOwner { rd1MerkleRoot = _merkleRoot; } function setAllowTime(uint256 _time) external onlyOwner { _setAllowTime(_time); } //////////////////////////////////////////////////////////////////////////////////// // Private Function //////////////////////////////////////////////////////////////////////////////////// function CheckValidityPlusLimit(bytes32[] calldata proof, bytes32 merkleRoot, uint _upperLimit) private view returns (bool) { string memory tmpLeaf = string.concat(Strings.toHexString(uint160(msg.sender)), ',', _upperLimit.toString()); return MerkleProof.verify(proof, merkleRoot, keccak256(abi.encodePacked(tmpLeaf))); } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; import "erc721psi/contracts/ERC721Psi.sol"; import "./IERC4906.sol"; contract ERC4906 is ERC721Psi, IERC4906 { constructor(string memory name_, string memory symbol_) ERC721Psi(name_, symbol_) { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Psi) returns (bool) { return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ 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 Merkle 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 /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| - github: https://github.com/estarriolvetch/ERC721Psi - npm: https://www.npmjs.com/package/erc721psi */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; import "solidity-bits/contracts/BitMaps.sol"; contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _batchHead; string private _name; string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; uint256 private _currentIndex; // Time to allow approve and transfer uint256 public allowTime; mapping(uint256 => address) private _tokenApprovals; 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_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal pure returns (uint256) { // It will become modifiable in the future versions return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { return _currentIndex - _startTokenId(); } /** * @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 (uint) { require(owner != address(0), "ERC721Psi: balance query for the zero address"); uint count; for( uint i = _startTokenId(); i < _nextTokenId(); ++i ){ if(_exists(i)){ if( owner == ownerOf(i)){ ++count; } } } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { (address owner, ) = _ownerAndBatchHeadOf(tokenId); return owner; } function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){ require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token"); tokenIdBatchHead = _getBatchHead(tokenId); owner = _owners[tokenIdBatchHead]; } /** * @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), "ERC721Psi: 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 = ownerOf(tokenId); require(to != owner, "ERC721Psi: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721Psi: 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), "ERC721Psi: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_getAllowFlg(), "ERC721Psi: currently not allowing approve and transfer"); require(operator != _msgSender(), "ERC721Psi: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: 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), "ERC721Psi: 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, 1,_data), "ERC721Psi: 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`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _nextTokenId() && _startTokenId() <= tokenId; } /** * @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), "ERC721Psi: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { uint256 nextTokenId = _nextTokenId(); _mint(to, quantity); require( _checkOnERC721Received(address(0), to, nextTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 nextTokenId = _nextTokenId(); require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, nextTokenId, quantity); _currentIndex += quantity; _owners[nextTokenId] = to; _batchHead.set(nextTokenId); _afterTokenTransfers(address(0), to, nextTokenId, quantity); // Emit events for(uint256 tokenId=nextTokenId; tokenId < nextTokenId + quantity; tokenId++){ emit Transfer(address(0), to, 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 { (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId); require( owner == from, "ERC721Psi: transfer of token that is not own" ); require(to != address(0), "ERC721Psi: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId); uint256 subsequentTokenId = tokenId + 1; if(!_batchHead.get(subsequentTokenId) && subsequentTokenId < _nextTokenId() ) { _owners[subsequentTokenId] = from; _batchHead.set(subsequentTokenId); } _owners[tokenId] = to; if(tokenId != tokenIdBatchHead) { _batchHead.set(tokenId); } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { require(_getAllowFlg(), "ERC721Psi: currently not allowing approve and transfer"); _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param startTokenId uint256 the first ID of the tokens to be transferred * @param quantity uint256 amount of the tokens to be transfered. * @param _data bytes optional data to send along with the call * @return r bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 startTokenId, uint256 quantity, bytes memory _data ) private returns (bool r) { if (to.isContract()) { r = true; for(uint256 tokenId = startTokenId; tokenId < startTokenId + quantity; tokenId++){ try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { r = r && retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Psi: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return r; } else { return true; } } function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) { tokenIdBatchHead = _batchHead.scanForward(tokenId); } function totalSupply() public virtual view returns (uint256) { return _totalMinted(); } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * This function is compatiable with ERC721AQueryable. */ function tokensOfOwner(address owner) external view virtual returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { if (_exists(i)) { if (ownerOf(i) == owner) { tokenIds[tokenIdsIdx++] = i; } } } return tokenIds; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _getAllowFlg() internal view virtual returns(bool) { if (allowTime < block.timestamp) { return true; } return false; } function _setAllowTime(uint256 _time) internal virtual { allowTime = _time; } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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`. * * 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; /** * @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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; import "./BitScan.sol"; /** * @dev This Library is a modified version of Openzeppelin's BitMaps library. * Functions of finding the index of the closest set bit from a given index are added. * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB. * The modification of indexing makes finding the closest previous set bit more efficient in gas usage. */ /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { using BitScan for uint256; uint256 private constant MASK_INDEX_ZERO = (1 << 255); uint256 private constant MASK_FULL = type(uint256).max; struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] &= ~mask; } /** * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`. */ function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex; } else { bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex; amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = MASK_FULL; amount -= 256; bucket++; } bitmap._data[bucket] |= MASK_FULL << (256 - amount); } } } /** * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`. */ function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex); } else { bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = 0; amount -= 256; bucket++; } bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount)); } } } /** * @dev Find the closest index of the set bit before `index`. */ function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) { uint256 bucket = index >> 8; // index within the bucket uint256 bucketIndex = (index & 0xff); // load a bitboard from the bitmap. uint256 bb = bitmap._data[bucket]; // offset the bitboard to scan from `bucketIndex`. bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex) if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256()); } } else { while(true) { require(bucket > 0, "BitMaps: The set bit before the index doesn't exist."); unchecked { bucket--; } // No offset. Always scan from the least significiant bit now. bb = bitmap._data[bucket]; if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256()); break; } } } } } function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) { return bitmap._data[bucket]; } }
// 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 /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; library BitScan { uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff; bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8"; /** @dev Isolate the least significant set bit. */ function isolateLS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { return bb & (0 - bb); } } /** @dev Isolate the most significant set bit. */ function isolateMS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { bb |= bb >> 128; bb |= bb >> 64; bb |= bb >> 32; bb |= bb >> 16; bb |= bb >> 8; bb |= bb >> 4; bb |= bb >> 2; bb |= bb >> 1; return (bb >> 1) + 1; } } /** @dev Find the index of the lest significant set bit. (trailing zero count) */ function bitScanForward256(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]); } } /** @dev Find the index of the most significant set bit. */ function bitScanReverse256(uint256 bb) pure internal returns (uint8) { unchecked { return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]); } } function log2(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]); } } }
{ "optimizer": { "enabled": true, "runs": 10 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_depositAddress","type":"address"},{"internalType":"string","name":"_CID","type":"string"},{"internalType":"string","name":"_revealCID","type":"string"},{"internalType":"uint256","name":"_rd1Price","type":"uint256"},{"internalType":"uint256","name":"_pbPrice","type":"uint256"},{"internalType":"uint256","name":"_maxMintCount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","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":"_toAddress","type":"address[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"BulkMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"GetMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetRoundSection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256","name":"_upperLimit","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"OwnerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"SetAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_CID","type":"string"},{"internalType":"string","name":"_revealCID","type":"string"}],"name":"SetCID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_depositAddress","type":"address"}],"name":"SetDepositAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SetMaxMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rd1Price","type":"uint256"},{"internalType":"uint256","name":"_pbPrice","type":"uint256"}],"name":"SetPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_revealTime","type":"uint256"}],"name":"SetRevealTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rd1StrTime","type":"uint256"},{"internalType":"uint256","name":"_rd1EndTime","type":"uint256"},{"internalType":"uint256","name":"_pbStrTime","type":"uint256"},{"internalType":"uint256","name":"_pbEndTime","type":"uint256"}],"name":"SetRoundSection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowFlg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedCount","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":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pbEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pbPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pbStrTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rd1EndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rd1Price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rd1StrTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealTime","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setAllowTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620030dc380380620030dc83398101604081905262000034916200022a565b60405180604001604052806004815260200163424e464360e01b8152506040518060400160405280601681526020017f424f4e534149204e4654204641524d20434f4c4c414200000000000000000000815250818181600190816200009a91906200035f565b506002620000a982826200035f565b5060016004555050600160085550620000c490503362000113565b601680546001600160a01b0319166001600160a01b0388161790556012620000ed86826200035f565b506013620000fc85826200035f565b50600a92909255600b55601155506200042b915050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200018d57600080fd5b81516001600160401b0380821115620001aa57620001aa62000165565b604051601f8301601f19908116603f01168101908282118183101715620001d557620001d562000165565b81604052838152602092508683858801011115620001f257600080fd5b600091505b83821015620002165785820183015181830184015290820190620001f7565b600093810190920192909252949350505050565b60008060008060008060c087890312156200024457600080fd5b86516001600160a01b03811681146200025c57600080fd5b60208801519096506001600160401b03808211156200027a57600080fd5b620002888a838b016200017b565b965060408901519150808211156200029f57600080fd5b50620002ae89828a016200017b565b945050606087015192506080870151915060a087015190509295509295509295565b600181811c90821680620002e557607f821691505b6020821081036200030657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035a57600081815260208120601f850160051c81016020861015620003355750805b601f850160051c820191505b81811015620003565782815560010162000341565b5050505b505050565b81516001600160401b038111156200037b576200037b62000165565b62000393816200038c8454620002d0565b846200030c565b602080601f831160018114620003cb5760008415620003b25750858301515b600019600386901b1c1916600185901b17855562000356565b600085815260208120601f198616915b82811015620003fc57888601518255948401946001909101908401620003db565b50858210156200041b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612ca1806200043b6000396000f3fe6080604052600436106101ec5760003560e01c806301ffc9a7146101f157806306fdde0314610226578063081812fc14610248578063095ea7b3146102805780630e7a3b88146102a257806318160ddd146102a2578063233eda6b146102c557806323b872dd146102e55780632589bef41461030557806328f833b71461032557806332c60eef1461034557806337f811671461035b57806342842e0e1461036e578063439e8fc41461038e578063470f7039146103a457806362f61747146103ba5780636352211e146103d057806370a08231146103f0578063715018a6146104105780637299c1a31461042557806376dcb19d1461043b5780638462151c1461045b5780638da5cb5b14610488578063937936081461049d57806395d89b41146104b2578063964109d9146104c757806398854c77146104e75780639f2664cb146104fd578063a22cb46514610513578063a5ceeb8b14610533578063b88d4fde14610553578063b9e332cc14610573578063ba829d7114610593578063c87b56dd146105a9578063c89fa936146105c9578063d3c27564146105de578063e985e9c5146105fe578063ed6140b91461061e578063f1e8235b1461063e578063f2fde38b1461065e578063f8b27aa71461067e578063f9317dc314610694578063fddcb5ea146106b4575b600080fd5b3480156101fd57600080fd5b5061021161020c3660046121c6565b6106e1565b60405190151581526020015b60405180910390f35b34801561023257600080fd5b5061023b61070c565b60405161021d9190612233565b34801561025457600080fd5b50610268610263366004612246565b61079e565b6040516001600160a01b03909116815260200161021d565b34801561028c57600080fd5b506102a061029b366004612274565b61082e565b005b3480156102ae57600080fd5b506102b7610943565b60405190815260200161021d565b3480156102d157600080fd5b506102a06102e03660046122a0565b610952565b3480156102f157600080fd5b506102a06103003660046122d2565b610995565b34801561031157600080fd5b506102a061032036600461235b565b6109c6565b34801561033157600080fd5b50601654610268906001600160a01b031681565b34801561035157600080fd5b506102b760115481565b6102a061036936600461240a565b610a17565b34801561037a57600080fd5b506102a06103893660046122d2565b610cb6565b34801561039a57600080fd5b506102b7600d5481565b3480156103b057600080fd5b506102b7600f5481565b3480156103c657600080fd5b506102b7600b5481565b3480156103dc57600080fd5b506102686103eb366004612246565b610cd1565b3480156103fc57600080fd5b506102b761040b36600461245a565b610ce5565b34801561041c57600080fd5b506102a0610db4565b34801561043157600080fd5b506102b7600a5481565b34801561044757600080fd5b506102a0610456366004612274565b610def565b34801561046757600080fd5b5061047b61047636600461245a565b610e2c565b60405161021d9190612477565b34801561049457600080fd5b50610268610ef2565b3480156104a957600080fd5b506102b7610f01565b3480156104be57600080fd5b5061023b610f53565b3480156104d357600080fd5b506102a06104e23660046124bb565b610f62565b3480156104f357600080fd5b506102b7600e5481565b34801561050957600080fd5b506102b7600c5481565b34801561051f57600080fd5b506102a061052e36600461251a565b610fec565b34801561053f57600080fd5b506102a061054e366004612246565b6110d3565b34801561055f57600080fd5b506102a061056e36600461256e565b611107565b34801561057f57600080fd5b506102a061058e366004612246565b61113f565b34801561059f57600080fd5b506102b760105481565b3480156105b557600080fd5b5061023b6105c4366004612246565b61117a565b3480156105d557600080fd5b5061021161120c565b3480156105ea57600080fd5b506102a06105f9366004612246565b611216565b34801561060a57600080fd5b5061021161061936600461264d565b61124a565b34801561062a57600080fd5b506102a061063936600461245a565b611278565b34801561064a57600080fd5b506102a0610659366004612246565b6112c9565b34801561066a57600080fd5b506102a061067936600461245a565b61134b565b34801561068a57600080fd5b506102b760055481565b3480156106a057600080fd5b506102a06106af36600461267b565b6113e8565b3480156106c057600080fd5b506102b76106cf36600461245a565b60156020526000908152604090205481565b60006001600160e01b03198216632483248360e11b1480610706575061070682611422565b92915050565b60606001805461071b9061269d565b80601f01602080910402602001604051908101604052809291908181526020018280546107479061269d565b80156107945780601f1061076957610100808354040283529160200191610794565b820191906000526020600020905b81548152906001019060200180831161077757829003601f168201915b5050505050905090565b60006107a982611472565b6108125760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061083982610cd1565b9050806001600160a01b0316836001600160a01b0316036108a85760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610809565b336001600160a01b03821614806108c457506108c4813361124a565b6109345760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527a081bdddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b602a1b6064820152608401610809565b61093e838361148e565b505050565b600061094d611520565b905090565b3361095b610ef2565b6001600160a01b0316146109815760405162461bcd60e51b8152600401610809906126d7565b600c93909355600d91909155600e55600f55565b61099f3382611531565b6109bb5760405162461bcd60e51b81526004016108099061270c565b61093e8383836115fe565b336109cf610ef2565b6001600160a01b0316146109f55760405162461bcd60e51b8152600401610809906126d7565b6012610a028486836127a6565b506013610a108284836127a6565b5050505050565b600260085403610a695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610809565b600260085560115481610a7a611520565b610a84919061287b565b1115610ac65760405162461bcd60e51b81526020600482015260116024820152704265796f6e64204d617820537570706c7960781b6044820152606401610809565b600080610ad1610f01565b905080600103610bbb57610ae98686601454876117d9565b610b2d5760405162461bcd60e51b81526020600482015260156024820152744e6f74206f6e2074686520416c6c6f774c6973743160581b6044820152606401610809565b336000908152601560205260409020548490610b49908561287b565b1115610ba65760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f74206d696e74206d6f7265207468616e20796f7572207570706572604482015265081b1a5b5a5d60d21b6064820152608401610809565b82600a54610bb4919061288e565b9150610c0d565b80600303610bd15782600b54610bb4919061288e565b60405162461bcd60e51b8152602060048201526011602482015270139bdd0818481cd85b19481c195c9a5bd9607a1b6044820152606401610809565b348214610c505760405162461bcd60e51b8152602060048201526011602482015270446966666572656e7420616d6f756e747360781b6044820152606401610809565b6016546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610c89573d6000803e3d6000fd5b50336000818152601560205260409020805485019055610ca99084611877565b5050600160085550505050565b61093e83838360405180602001604052806000815250611107565b600080610cdd83611891565b509392505050565b60006001600160a01b038216610d535760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610809565b600060015b600454811015610dad57610d6b81611472565b15610d9d57610d7981610cd1565b6001600160a01b0316846001600160a01b031603610d9d57610d9a826128ad565b91505b610da6816128ad565b9050610d58565b5092915050565b33610dbd610ef2565b6001600160a01b031614610de35760405162461bcd60e51b8152600401610809906126d7565b610ded6000611928565b565b33610df8610ef2565b6001600160a01b031614610e1e5760405162461bcd60e51b8152600401610809906126d7565b610e288282611877565b5050565b6060600080610e3a84610ce5565b90506000816001600160401b03811115610e5657610e56612558565b604051908082528060200260200182016040528015610e7f578160200160208202803683370190505b50905060015b828414610ee957610e9581611472565b15610ee157856001600160a01b0316610ead82610cd1565b6001600160a01b031603610ee15780828580600101965081518110610ed457610ed46128c6565b6020026020010181815250505b600101610e85565b50949350505050565b6009546001600160a01b031690565b6000600c54421015610f135750600090565b42600c54108015610f255750600d5442105b15610f305750600190565b42600e54108015610f425750600f5442105b15610f4d5750600390565b50600990565b60606002805461071b9061269d565b33610f6b610ef2565b6001600160a01b031614610f915760405162461bcd60e51b8152600401610809906126d7565b60005b83811015610a1057610fe4858583818110610fb157610fb16128c6565b9050602002016020810190610fc6919061245a565b848484818110610fd857610fd86128c6565b90506020020135610def565b600101610f94565b610ff461197a565b6110105760405162461bcd60e51b8152600401610809906128dc565b336001600160a01b038316036110675760405162461bcd60e51b815260206004820152601c60248201527b22a9219b9918a839b49d1030b8383937bb32903a379031b0b63632b960211b6044820152606401610809565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b336110dc610ef2565b6001600160a01b0316146111025760405162461bcd60e51b8152600401610809906126d7565b601455565b6111113383611531565b61112d5760405162461bcd60e51b81526004016108099061270c565b61113984848484611992565b50505050565b33611148610ef2565b6001600160a01b03161461116e5760405162461bcd60e51b8152600401610809906126d7565b61117781600555565b50565b606061118582611472565b6111be5760405162461bcd60e51b815260206004820152600a6024820152694e6f742065786973747360b01b6044820152606401610809565b6010544210156111f05760136040516020016111da91906129a5565b6040516020818303038152906040529050919050565b60126111fb836119c7565b6040516020016111da9291906129b1565b600061094d61197a565b3361121f610ef2565b6001600160a01b0316146112455760405162461bcd60e51b8152600401610809906126d7565b601055565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b33611281610ef2565b6001600160a01b0316146112a75760405162461bcd60e51b8152600401610809906126d7565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b336112d2610ef2565b6001600160a01b0316146112f85760405162461bcd60e51b8152600401610809906126d7565b80611301611520565b11156113465760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d10dbdd5b9d080f0f4817d85b5bdd5b9d60621b6044820152606401610809565b601155565b33611354610ef2565b6001600160a01b03161461137a5760405162461bcd60e51b8152600401610809906126d7565b6001600160a01b0381166113df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610809565b61117781611928565b336113f1610ef2565b6001600160a01b0316146114175760405162461bcd60e51b8152600401610809906126d7565b600a91909155600b55565b60006001600160e01b031982166380ac58cd60e01b148061145357506001600160e01b03198216635b5e139f60e01b145b8061070657506301ffc9a760e01b6001600160e01b0319831614610706565b600061147d60045490565b821080156107065750506001111590565b61149661197a565b6114b25760405162461bcd60e51b8152600401610809906128dc565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114e782610cd1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600160045461094d91906129e6565b600061153c82611472565b6115a05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610809565b60006115ab83610cd1565b9050806001600160a01b0316846001600160a01b031614806115e65750836001600160a01b03166115db8461079e565b6001600160a01b0316145b806115f657506115f6818561124a565b949350505050565b60008061160a83611891565b91509150846001600160a01b0316826001600160a01b0316146116845760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610809565b6001600160a01b0384166116ea5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610809565b6116f560008461148e565b600061170284600161287b565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015611732575060045481105b1561176857600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556117689082611ac7565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146117a1576117a1600085611ac7565b83856001600160a01b0316876001600160a01b0316600080516020612b4c83398151915260405160405180910390a45b505050505050565b6000806117e533611af3565b6117ee846119c7565b6040516020016117ff9291906129f9565b60408051601f198184030181526020888102808501820190935288845290935061186d92918991899182918501908490808284376000920191909152505060405188925061185291508590602001612a35565b60405160208183030381529060405280519060200120611b4a565b9695505050505050565b610e28828260405180602001604052806000815250611b60565b60008061189d83611472565b6118fe5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610809565b61190783611b85565b6000818152600360205260409020546001600160a01b031694909350915050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600042600554101561198c5750600190565b50600090565b61199d8484846115fe565b6119ab848484600185611b91565b6111395760405162461bcd60e51b815260040161080990612a51565b6060816000036119ee5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a185780611a02816128ad565b9150611a119050600a83612abc565b91506119f2565b6000816001600160401b03811115611a3257611a32612558565b6040519080825280601f01601f191660200182016040528015611a5c576020820181803683370190505b5090505b84156115f657611a716001836129e6565b9150611a7e600a86612ad0565b611a8990603061287b565b60f81b818381518110611a9e57611a9e6128c6565b60200101906001600160f81b031916908160001a905350611ac0600a86612abc565b9450611a60565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b606081600003611b1d5750506040805180820190915260048152630307830360e41b602082015290565b8160005b8115611b405780611b31816128ad565b915050600882901c9150611b21565b6115f68482611cc8565b600082611b578584611e6a565b14949350505050565b6000611b6b60045490565b9050611b778484611ed6565b6119ab600085838686611b91565b60006107068183612036565b60006001600160a01b0385163b15611cbb57506001835b611bb2848661287b565b811015611cb557604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290611beb9033908b9086908990600401612ae4565b6020604051808303816000875af1925050508015611c26575060408051601f3d908101601f19168201909252611c2391810190612b17565b60015b611c83573d808015611c54576040519150601f19603f3d011682016040523d82523d6000602084013e611c59565b606091505b508051600003611c7b5760405162461bcd60e51b815260040161080990612a51565b805181602001fd5b828015611ca057506001600160e01b03198116630a85bd0160e11b145b92505080611cad816128ad565b915050611ba8565b50611cbf565b5060015b95945050505050565b60606000611cd783600261288e565b611ce290600261287b565b6001600160401b03811115611cf957611cf9612558565b6040519080825280601f01601f191660200182016040528015611d23576020820181803683370190505b509050600360fc1b81600081518110611d3e57611d3e6128c6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d6d57611d6d6128c6565b60200101906001600160f81b031916908160001a9053506000611d9184600261288e565b611d9c90600161287b565b90505b6001811115611e14576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611dd057611dd06128c6565b1a60f81b828281518110611de657611de66128c6565b60200101906001600160f81b031916908160001a90535060049490941c93611e0d81612b34565b9050611d9f565b508315611e635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610809565b9392505050565b600081815b8451811015610cdd576000858281518110611e8c57611e8c6128c6565b60200260200101519050808311611eb25760008381526020829052604090209250611ec3565b600081815260208490526040902092505b5080611ece816128ad565b915050611e6f565b6000611ee160045490565b905060008211611f415760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610809565b6001600160a01b038316611fa35760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610809565b8160046000828254611fb5919061287b565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055611feb9082611ac7565b805b611ff7838361287b565b8110156111395760405181906001600160a01b03861690600090600080516020612b4c833981519152908290a48061202e816128ad565b915050611fed565b600881901c60008181526020849052604081205490919060ff808516919082181c8015612078576120668161212e565b60ff168203600884901b179350612125565b600083116120e55760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610809565b5060001990910160008181526020869052604090205490919080156121205761210d8161212e565b60ff0360ff16600884901b179350612125565b612078565b50505092915050565b60006040518061012001604052806101008152602001612b6c610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61217785612198565b02901c8151811061218a5761218a6128c6565b016020015160f81c92915050565b60008082116121a657600080fd5b5060008190031690565b6001600160e01b03198116811461117757600080fd5b6000602082840312156121d857600080fd5b8135611e63816121b0565b60005b838110156121fe5781810151838201526020016121e6565b50506000910152565b6000815180845261221f8160208601602086016121e3565b601f01601f19169290920160200192915050565b602081526000611e636020830184612207565b60006020828403121561225857600080fd5b5035919050565b6001600160a01b038116811461117757600080fd5b6000806040838503121561228757600080fd5b82356122928161225f565b946020939093013593505050565b600080600080608085870312156122b657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000606084860312156122e757600080fd5b83356122f28161225f565b925060208401356123028161225f565b929592945050506040919091013590565b60008083601f84011261232557600080fd5b5081356001600160401b0381111561233c57600080fd5b60208301915083602082850101111561235457600080fd5b9250929050565b6000806000806040858703121561237157600080fd5b84356001600160401b038082111561238857600080fd5b61239488838901612313565b909650945060208701359150808211156123ad57600080fd5b506123ba87828801612313565b95989497509550505050565b60008083601f8401126123d857600080fd5b5081356001600160401b038111156123ef57600080fd5b6020830191508360208260051b850101111561235457600080fd5b6000806000806060858703121561242057600080fd5b84356001600160401b0381111561243657600080fd5b612442878288016123c6565b90989097506020870135966040013595509350505050565b60006020828403121561246c57600080fd5b8135611e638161225f565b6020808252825182820181905260009190848201906040850190845b818110156124af57835183529284019291840191600101612493565b50909695505050505050565b600080600080604085870312156124d157600080fd5b84356001600160401b03808211156124e857600080fd5b6124f4888389016123c6565b9096509450602087013591508082111561250d57600080fd5b506123ba878288016123c6565b6000806040838503121561252d57600080fd5b82356125388161225f565b91506020830135801515811461254d57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561258457600080fd5b843561258f8161225f565b9350602085013561259f8161225f565b92506040850135915060608501356001600160401b03808211156125c257600080fd5b818701915087601f8301126125d657600080fd5b8135818111156125e8576125e8612558565b604051601f8201601f19908116603f0116810190838211818310171561261057612610612558565b816040528281528a602084870101111561262957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561266057600080fd5b823561266b8161225f565b9150602083013561254d8161225f565b6000806040838503121561268e57600080fd5b50508035926020909101359150565b600181811c908216806126b157607f821691505b6020821081036126d157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b601f82111561093e57600081815260208120601f850160051c810160208610156127875750805b601f850160051c820191505b818110156117d157828155600101612793565b6001600160401b038311156127bd576127bd612558565b6127d1836127cb835461269d565b83612760565b6000601f84116001811461280557600085156127ed5750838201355b600019600387901b1c1916600186901b178355610a10565b600083815260209020601f19861690835b828110156128365786850135825560209485019460019092019101612816565b50868210156128535760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070657610706612865565b60008160001904831182151516156128a8576128a8612865565b500290565b6000600182016128bf576128bf612865565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60208082526036908201527f4552433732315073693a2063757272656e746c79206e6f7420616c6c6f77696e604082015275339030b8383937bb329030b732103a3930b739b332b960511b606082015260800190565b6000815461293f8161269d565b60018281168015612957576001811461296c5761299b565b60ff198416875282151583028701945061299b565b8560005260208060002060005b858110156129925781548a820152908401908201612979565b50505082870194505b5050505092915050565b6000611e638284612932565b60006129bd8285612932565b83516129cd8183602088016121e3565b64173539b7b760d91b9101908152600501949350505050565b8181038181111561070657610706612865565b60008351612a0b8184602088016121e3565b600b60fa1b9083019081528351612a298160018401602088016121e3565b01600101949350505050565b60008251612a478184602087016121e3565b9190910192915050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612acb57612acb612aa6565b500490565b600082612adf57612adf612aa6565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061186d90830184612207565b600060208284031215612b2957600080fd5b8151611e63816121b0565b600081612b4357612b43612865565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220d8ecdbb96e516d3fb9cf028d6fbad386046898a5155d5d7270b37cd3897fa1cb64736f6c63430008100033000000000000000000000000a51a5c83f3a412557fc12a168c533401789a30c700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000429d069189e0000000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000036697066733a2f2f787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878782f000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d57586f7135594a62326f45714444394752364e4b53744371696f506e547a55625437367634714142515163560000000000000000000000
Deployed Bytecode
0x6080604052600436106101ec5760003560e01c806301ffc9a7146101f157806306fdde0314610226578063081812fc14610248578063095ea7b3146102805780630e7a3b88146102a257806318160ddd146102a2578063233eda6b146102c557806323b872dd146102e55780632589bef41461030557806328f833b71461032557806332c60eef1461034557806337f811671461035b57806342842e0e1461036e578063439e8fc41461038e578063470f7039146103a457806362f61747146103ba5780636352211e146103d057806370a08231146103f0578063715018a6146104105780637299c1a31461042557806376dcb19d1461043b5780638462151c1461045b5780638da5cb5b14610488578063937936081461049d57806395d89b41146104b2578063964109d9146104c757806398854c77146104e75780639f2664cb146104fd578063a22cb46514610513578063a5ceeb8b14610533578063b88d4fde14610553578063b9e332cc14610573578063ba829d7114610593578063c87b56dd146105a9578063c89fa936146105c9578063d3c27564146105de578063e985e9c5146105fe578063ed6140b91461061e578063f1e8235b1461063e578063f2fde38b1461065e578063f8b27aa71461067e578063f9317dc314610694578063fddcb5ea146106b4575b600080fd5b3480156101fd57600080fd5b5061021161020c3660046121c6565b6106e1565b60405190151581526020015b60405180910390f35b34801561023257600080fd5b5061023b61070c565b60405161021d9190612233565b34801561025457600080fd5b50610268610263366004612246565b61079e565b6040516001600160a01b03909116815260200161021d565b34801561028c57600080fd5b506102a061029b366004612274565b61082e565b005b3480156102ae57600080fd5b506102b7610943565b60405190815260200161021d565b3480156102d157600080fd5b506102a06102e03660046122a0565b610952565b3480156102f157600080fd5b506102a06103003660046122d2565b610995565b34801561031157600080fd5b506102a061032036600461235b565b6109c6565b34801561033157600080fd5b50601654610268906001600160a01b031681565b34801561035157600080fd5b506102b760115481565b6102a061036936600461240a565b610a17565b34801561037a57600080fd5b506102a06103893660046122d2565b610cb6565b34801561039a57600080fd5b506102b7600d5481565b3480156103b057600080fd5b506102b7600f5481565b3480156103c657600080fd5b506102b7600b5481565b3480156103dc57600080fd5b506102686103eb366004612246565b610cd1565b3480156103fc57600080fd5b506102b761040b36600461245a565b610ce5565b34801561041c57600080fd5b506102a0610db4565b34801561043157600080fd5b506102b7600a5481565b34801561044757600080fd5b506102a0610456366004612274565b610def565b34801561046757600080fd5b5061047b61047636600461245a565b610e2c565b60405161021d9190612477565b34801561049457600080fd5b50610268610ef2565b3480156104a957600080fd5b506102b7610f01565b3480156104be57600080fd5b5061023b610f53565b3480156104d357600080fd5b506102a06104e23660046124bb565b610f62565b3480156104f357600080fd5b506102b7600e5481565b34801561050957600080fd5b506102b7600c5481565b34801561051f57600080fd5b506102a061052e36600461251a565b610fec565b34801561053f57600080fd5b506102a061054e366004612246565b6110d3565b34801561055f57600080fd5b506102a061056e36600461256e565b611107565b34801561057f57600080fd5b506102a061058e366004612246565b61113f565b34801561059f57600080fd5b506102b760105481565b3480156105b557600080fd5b5061023b6105c4366004612246565b61117a565b3480156105d557600080fd5b5061021161120c565b3480156105ea57600080fd5b506102a06105f9366004612246565b611216565b34801561060a57600080fd5b5061021161061936600461264d565b61124a565b34801561062a57600080fd5b506102a061063936600461245a565b611278565b34801561064a57600080fd5b506102a0610659366004612246565b6112c9565b34801561066a57600080fd5b506102a061067936600461245a565b61134b565b34801561068a57600080fd5b506102b760055481565b3480156106a057600080fd5b506102a06106af36600461267b565b6113e8565b3480156106c057600080fd5b506102b76106cf36600461245a565b60156020526000908152604090205481565b60006001600160e01b03198216632483248360e11b1480610706575061070682611422565b92915050565b60606001805461071b9061269d565b80601f01602080910402602001604051908101604052809291908181526020018280546107479061269d565b80156107945780601f1061076957610100808354040283529160200191610794565b820191906000526020600020905b81548152906001019060200180831161077757829003601f168201915b5050505050905090565b60006107a982611472565b6108125760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061083982610cd1565b9050806001600160a01b0316836001600160a01b0316036108a85760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610809565b336001600160a01b03821614806108c457506108c4813361124a565b6109345760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527a081bdddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b602a1b6064820152608401610809565b61093e838361148e565b505050565b600061094d611520565b905090565b3361095b610ef2565b6001600160a01b0316146109815760405162461bcd60e51b8152600401610809906126d7565b600c93909355600d91909155600e55600f55565b61099f3382611531565b6109bb5760405162461bcd60e51b81526004016108099061270c565b61093e8383836115fe565b336109cf610ef2565b6001600160a01b0316146109f55760405162461bcd60e51b8152600401610809906126d7565b6012610a028486836127a6565b506013610a108284836127a6565b5050505050565b600260085403610a695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610809565b600260085560115481610a7a611520565b610a84919061287b565b1115610ac65760405162461bcd60e51b81526020600482015260116024820152704265796f6e64204d617820537570706c7960781b6044820152606401610809565b600080610ad1610f01565b905080600103610bbb57610ae98686601454876117d9565b610b2d5760405162461bcd60e51b81526020600482015260156024820152744e6f74206f6e2074686520416c6c6f774c6973743160581b6044820152606401610809565b336000908152601560205260409020548490610b49908561287b565b1115610ba65760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f74206d696e74206d6f7265207468616e20796f7572207570706572604482015265081b1a5b5a5d60d21b6064820152608401610809565b82600a54610bb4919061288e565b9150610c0d565b80600303610bd15782600b54610bb4919061288e565b60405162461bcd60e51b8152602060048201526011602482015270139bdd0818481cd85b19481c195c9a5bd9607a1b6044820152606401610809565b348214610c505760405162461bcd60e51b8152602060048201526011602482015270446966666572656e7420616d6f756e747360781b6044820152606401610809565b6016546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610c89573d6000803e3d6000fd5b50336000818152601560205260409020805485019055610ca99084611877565b5050600160085550505050565b61093e83838360405180602001604052806000815250611107565b600080610cdd83611891565b509392505050565b60006001600160a01b038216610d535760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610809565b600060015b600454811015610dad57610d6b81611472565b15610d9d57610d7981610cd1565b6001600160a01b0316846001600160a01b031603610d9d57610d9a826128ad565b91505b610da6816128ad565b9050610d58565b5092915050565b33610dbd610ef2565b6001600160a01b031614610de35760405162461bcd60e51b8152600401610809906126d7565b610ded6000611928565b565b33610df8610ef2565b6001600160a01b031614610e1e5760405162461bcd60e51b8152600401610809906126d7565b610e288282611877565b5050565b6060600080610e3a84610ce5565b90506000816001600160401b03811115610e5657610e56612558565b604051908082528060200260200182016040528015610e7f578160200160208202803683370190505b50905060015b828414610ee957610e9581611472565b15610ee157856001600160a01b0316610ead82610cd1565b6001600160a01b031603610ee15780828580600101965081518110610ed457610ed46128c6565b6020026020010181815250505b600101610e85565b50949350505050565b6009546001600160a01b031690565b6000600c54421015610f135750600090565b42600c54108015610f255750600d5442105b15610f305750600190565b42600e54108015610f425750600f5442105b15610f4d5750600390565b50600990565b60606002805461071b9061269d565b33610f6b610ef2565b6001600160a01b031614610f915760405162461bcd60e51b8152600401610809906126d7565b60005b83811015610a1057610fe4858583818110610fb157610fb16128c6565b9050602002016020810190610fc6919061245a565b848484818110610fd857610fd86128c6565b90506020020135610def565b600101610f94565b610ff461197a565b6110105760405162461bcd60e51b8152600401610809906128dc565b336001600160a01b038316036110675760405162461bcd60e51b815260206004820152601c60248201527b22a9219b9918a839b49d1030b8383937bb32903a379031b0b63632b960211b6044820152606401610809565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b336110dc610ef2565b6001600160a01b0316146111025760405162461bcd60e51b8152600401610809906126d7565b601455565b6111113383611531565b61112d5760405162461bcd60e51b81526004016108099061270c565b61113984848484611992565b50505050565b33611148610ef2565b6001600160a01b03161461116e5760405162461bcd60e51b8152600401610809906126d7565b61117781600555565b50565b606061118582611472565b6111be5760405162461bcd60e51b815260206004820152600a6024820152694e6f742065786973747360b01b6044820152606401610809565b6010544210156111f05760136040516020016111da91906129a5565b6040516020818303038152906040529050919050565b60126111fb836119c7565b6040516020016111da9291906129b1565b600061094d61197a565b3361121f610ef2565b6001600160a01b0316146112455760405162461bcd60e51b8152600401610809906126d7565b601055565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b33611281610ef2565b6001600160a01b0316146112a75760405162461bcd60e51b8152600401610809906126d7565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b336112d2610ef2565b6001600160a01b0316146112f85760405162461bcd60e51b8152600401610809906126d7565b80611301611520565b11156113465760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d10dbdd5b9d080f0f4817d85b5bdd5b9d60621b6044820152606401610809565b601155565b33611354610ef2565b6001600160a01b03161461137a5760405162461bcd60e51b8152600401610809906126d7565b6001600160a01b0381166113df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610809565b61117781611928565b336113f1610ef2565b6001600160a01b0316146114175760405162461bcd60e51b8152600401610809906126d7565b600a91909155600b55565b60006001600160e01b031982166380ac58cd60e01b148061145357506001600160e01b03198216635b5e139f60e01b145b8061070657506301ffc9a760e01b6001600160e01b0319831614610706565b600061147d60045490565b821080156107065750506001111590565b61149661197a565b6114b25760405162461bcd60e51b8152600401610809906128dc565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114e782610cd1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600160045461094d91906129e6565b600061153c82611472565b6115a05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610809565b60006115ab83610cd1565b9050806001600160a01b0316846001600160a01b031614806115e65750836001600160a01b03166115db8461079e565b6001600160a01b0316145b806115f657506115f6818561124a565b949350505050565b60008061160a83611891565b91509150846001600160a01b0316826001600160a01b0316146116845760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610809565b6001600160a01b0384166116ea5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610809565b6116f560008461148e565b600061170284600161287b565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015611732575060045481105b1561176857600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556117689082611ac7565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146117a1576117a1600085611ac7565b83856001600160a01b0316876001600160a01b0316600080516020612b4c83398151915260405160405180910390a45b505050505050565b6000806117e533611af3565b6117ee846119c7565b6040516020016117ff9291906129f9565b60408051601f198184030181526020888102808501820190935288845290935061186d92918991899182918501908490808284376000920191909152505060405188925061185291508590602001612a35565b60405160208183030381529060405280519060200120611b4a565b9695505050505050565b610e28828260405180602001604052806000815250611b60565b60008061189d83611472565b6118fe5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610809565b61190783611b85565b6000818152600360205260409020546001600160a01b031694909350915050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600042600554101561198c5750600190565b50600090565b61199d8484846115fe565b6119ab848484600185611b91565b6111395760405162461bcd60e51b815260040161080990612a51565b6060816000036119ee5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a185780611a02816128ad565b9150611a119050600a83612abc565b91506119f2565b6000816001600160401b03811115611a3257611a32612558565b6040519080825280601f01601f191660200182016040528015611a5c576020820181803683370190505b5090505b84156115f657611a716001836129e6565b9150611a7e600a86612ad0565b611a8990603061287b565b60f81b818381518110611a9e57611a9e6128c6565b60200101906001600160f81b031916908160001a905350611ac0600a86612abc565b9450611a60565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b606081600003611b1d5750506040805180820190915260048152630307830360e41b602082015290565b8160005b8115611b405780611b31816128ad565b915050600882901c9150611b21565b6115f68482611cc8565b600082611b578584611e6a565b14949350505050565b6000611b6b60045490565b9050611b778484611ed6565b6119ab600085838686611b91565b60006107068183612036565b60006001600160a01b0385163b15611cbb57506001835b611bb2848661287b565b811015611cb557604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290611beb9033908b9086908990600401612ae4565b6020604051808303816000875af1925050508015611c26575060408051601f3d908101601f19168201909252611c2391810190612b17565b60015b611c83573d808015611c54576040519150601f19603f3d011682016040523d82523d6000602084013e611c59565b606091505b508051600003611c7b5760405162461bcd60e51b815260040161080990612a51565b805181602001fd5b828015611ca057506001600160e01b03198116630a85bd0160e11b145b92505080611cad816128ad565b915050611ba8565b50611cbf565b5060015b95945050505050565b60606000611cd783600261288e565b611ce290600261287b565b6001600160401b03811115611cf957611cf9612558565b6040519080825280601f01601f191660200182016040528015611d23576020820181803683370190505b509050600360fc1b81600081518110611d3e57611d3e6128c6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d6d57611d6d6128c6565b60200101906001600160f81b031916908160001a9053506000611d9184600261288e565b611d9c90600161287b565b90505b6001811115611e14576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611dd057611dd06128c6565b1a60f81b828281518110611de657611de66128c6565b60200101906001600160f81b031916908160001a90535060049490941c93611e0d81612b34565b9050611d9f565b508315611e635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610809565b9392505050565b600081815b8451811015610cdd576000858281518110611e8c57611e8c6128c6565b60200260200101519050808311611eb25760008381526020829052604090209250611ec3565b600081815260208490526040902092505b5080611ece816128ad565b915050611e6f565b6000611ee160045490565b905060008211611f415760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610809565b6001600160a01b038316611fa35760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610809565b8160046000828254611fb5919061287b565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055611feb9082611ac7565b805b611ff7838361287b565b8110156111395760405181906001600160a01b03861690600090600080516020612b4c833981519152908290a48061202e816128ad565b915050611fed565b600881901c60008181526020849052604081205490919060ff808516919082181c8015612078576120668161212e565b60ff168203600884901b179350612125565b600083116120e55760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610809565b5060001990910160008181526020869052604090205490919080156121205761210d8161212e565b60ff0360ff16600884901b179350612125565b612078565b50505092915050565b60006040518061012001604052806101008152602001612b6c610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61217785612198565b02901c8151811061218a5761218a6128c6565b016020015160f81c92915050565b60008082116121a657600080fd5b5060008190031690565b6001600160e01b03198116811461117757600080fd5b6000602082840312156121d857600080fd5b8135611e63816121b0565b60005b838110156121fe5781810151838201526020016121e6565b50506000910152565b6000815180845261221f8160208601602086016121e3565b601f01601f19169290920160200192915050565b602081526000611e636020830184612207565b60006020828403121561225857600080fd5b5035919050565b6001600160a01b038116811461117757600080fd5b6000806040838503121561228757600080fd5b82356122928161225f565b946020939093013593505050565b600080600080608085870312156122b657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000606084860312156122e757600080fd5b83356122f28161225f565b925060208401356123028161225f565b929592945050506040919091013590565b60008083601f84011261232557600080fd5b5081356001600160401b0381111561233c57600080fd5b60208301915083602082850101111561235457600080fd5b9250929050565b6000806000806040858703121561237157600080fd5b84356001600160401b038082111561238857600080fd5b61239488838901612313565b909650945060208701359150808211156123ad57600080fd5b506123ba87828801612313565b95989497509550505050565b60008083601f8401126123d857600080fd5b5081356001600160401b038111156123ef57600080fd5b6020830191508360208260051b850101111561235457600080fd5b6000806000806060858703121561242057600080fd5b84356001600160401b0381111561243657600080fd5b612442878288016123c6565b90989097506020870135966040013595509350505050565b60006020828403121561246c57600080fd5b8135611e638161225f565b6020808252825182820181905260009190848201906040850190845b818110156124af57835183529284019291840191600101612493565b50909695505050505050565b600080600080604085870312156124d157600080fd5b84356001600160401b03808211156124e857600080fd5b6124f4888389016123c6565b9096509450602087013591508082111561250d57600080fd5b506123ba878288016123c6565b6000806040838503121561252d57600080fd5b82356125388161225f565b91506020830135801515811461254d57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561258457600080fd5b843561258f8161225f565b9350602085013561259f8161225f565b92506040850135915060608501356001600160401b03808211156125c257600080fd5b818701915087601f8301126125d657600080fd5b8135818111156125e8576125e8612558565b604051601f8201601f19908116603f0116810190838211818310171561261057612610612558565b816040528281528a602084870101111561262957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561266057600080fd5b823561266b8161225f565b9150602083013561254d8161225f565b6000806040838503121561268e57600080fd5b50508035926020909101359150565b600181811c908216806126b157607f821691505b6020821081036126d157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b601f82111561093e57600081815260208120601f850160051c810160208610156127875750805b601f850160051c820191505b818110156117d157828155600101612793565b6001600160401b038311156127bd576127bd612558565b6127d1836127cb835461269d565b83612760565b6000601f84116001811461280557600085156127ed5750838201355b600019600387901b1c1916600186901b178355610a10565b600083815260209020601f19861690835b828110156128365786850135825560209485019460019092019101612816565b50868210156128535760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070657610706612865565b60008160001904831182151516156128a8576128a8612865565b500290565b6000600182016128bf576128bf612865565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60208082526036908201527f4552433732315073693a2063757272656e746c79206e6f7420616c6c6f77696e604082015275339030b8383937bb329030b732103a3930b739b332b960511b606082015260800190565b6000815461293f8161269d565b60018281168015612957576001811461296c5761299b565b60ff198416875282151583028701945061299b565b8560005260208060002060005b858110156129925781548a820152908401908201612979565b50505082870194505b5050505092915050565b6000611e638284612932565b60006129bd8285612932565b83516129cd8183602088016121e3565b64173539b7b760d91b9101908152600501949350505050565b8181038181111561070657610706612865565b60008351612a0b8184602088016121e3565b600b60fa1b9083019081528351612a298160018401602088016121e3565b01600101949350505050565b60008251612a478184602087016121e3565b9190910192915050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612acb57612acb612aa6565b500490565b600082612adf57612adf612aa6565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061186d90830184612207565b600060208284031215612b2957600080fd5b8151611e63816121b0565b600081612b4357612b43612865565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220d8ecdbb96e516d3fb9cf028d6fbad386046898a5155d5d7270b37cd3897fa1cb64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a51a5c83f3a412557fc12a168c533401789a30c700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000429d069189e0000000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000036697066733a2f2f787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878782f000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d57586f7135594a62326f45714444394752364e4b53744371696f506e547a55625437367634714142515163560000000000000000000000
-----Decoded View---------------
Arg [0] : _depositAddress (address): 0xa51A5C83F3a412557fc12a168C533401789a30c7
Arg [1] : _CID (string): ipfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Arg [2] : _revealCID (string): ipfs://QmWXoq5YJb2oEqDD9GR6NKStCqioPnTzUbT76v4qABQQcV
Arg [3] : _rd1Price (uint256): 300000000000000000
Arg [4] : _pbPrice (uint256): 300000000000000000
Arg [5] : _maxMintCount (uint256): 30
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000a51a5c83f3a412557fc12a168c533401789a30c7
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [4] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [5] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [7] : 697066733a2f2f78787878787878787878787878787878787878787878787878
Arg [8] : 7878787878787878787878787878787878787878782f00000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [10] : 697066733a2f2f516d57586f7135594a62326f45714444394752364e4b537443
Arg [11] : 71696f506e547a55625437367634714142515163560000000000000000000000
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.