ERC-721
Overview
Max Total Supply
5,555 GRG
Holders
771
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 GRGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
APPGRG
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@manifoldxyz/royalty-registry-solidity/contracts/overrides/RoyaltyOverrideCore.sol"; import "./interface/ITokenURI.sol"; import "./interface/IContractAllowListProxy.sol"; abstract contract APPGRGcore is Ownable{ ITokenURI public tokenuri; // Upgradable FullOnChain IContractAllowListProxy public cal; address public constant WITHDRAW_ADDRESS = 0xD416442dC3D81A0E58010941acFFeBEB51d76336; uint256 public constant MAX_SUPPLY = 5555; uint256 public cost = 0.002 ether; string public baseURI; string public baseExtension = ".json"; bytes32 public merkleRoot; bool public pause = true; bool public isPublicSale; // default:false uint256 public calLevel = 1; mapping(address => uint256) public mintedCount; } abstract contract APPGRGadmin is APPGRGcore,ERC721A,EIP2981RoyaltyOverrideCore{ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, EIP2981RoyaltyOverrideCore) returns (bool) { return ERC721A.supportsInterface(interfaceId) || EIP2981RoyaltyOverrideCore.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } // onlyOwner function setCost(uint256 _value) external onlyOwner { cost = _value; } function setBaseURI(string memory _newBaseURI) external onlyOwner { baseURI = _newBaseURI; } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { baseExtension = _newBaseExtension; } function setPause(bool _pause) external onlyOwner { pause = _pause; } function setPublicSale(bool _isPublicSale) external onlyOwner { isPublicSale = _isPublicSale; } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; } function withdraw() external onlyOwner { (bool os, ) = payable(WITHDRAW_ADDRESS).call{value: address(this).balance}(""); require(os); } function setTokenURI(ITokenURI _tokenuri) external onlyOwner{ tokenuri = _tokenuri; } function setCalContract(IContractAllowListProxy _cal) external onlyOwner{ cal = _cal; } function setCalLevel(uint256 _value) external onlyOwner{ calLevel = _value; } // EIP2981RoyaltyOverrideCore function setTokenRoyalties(TokenRoyaltyConfig[] calldata royaltyConfigs) external override onlyOwner{ _setTokenRoyalties(royaltyConfigs); } function setDefaultRoyalty(TokenRoyalty calldata royalty) external override onlyOwner { _setDefaultRoyalty(royalty); } function admin_mint(address[] calldata _airdropAddresses , uint256[] memory _UserMintAmount) external onlyOwner{ uint256 _mintAmount = 0; for (uint256 i = 0; i < _UserMintAmount.length; i++) { _mintAmount += _UserMintAmount[i]; } require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount + totalSupply() <= MAX_SUPPLY, "claim is over the max supply"); require(_airdropAddresses.length == _UserMintAmount.length, "array length unmuch"); for (uint256 i = 0; i < _UserMintAmount.length; i++) { _safeMint(_airdropAddresses[i], _UserMintAmount[i] ); } } } contract APPGRG is APPGRGadmin{ constructor() ERC721A('APP-GRG', 'GRG') { // default royalty set _setDefaultRoyalty( IEIP2981RoyaltyOverride.TokenRoyalty({bps: 1000, recipient: WITHDRAW_ADDRESS}) ); _safeMint(WITHDRAW_ADDRESS, 555); baseURI = "https://data.appgrg.com/grg/metadata/"; cal = IContractAllowListProxy(0xdbaa28cBe70aF04EbFB166b1A3E8F8034e5B9FC7); // mainnet // cal = IContractAllowListProxy(0xb506d7BbE23576b8AAf22477cd9A7FDF08002211); // goerli } // overrides function setApprovalForAll(address operator, bool approved) public virtual override(ERC721A){ if(address(cal) != address(0)){ require(cal.isAllowed(operator,calLevel) == true,"address no list"); } super.setApprovalForAll(operator,approved); } function approve(address to, uint256 tokenId) payable public virtual override(ERC721A){ if(address(cal) != address(0)){ require(cal.isAllowed(to,calLevel) == true,"address no list"); } super.approve(to, tokenId); } // internal function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } // public function tokenURI(uint256 tokenId) public view virtual override(ERC721A) returns (string memory){ if(address(tokenuri) == address(0)) { return string(abi.encodePacked(ERC721A.tokenURI(tokenId), baseExtension)); }else{ // Full-on chain support return tokenuri.tokenURI_future(tokenId); } } function getAlRemain(address _address,uint256 _amountMax,bytes32[] calldata _merkleProof) public view returns (uint256) { uint256 _Amount = 0; if(pause == false && isVerify(_address,_amountMax,_merkleProof) == true){ _Amount = _amountMax - mintedCount[_address]; } return _Amount; } function isVerify(address _address,uint256 _amountMax,bytes32[] calldata _merkleProof) public view returns (bool) { bool _exit = false; if(MerkleProof.verifyCalldata(_merkleProof, merkleRoot, keccak256(abi.encodePacked(_address,uint248(_amountMax)))) == true){ _exit = true; } return _exit; } // external function mint(uint256 _mintAmount,uint256 _amountMax,bytes32[] calldata _merkleProof) external payable { require(pause == false,"sale is not active"); require(tx.origin == msg.sender,"the caller is another controler"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount + totalSupply() <= MAX_SUPPLY, "claim is over the max supply"); require(msg.value >= cost * _mintAmount, "not enough eth"); if(isPublicSale == false){ require(_mintAmount <= getAlRemain(msg.sender,_amountMax,_merkleProof), "claim is over max amount"); mintedCount[msg.sender] += _mintAmount; } _safeMint(msg.sender, _mintAmount); } function mintReserve(uint256 _mintAmount,address _address,uint256 _amountMax,bytes32[] calldata _merkleProof) external payable { require(pause == false,"sale is not active"); require(tx.origin == msg.sender,"the caller is another controler"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount + totalSupply() <= MAX_SUPPLY, "claim is over the max supply"); require(msg.value >= cost * _mintAmount, "not enough eth"); if(isPublicSale == false){ require(_mintAmount <= getAlRemain(_address,_amountMax,_merkleProof), "claim is over max amount"); mintedCount[_address] += _mintAmount; } _safeMint(_address, _mintAmount); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.7.0 <0.9.0; interface ITokenURI{ function tokenURI_future(uint256 _tokenId) external view returns(string memory); function tokenURI_future(uint256 _tokenId,bool _locked) external view returns(string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; interface IContractAllowListProxy { function isAllowed(address _transferer, uint256 _level) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree 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 Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(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++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./IRoyaltyOverride.sol"; import "../specs/IEIP2981.sol"; /** * Simple EIP2981 reference override implementation */ abstract contract EIP2981RoyaltyOverrideCore is IEIP2981, IEIP2981RoyaltyOverride, ERC165 { using EnumerableSet for EnumerableSet.UintSet; TokenRoyalty public defaultRoyalty; mapping(uint256 => TokenRoyalty) private _tokenRoyalties; EnumerableSet.UintSet private _tokensWithRoyalties; function supportsInterface(bytes4 interfaceId) public view virtual override (ERC165, IERC165) returns (bool) { return interfaceId == type(IEIP2981).interfaceId || interfaceId == type(IEIP2981RoyaltyOverride).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Sets token royalties. When you override this in the implementation contract * ensure that you access restrict it to the contract owner or admin */ function _setTokenRoyalties(TokenRoyaltyConfig[] memory royaltyConfigs) internal { for (uint256 i = 0; i < royaltyConfigs.length; i++) { TokenRoyaltyConfig memory royaltyConfig = royaltyConfigs[i]; require(royaltyConfig.bps < 10000, "Invalid bps"); if (royaltyConfig.recipient == address(0)) { delete _tokenRoyalties[royaltyConfig.tokenId]; _tokensWithRoyalties.remove(royaltyConfig.tokenId); emit TokenRoyaltyRemoved(royaltyConfig.tokenId); } else { _tokenRoyalties[royaltyConfig.tokenId] = TokenRoyalty(royaltyConfig.recipient, royaltyConfig.bps); _tokensWithRoyalties.add(royaltyConfig.tokenId); emit TokenRoyaltySet(royaltyConfig.tokenId, royaltyConfig.recipient, royaltyConfig.bps); } } } /** * @dev Sets default royalty. When you override this in the implementation contract * ensure that you access restrict it to the contract owner or admin */ function _setDefaultRoyalty(TokenRoyalty memory royalty) internal { require(royalty.bps < 10000, "Invalid bps"); defaultRoyalty = TokenRoyalty(royalty.recipient, royalty.bps); emit DefaultRoyaltySet(royalty.recipient, royalty.bps); } /** * @dev See {IEIP2981RoyaltyOverride-getTokenRoyaltiesCount}. */ function getTokenRoyaltiesCount() external view override returns (uint256) { return _tokensWithRoyalties.length(); } /** * @dev See {IEIP2981RoyaltyOverride-getTokenRoyaltyByIndex}. */ function getTokenRoyaltyByIndex(uint256 index) external view override returns (TokenRoyaltyConfig memory) { uint256 tokenId = _tokensWithRoyalties.at(index); TokenRoyalty memory royalty = _tokenRoyalties[tokenId]; return TokenRoyaltyConfig(tokenId, royalty.recipient, royalty.bps); } /** * @dev See {IEIP2981RoyaltyOverride-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 value) public view override returns (address, uint256) { if (_tokenRoyalties[tokenId].recipient != address(0)) { return (_tokenRoyalties[tokenId].recipient, value * _tokenRoyalties[tokenId].bps / 10000); } if (defaultRoyalty.recipient != address(0) && defaultRoyalty.bps != 0) { return (defaultRoyalty.recipient, value * defaultRoyalty.bps / 10000); } return (address(0), 0); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` 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 payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * Simple EIP2981 reference override implementation */ interface IEIP2981RoyaltyOverride is IERC165 { event TokenRoyaltyRemoved(uint256 tokenId); event TokenRoyaltySet(uint256 tokenId, address recipient, uint16 bps); event DefaultRoyaltySet(address recipient, uint16 bps); struct TokenRoyalty { address recipient; uint16 bps; } struct TokenRoyaltyConfig { uint256 tokenId; address recipient; uint16 bps; } /** * @dev Set per token royalties. Passing a recipient of address(0) will delete any existing configuration */ function setTokenRoyalties(TokenRoyaltyConfig[] calldata royalties) external; /** * @dev Get the number of token specific overrides. Used to enumerate over all configurations */ function getTokenRoyaltiesCount() external view returns (uint256); /** * @dev Get a token royalty configuration by index. Use in conjunction with getTokenRoyaltiesCount to get all per token configurations */ function getTokenRoyaltyByIndex(uint256 index) external view returns (TokenRoyaltyConfig memory); /** * @dev Set a default royalty configuration. Will be used if no token specific configuration is set */ function setDefaultRoyalty(TokenRoyalty calldata royalty) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * EIP-2981 */ interface IEIP2981 { /** * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a * * => 0x2a55205a = 0x2a55205a */ function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256); }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint16","name":"bps","type":"uint16"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenRoyaltyRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint16","name":"bps","type":"uint16"}],"name":"TokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_UserMintAmount","type":"uint256[]"}],"name":"admin_mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cal","outputs":[{"internalType":"contract IContractAllowListProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyalty","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amountMax","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"getAlRemain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenRoyaltiesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getTokenRoyaltyByIndex","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyaltyConfig","name":"","type":"tuple"}],"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":"isPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amountMax","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"isVerify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256","name":"_amountMax","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amountMax","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintReserve","outputs":[],"stateMutability":"payable","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":"pause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IContractAllowListProxy","name":"_cal","type":"address"}],"name":"setCalContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setCalLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyalty","name":"royalty","type":"tuple"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPublicSale","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyaltyConfig[]","name":"royaltyConfigs","type":"tuple[]"}],"name":"setTokenRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITokenURI","name":"_tokenuri","type":"address"}],"name":"setTokenURI","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":[],"name":"tokenuri","outputs":[{"internalType":"contract ITokenURI","name":"","type":"address"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523462000170576200001560c0604052565b6007608052664150502d47524760c81b60a052620000e86040516200003a816200018c565b600381526247524760e81b602082015260008054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a366071afd498d0000600355620000b1620000ab60055462000208565b6200025e565b600a64173539b7b760d91b01600555600160ff196007541617600755620000d86001600855565b620000e262000403565b62000509565b620000f36001600a55565b6200012662000101620001f7565b73d416442dc3d81a0e58010941acffebeb51d7633681526103e860208201526200060d565b6200013062000730565b6200013a62000311565b600280546001600160a01b03191673dbaa28cbe70af04ebfb166b1a3e8f8034e5b9fc7179055604051612fda908162000a1e8239f35b600080fd5b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b03821117620001a857604052565b620001b262000175565b604052565b602081019081106001600160401b03821117620001a857604052565b601f909101601f19168101906001600160401b03821190821017620001a857604052565b6040519062000206826200018c565b565b90600182811c921680156200023a575b60208310146200022457565b634e487b7160e01b600052602260045260246000fd5b91607f169162000218565b81811062000251575050565b6000815560010162000245565b601f81116200026a5750565b62000206906005600052601f6020600020910160051c81019062000245565b90601f821162000297575050565b6200020691600c6000526020600020906020601f840160051c83019310620002c8575b601f0160051c019062000245565b9091508190620002ba565b90601f8211620002e1575050565b6200020691600d6000526020600020906020601f840160051c83019310620002c857601f0160051c019062000245565b6200031e60045462000208565b601f8111620003a3575b50604b60049081556000527f68747470733a2f2f646174612e6170706772672e636f6d2f6772672f6d6574617f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5564646174612f60d81b7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c55565b6004600052620003fc90601f0160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b017f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d62000245565b3862000328565b608080519091906001600160401b038111620004f9575b62000432816200042c600c5462000208565b62000289565b602080601f831160011462000471575081929360009262000465575b50508160011b916000199060031b1c191617600c55565b0151905038806200044e565b600c600052601f198316949091907fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7926000905b878210620004e0575050836001959610620004c6575b505050811b01600c55565b015160001960f88460031b161c19169055388080620004bb565b80600185968294968601518155019501930190620004a5565b6200050362000175565b6200041a565b80519091906001600160401b038111620005fd575b620005368162000530600d5462000208565b620002d3565b602080601f831160011462000575575081929360009262000569575b50508160011b916000199060031b1c191617600d55565b01519050388062000552565b600d600052601f198316949091907fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5926000905b878210620005e4575050836001959610620005ca575b505050811b01600d55565b015160001960f88460031b161c19169055388080620005bf565b80600185968294968601518155019501930190620005a9565b6200060762000175565b6200051e565b6020810161271061ffff8251161015620006fd5781517f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe4192620006db91620006d29190620006c5906001600160a01b0316620006976200066f875161ffff1690565b6200068c6200067d620001f7565b6001600160a01b039094168452565b61ffff166020830152565b60018060a01b0381511660125491602061ffff60a01b91015160a01b169160018060b01b0319161717601255565b516001600160a01b031690565b915161ffff1690565b604080516001600160a01b0393909316835261ffff91909116602083015290a1565b60405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642062707360a81b6044820152606490fd5b604080516200073f81620001b7565b6000808252600a547fc926726b1619ab2790ab50aad90d0a949f0ff10e7a52b6fee48a43f2084f6c3d805469022b000000000000022b019055808252600e6020526040822091939092909173d416442dc3d81a0e58010941acffebeb51d76336904260a01b8217905561022b84017fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858388838180a46001808097015b8381036200087057505050600a553b620007f7575b50505050565b600a549261022a1984019080805b62000825575b5050505050600a54036200082257808080620007f1565b80fd5b1562000861575b85620008446200084085848601956200095d565b1590565b62000850578162000805565b84516368d2bf6b60e11b8152600490fd5b8482106200082c57806200080b565b80858a858180a4018690620007dc565b908160209103126200017057516001600160e01b031981168103620001705790565b9193929060018060a01b0316825260209360008584015260408301526080606083015280519081608084015260005b828110620008f457505060a09293506000838284010152601f8019910116010190565b81810186015184820160a001528501620008d1565b3d1562000958573d906001600160401b03821162000948575b604051916200093c601f8201601f191660200184620001d3565b82523d6000602084013e565b6200095262000175565b62000922565b606090565b906020620009839160405180938192630a85bd0160e11b968784523360048501620008a2565b0381600073d416442dc3d81a0e58010941acffebeb51d763365af160009181620009e6575b50620009d857620009b862000909565b80519081620009d3576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b62000a0d91925060203d811162000a15575b62000a048183620001d3565b81019062000880565b9038620009a8565b503d620009f856fe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a7146103fb5780630653aca5146103f257806306fdde03146103e9578063081812fc146103e0578063095ea7b3146103d7578063122e04a8146103ce57806313faede6146103c557806318160ddd146103bc57806323b872dd146103b35780632a55205a146103aa5780632eb4a7ab146103a157806332cb6b0c1461039857806339940b4a1461038f5780633ccfd60b1461038657806342842e0e1461037d57806344a0d68a146103745780635136dcc71461036b57806355f804b3146103625780635aca1bb614610359578063614b655c146103505780636352211e14610347578063655191821461033e5780636a98de4c146103355780636c0360eb1461032c57806370a0823114610323578063715018a61461031a5780637885fdc7146103115780637cb64759146103085780637e980342146102ff5780638456cb59146102f65780638da5cb5b146102ed57806395d89b41146102e4578063a22cb465146102db578063a3b10ac8146102d2578063a5a865dc146102c9578063b3a06630146102c0578063b7c738f4146102b7578063b88d4fde146102ae578063bedb86fb146102a5578063c0c2e0a31461029c578063c668286214610293578063c87b56dd1461028a578063cc835a8814610281578063da3ef23f14610278578063e6d37b881461026f578063e985e9c514610266578063ef60ceaf1461025d578063f2fde38b14610254578063fddcb5ea1461024b5763fe9ba2fb1461024357600080fd5b61000e611afe565b5061000e611ac0565b5061000e6119f8565b5061000e6118da565b5061000e611871565b5061000e61179d565b5061000e6116a2565b5061000e611683565b5061000e61164f565b5061000e6115b9565b5061000e611571565b5061000e611536565b5061000e6114d3565b5061000e6114a9565b5061000e611402565b5061000e6113b5565b5061000e611398565b5061000e6112fb565b5061000e611253565b5061000e611229565b5061000e611205565b5061000e6111e6565b5061000e6111c4565b5061000e61118d565b5061000e611131565b5061000e6110d1565b5061000e61103b565b5061000e610f2d565b5061000e610e35565b5061000e610e05565b5061000e610dde565b5061000e610d2d565b5061000e610c28565b5061000e610a09565b5061000e6109e7565b5061000e6109c3565b5061000e61097b565b5061000e610959565b5061000e61093b565b5061000e61091c565b5061000e6108df565b5061000e6108cc565b5061000e610877565b5061000e610858565b5061000e610828565b5061000e61073b565b5061000e6106d5565b5061000e6105f3565b5061000e6104b8565b5061000e610416565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e57602060043561043681610404565b6001600160e01b031981166301ffc9a760e01b8114919082156104a7575b8215610496575b508115610485575b8115610475575b506040519015158152f35b61047f9150611cec565b3861046a565b905061049081611cec565b90610463565b635b5e139f60e01b1491503861045b565b6380ac58cd60e01b81149250610454565b503461000e57602036600319011261000e57610593604060008180516104dd81610af1565b82815282602082015201526104f3600435611ca7565b90549060031b1c9081600052601360205261056060206105568360002084519061051c82610b19565b546001600160a01b03811680835260a09190911c61ffff1693909101839052610543610b70565b9586526001600160a01b03166020860152565b61ffff1683830152565b51815181526020808301516001600160a01b03169082015260409182015161ffff16918101919091529081906060820190565b0390f35b60005b8381106105aa5750506000910152565b818101518382015260200161059a565b906020916105d381518092818552858086019101610597565b601f01601f1916010190565b9060206105f09281815201906105ba565b90565b503461000e576000806003193601126106d2576040519080600c5461061781610f57565b808552916001918083169081156106a8575060011461064d575b6105938561064181870382610b4f565b604051918291826105df565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b82841061069057505050810160200161064182610593610631565b80546020858701810191909152909301928101610675565b8695506105939693506020925061064194915060ff191682840152151560051b8201019293610631565b80fd5b503461000e57602036600319011261000e576004356106f381612a74565b15610718576000526010602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b6001600160a01b0381160361000e57565b50604036600319011261000e5761078d6004356107578161072a565b600254610774906001600160a01b03165b6001600160a01b031690565b6001600160a01b03811661078f575b506024359061296a565b005b600854604051630f8350ed60e41b81526001600160a01b038416600482015260248101919091526107e7916001919060209082908180604481015b03915afa90811561081b575b6000916107ed575b50151514612441565b38610783565b61080e915060203d8111610814575b6108068183610b4f565b81019061241f565b386107de565b503d6107fc565b610823612434565b6107d6565b503461000e57600036600319011261000e57602060405173d416442dc3d81a0e58010941acffebeb51d763368152f35b503461000e57600036600319011261000e576020600354604051908152f35b503461000e57600036600319011261000e57600a54600b5460209103600019015b604051908152f35b606090600319011261000e576004356108b88161072a565b906024356108c58161072a565b9060443590565b5061078d6108d9366108a0565b91612aaf565b503461000e57604036600319011261000e576108ff602435600435611b78565b604080516001600160a01b03939093168352602083019190915290f35b503461000e57600036600319011261000e576020600654604051908152f35b503461000e57600036600319011261000e5760206040516115b38152f35b503461000e57602036600319011261000e57610973611c38565b600435600855005b503461000e576000806003193601126106d257610996611c38565b808080804773d416442dc3d81a0e58010941acffebeb51d763365af16109ba611dee565b50156106d25780f35b5061078d6109d0366108a0565b90604051926109de84610b34565b60008452612c81565b503461000e57602036600319011261000e57610a01611c38565b600435600355005b503461000e5760208060031936011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e5760609260248484028301019136831161000e57610a60611c38565b610a69846113dc565b93604090610a7982519687610b4f565b855260248386019201915b848310610a945761078d86611eb6565b868336031261000e578387918351610aab81610af1565b8535815282860135610abc8161072a565b83820152610acb858701611e2f565b85820152815201920191610a84565b50634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b03821117610b0c57604052565b610b14610ada565b604052565b604081019081106001600160401b03821117610b0c57604052565b602081019081106001600160401b03821117610b0c57604052565b90601f801991011681019081106001600160401b03821117610b0c57604052565b60405190610b7d82610af1565b565b60405190610b7d82610b19565b6020906001600160401b038111610ba9575b601f01601f19160190565b610bb1610ada565b610b9e565b929192610bc282610b8c565b91610bd06040519384610b4f565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e57600435906001600160401b03821161000e578060238301121561000e578160246105f093600401359101610bb6565b503461000e57610c3736610bed565b610c3f611c38565b80516001600160401b038111610d16575b610c6481610c5f600454610f57565b611d30565b602080601f8311600114610ca157508192600092610c96575b5050600019600383901b1c191660019190911b17600455005b015190503880610c7d565b90601f19831693610cc26004600052600080516020612f8583398151915290565b926000905b868210610cfe5750508360019510610ce5575b505050811b01600455005b015160001960f88460031b161c19169055388080610cda565b80600185968294968601518155019501930190610cc7565b610d1e610ada565b610c50565b8015150361000e57565b503461000e57602036600319011261000e57600435610d4b81610d23565b610d53611c38565b61ff0060075491151560081b169061ff00191617600755600080f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b606060031982011261000e57600435610db78161072a565b9160243591604435906001600160401b03821161000e57610dda91600401610d6f565b9091565b503461000e576020610dfb610df236610d9f565b92919091612684565b6040519015158152f35b503461000e57602036600319011261000e5760206001600160a01b03610e2c6004356128fd565b16604051908152f35b50608036600319011261000e57602435600435610e518261072a565b606435916001600160401b03831161000e57610e7461078d933690600401610d6f565b9060ff600754610e8682821615612732565b610e91333214612773565b610e9c861515612323565b600a54600b54610ec0916115b391610eb991036000190189612316565b111561236f565b610ed7610ecf87600354611b5d565b3410156127bf565b60081c1615610ee8575b5050612e08565b610f0191610ef99160443585612622565b8311156127fc565b6001600160a01b0381166000908152600960205260409020610f24838254612316565b90553880610ee1565b503461000e57600036600319011261000e576001546040516001600160a01b039091168152602090f35b90600182811c92168015610f87575b6020831014610f7157565b634e487b7160e01b600052602260045260246000fd5b91607f1691610f66565b6040519060008260045491610fa583610f57565b808352926001908181169081156110195750600114610fcc575b50610b7d92500383610b4f565b600460009081529150600080516020612f858339815191525b848310610ffe5750610b7d935050810160200138610fbf565b81935090816020925483858a01015201910190918592610fe5565b905060209250610b7d94915060ff191682840152151560051b82010138610fbf565b503461000e576000806003193601126106d257604051908060045461105f81610f57565b808552916001918083169081156106a85750600114611088576105938561064181870382610b4f565b925060048352600080516020612f858339815191525b8284106110b957505050810160200161064182610593610631565b8054602085870181019190915290930192810161109e565b503461000e57602036600319011261000e576004356110ef8161072a565b6001600160a01b0316801561111f57600052600f60205260206001600160401b0360406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126106d25761114c611c38565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57601254604080516001600160a01b038316815260a09290921c61ffff16602083015290f35b503461000e57602036600319011261000e576111de611c38565b600435600655005b503461000e57600036600319011261000e576020601454604051908152f35b503461000e57600036600319011261000e57602060ff600754166040519015158152f35b503461000e57600036600319011261000e576000546040516001600160a01b039091168152602090f35b503461000e576000806003193601126106d2576040519080600d5461127781610f57565b808552916001918083169081156106a857506001146112a0576105938561064181870382610b4f565b9250600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8284106112e357505050810160200161064182610593610631565b805460208587018101919091529093019281016112c8565b503461000e57604036600319011261000e5761078d60043561131c8161072a565b6024359061132982610d23565b60025461133e906001600160a01b0316610768565b6001600160a01b038116611353575b50612a09565b600854604051630f8350ed60e41b81526001600160a01b03841660048201526024810191909152611392916001919060209082908180604481016107ca565b3861134d565b503461000e5760206108986113ac36610d9f565b92919091612622565b503461000e57600036600319011261000e57602060ff60075460081c166040519015158152f35b6020906001600160401b0381116113f5575b60051b0190565b6113fd610ada565b6113ee565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57611434903690600401610d6f565b60249291923591821161000e573660238301121561000e5781600401359261145b846113dc565b926114696040519485610b4f565b84845260209460248686019160051b8301019136831161000e57602401905b82821061149a5761078d86868661224b565b81358152908601908601611488565b503461000e57600036600319011261000e576002546040516001600160a01b039091168152602090f35b50608036600319011261000e576004356114ec8161072a565b6024356114f88161072a565b606435916001600160401b03831161000e573660238401121561000e5761152c61078d933690602481600401359101610bb6565b9160443591612c81565b503461000e57602036600319011261000e5760043561155481610d23565b61155c611c38565b60ff8019600754169115151617600755600080f35b503461000e57602036600319011261000e5760043561158f8161072a565b611597611c38565b600180546001600160a01b0319166001600160a01b0392909216919091179055005b503461000e576000806003193601126106d25760405190806005546115dd81610f57565b808552916001918083169081156106a85750600114611606576105938561064181870382610b4f565b925060058352600080516020612f658339815191525b82841061163757505050810160200161064182610593610631565b8054602085870181019190915290930192810161161c565b503461000e57602036600319011261000e5761059361166f60043561256d565b6040519182916020835260208301906105ba565b503461000e57600036600319011261000e576020600854604051908152f35b503461000e576116b136610bed565b6116b9611c38565b80516001600160401b038111611790575b6116de816116d9600554610f57565b611d8f565b602080601f831160011461171b57508192600092611710575b5050600019600383901b1c191660019190911b17600555005b0151905038806116f7565b90601f1983169361173c6005600052600080516020612f6583398151915290565b926000905b868210611778575050836001951061175f575b505050811b01600555005b015160001960f88460031b161c19169055388080611754565b80600185968294968601518155019501930190611741565b611798610ada565b6116ca565b50606036600319011261000e576044356004356001600160401b03821161000e576117cf61078d923690600401610d6f565b9060ff6007546117e182821615612732565b6117ec333214612773565b6117f7851515612323565b600a54600b54611814916115b391610eb991036000190188612316565b611823610ecf86600354611b5d565b60081c1615611835575b505033612e08565b61184e916118469160243533612622565b8211156127fc565b336000908152600960205260409020611868828254612316565b9055388061182d565b503461000e57604036600319011261000e57602060ff6118ce6004356118968161072a565b602435906118a38261072a565b60018060a01b03166000526011845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57604036600319011261000e576118f4611c38565b7f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe4160405161192181610b19565b60043561192d8161072a565b81526119d66119cd61193d611e1e565b92602081019380855261195861271061ffff80931610611e7c565b6119a160018060a01b0383511686519260206040519161197783610b19565b838352851691015260018060a01b03166bffffffffffffffffffffffff60a01b6012541617601255565b6012805461ffff60a01b191660a09290921b61ffff60a01b16919091179055516001600160a01b031690565b915161ffff1690565b604080516001600160a01b0393909316835261ffff91909116602083015290a1005b503461000e57602036600319011261000e57600435611a168161072a565b611a1e611c38565b6001600160a01b039081168015611a6c57600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e57602036600319011261000e57600435611ade8161072a565b60018060a01b031660005260096020526020604060002054604051908152f35b503461000e57602036600319011261000e57600435611b1c8161072a565b611b24611c38565b600280546001600160a01b0319166001600160a01b0392909216919091179055005b50634e487b7160e01b600052601160045260246000fd5b81810292918115918404141715611b7057565b610b7d611b46565b6000818152601360205260409020546001600160a01b03939291908416611be757506012549283169283151580611bd7575b611bba5750509050600090600090565b6105f09161ffff611bcf9260a01c1690611b5d565b612710900490565b5061ffff8160a01c161515611baa565b926105f091611c32611c2b611c20611bcf94611c0d896000526013602052604060002090565b5416976000526013602052604060002090565b5460a01c61ffff1690565b61ffff1690565b90611b5d565b6000546001600160a01b03163303611c4c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b50634e487b7160e01b600052603260045260246000fd5b601454811015611cdf575b60146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0190600090565b611ce7611c90565b611cb2565b63ffffffff60e01b1663152a902d60e11b8114908115611d1f575b8115611d11575090565b6301ffc9a760e01b14919050565b63c69dbd8f60e01b81149150611d07565b601f8111611d3c575050565b60009060048252600080516020612f85833981519152906020601f850160051c83019410611d85575b601f0160051c01915b828110611d7a57505050565b818155600101611d6e565b9092508290611d65565b601f8111611d9b575050565b60009060058252600080516020612f65833981519152906020601f850160051c83019410611de4575b601f0160051c01915b828110611dd957505050565b818155600101611dcd565b9092508290611dc4565b3d15611e19573d90611dff82610b8c565b91611e0d6040519384610b4f565b82523d6000602084013e565b606090565b6024359061ffff8216820361000e57565b359061ffff8216820361000e57565b6001906000198114611e4e570190565b611e56611b46565b0190565b6020918151811015611e6f575b60051b010190565b611e77611c90565b611e67565b15611e8357565b60405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642062707360a81b6044820152606490fd5b906000805b83518110156120785780611ed2611f729286611e5a565b51604090818101611ef4612710611eee611c2b845161ffff1690565b10611e7c565b6020828101805190916001600160a01b039091169081611f7757505050507fa2870857763bd9ae76c957f869f16b31c18dd3bb4c7b4d3a4496dc5c57c657f9918186611f4e611f6a94516000526013602052604060002090565b55611f59815161217d565b505190519081529081906020820190565b0390a1611e3e565b611ebb565b612045849561202b7f389b70fb0887f01e83784eb1c4c589f740eca53b00ed0f45e41db5d079719abb9894611fdf61204e95611fb9611f6a999a5161ffff1690565b90611fd4611fc5610b7f565b6001600160a01b039095168552565b83019061ffff169052565b611ff483516000526013602052604060002090565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b612035815161207e565b505194516001600160a01b031690565b945161ffff1690565b90519283526001600160a01b03909316602083015261ffff90921660408201529081906060820190565b50509050565b8060005260156020526040600020541560001461210f578060145468010000000000000000811015612102575b60018101806014558110156120f5575b7fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155601454906000526015602052604060002055600190565b6120fd611c90565b6120bb565b61210a610ada565b6120ab565b50600090565b60145480156121675760007fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4eb81198301928084101561215a575b601483520155601455565b612162611c90565b61214f565b634e487b7160e01b600052603160045260246000fd5b6000818152601560205260409020548015612244576000916121d891600019808201828111612237575b60145491820191821161222a575b8082036121de575b5050506121c8612115565b6000526015602052604060002090565b55600190565b6121c8612206916121fe6121f461222195611ca7565b90549060031b1c90565b928391611ca7565b90919082549060031b600019811b9283911b16911916179055565b553880806121bd565b612232611b46565b6121b5565b61223f611b46565b6121a7565b5050600090565b9192612255611c38565b600091825b855184101561229557612282906122718588611e5a565b518101809111612288575b93611e3e565b9261225a565b612290611b46565b61227c565b6122c2919350610eb96115b3919593956122b0811515612323565b600a54600b5490036000190190612316565b6122ce845183146123bb565b60005b845181101561230f57806123056122f46122ef61230a9487876123fd565b612415565b6122fe8389611e5a565b5190612e08565b611e3e565b6122d1565b5050509050565b91908201809211611b7057565b1561232a57565b60405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606490fd5b1561237657565b60405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606490fd5b156123c257565b60405162461bcd60e51b81526020600482015260136024820152720c2e4e4c2f240d8cadccee8d040eadcdaeac6d606b1b6044820152606490fd5b919081101561240d5760051b0190565b6113fd611c90565b356105f08161072a565b9081602091031261000e57516105f081610d23565b506040513d6000823e3d90fd5b1561244857565b60405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b6044820152606490fd5b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e5780516124b181610b8c565b926124bf6040519485610b4f565b8184526020828401011161000e576105f09160208085019101610597565b90611e5660209282815194859201610597565b6005546000929161250082610f57565b9160019081811690811561255a575060011461251b57505050565b90919293506005600052600080516020612f65833981519152906000915b848310612547575050500190565b8181602092548587015201920191612539565b60ff191683525050811515909102019150565b600154612582906001600160a01b0316610768565b6001600160a01b0381166125c657506105f06125a06125b392612848565b6125b860405193849260208401906124dd565b6124f0565b03601f198101835282610b4f565b6040516378b219bd60e01b81526004810192909252600090829060249082905afa908115612615575b6000916125fa575090565b6105f0913d8091833e61260d8183610b4f565b81019061247f565b61261d612434565b6125ef565b909160009360ff6007541615918261266a575b505061264057505090565b6001600160a01b03168252600960205260409091205481039081116126625790565b6105f0611b46565b600192509061267a918585612684565b1515143880612635565b9192600093600654936040908151602095868201926bffffffffffffffffffffffff199060601b16835260ff199060081b166034820152603381526126c881610af1565b5190209386935b8085106126ee5750505050509060019114146126e85790565b50600190565b90919293946126fe8683876123fd565b35908181101561272257885282526127198388205b95611e3e565b939291906126cf565b9088528252612719838820612713565b1561273957565b60405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b6044820152606490fd5b1561277a57565b60405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c6572006044820152606490fd5b156127c657565b60405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606490fd5b1561280357565b60405162461bcd60e51b815260206004820152601860248201527f636c61696d206973206f766572206d617820616d6f756e7400000000000000006044820152606490fd5b61285181612a74565b156128eb5761285e610f91565b8051909190600090156128d657506040519060a08201604052608082019060008252905b6000190190600a9060308282060183530490816128825790506128c4926128ca6105f0936080601f1994858101920301815260405195869360208501906124dd565b906124dd565b03908101835282610b4f565b915050604051906128e682610b34565b815290565b604051630a14c4b560e41b8152600490fd5b80806001111561291a575b604051636f96cda160e11b8152600490fd5b600a5481101561290857600052600e60205260406000205490600160e01b8216612908575b8115612949575090565b90506000190161296381600052600e602052604060002090565b549061293f565b6001600160a01b038061297c846128fd565b16918233036129d6575b600084815260106020526040902080546001600160a01b0319166001600160a01b03831617905516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b600083815260116020908152604080832033845290915290205460ff16612986576040516367d9dca160e11b8152600490fd5b3360009081526011602090815260408083206001600160a01b038516845290915290209115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3565b80600111159081612aa3575b81612a89575090565b9050600052600e602052600160e01b604060002054161590565b600a5481109150612a80565b90612ab9836128fd565b6001600160a01b0383811692828216849003612c7057600086815260106020526040902080549092612afe6001600160a01b03881633908114908414171590565b1590565b612c15575b8216958615612c0357612b5693612b3492612bf9575b506001600160a01b03166000908152600f6020526040902090565b80546000190190556001600160a01b03166000908152600f6020526040902090565b80546001019055600160e11b804260a01b851717612b7e86600052600e602052604060002090565b55811615612baf575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401612bc781600052600e602052604060002090565b5415612bd4575b50612b87565b600a548114612bce57612bf190600052600e602052604060002090565b553880612bce565b6000905538612b19565b604051633a954ecd60e21b8152600490fd5b612c59612afa612c5233612c3b8b60018060a01b03166000526011602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b15612b0357604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b929190612c8f828286612aaf565b803b612c9c575b50505050565b612ca593612ddf565b15612cb35738808080612c96565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e57516105f081610404565b6105f0939260809260018060a01b0316825260006020830152604082015281606082015201906105ba565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526105f0929101906105ba565b612d5f60209160009394604051948580948193630a85bd0160e11b998a84523360048501612cda565b03926001600160a01b03165af160009181612daf575b50612da157612d82611dee565b80519081612d9c576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b612dd191925060203d8111612dd8575b612dc98183610b4f565b810190612cc5565b9038612d75565b503d612dbf565b92602091612d5f936000604051809681958294630a85bd0160e11b9a8b85523360048601612d05565b9060408051612e1681610b34565b600093848252600a54908415612f53576001600160a01b0381166000908152600f6020526040902080546801000000000000000187020190556000828152600e60205260409020600192906001600160a01b038316904260a01b85891460e11b17821790558682019184807fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9280858d868180a4015b848103612f445750505015612f3457600a55803b612ecd575b505050505050565b600a549485039180805b612ef4575b505050505050600a54036106d2578080808080612ec5565b15612f27575b86612f0c612afa868487019686612d36565b612f165781612ed7565b85516368d2bf6b60e11b8152600490fd5b858310612efa5780612edc565b8451622e076360e81b8152600490fd5b80848c858180a4018590612eac565b835163b562e8dd60e01b8152600490fdfe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19ba26469706673582212204c71340e724e3825cae45cc032974919b27221f85d39ebd6e9f17fd73677529264736f6c63430008110033
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a7146103fb5780630653aca5146103f257806306fdde03146103e9578063081812fc146103e0578063095ea7b3146103d7578063122e04a8146103ce57806313faede6146103c557806318160ddd146103bc57806323b872dd146103b35780632a55205a146103aa5780632eb4a7ab146103a157806332cb6b0c1461039857806339940b4a1461038f5780633ccfd60b1461038657806342842e0e1461037d57806344a0d68a146103745780635136dcc71461036b57806355f804b3146103625780635aca1bb614610359578063614b655c146103505780636352211e14610347578063655191821461033e5780636a98de4c146103355780636c0360eb1461032c57806370a0823114610323578063715018a61461031a5780637885fdc7146103115780637cb64759146103085780637e980342146102ff5780638456cb59146102f65780638da5cb5b146102ed57806395d89b41146102e4578063a22cb465146102db578063a3b10ac8146102d2578063a5a865dc146102c9578063b3a06630146102c0578063b7c738f4146102b7578063b88d4fde146102ae578063bedb86fb146102a5578063c0c2e0a31461029c578063c668286214610293578063c87b56dd1461028a578063cc835a8814610281578063da3ef23f14610278578063e6d37b881461026f578063e985e9c514610266578063ef60ceaf1461025d578063f2fde38b14610254578063fddcb5ea1461024b5763fe9ba2fb1461024357600080fd5b61000e611afe565b5061000e611ac0565b5061000e6119f8565b5061000e6118da565b5061000e611871565b5061000e61179d565b5061000e6116a2565b5061000e611683565b5061000e61164f565b5061000e6115b9565b5061000e611571565b5061000e611536565b5061000e6114d3565b5061000e6114a9565b5061000e611402565b5061000e6113b5565b5061000e611398565b5061000e6112fb565b5061000e611253565b5061000e611229565b5061000e611205565b5061000e6111e6565b5061000e6111c4565b5061000e61118d565b5061000e611131565b5061000e6110d1565b5061000e61103b565b5061000e610f2d565b5061000e610e35565b5061000e610e05565b5061000e610dde565b5061000e610d2d565b5061000e610c28565b5061000e610a09565b5061000e6109e7565b5061000e6109c3565b5061000e61097b565b5061000e610959565b5061000e61093b565b5061000e61091c565b5061000e6108df565b5061000e6108cc565b5061000e610877565b5061000e610858565b5061000e610828565b5061000e61073b565b5061000e6106d5565b5061000e6105f3565b5061000e6104b8565b5061000e610416565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e57602060043561043681610404565b6001600160e01b031981166301ffc9a760e01b8114919082156104a7575b8215610496575b508115610485575b8115610475575b506040519015158152f35b61047f9150611cec565b3861046a565b905061049081611cec565b90610463565b635b5e139f60e01b1491503861045b565b6380ac58cd60e01b81149250610454565b503461000e57602036600319011261000e57610593604060008180516104dd81610af1565b82815282602082015201526104f3600435611ca7565b90549060031b1c9081600052601360205261056060206105568360002084519061051c82610b19565b546001600160a01b03811680835260a09190911c61ffff1693909101839052610543610b70565b9586526001600160a01b03166020860152565b61ffff1683830152565b51815181526020808301516001600160a01b03169082015260409182015161ffff16918101919091529081906060820190565b0390f35b60005b8381106105aa5750506000910152565b818101518382015260200161059a565b906020916105d381518092818552858086019101610597565b601f01601f1916010190565b9060206105f09281815201906105ba565b90565b503461000e576000806003193601126106d2576040519080600c5461061781610f57565b808552916001918083169081156106a8575060011461064d575b6105938561064181870382610b4f565b604051918291826105df565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b82841061069057505050810160200161064182610593610631565b80546020858701810191909152909301928101610675565b8695506105939693506020925061064194915060ff191682840152151560051b8201019293610631565b80fd5b503461000e57602036600319011261000e576004356106f381612a74565b15610718576000526010602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b6001600160a01b0381160361000e57565b50604036600319011261000e5761078d6004356107578161072a565b600254610774906001600160a01b03165b6001600160a01b031690565b6001600160a01b03811661078f575b506024359061296a565b005b600854604051630f8350ed60e41b81526001600160a01b038416600482015260248101919091526107e7916001919060209082908180604481015b03915afa90811561081b575b6000916107ed575b50151514612441565b38610783565b61080e915060203d8111610814575b6108068183610b4f565b81019061241f565b386107de565b503d6107fc565b610823612434565b6107d6565b503461000e57600036600319011261000e57602060405173d416442dc3d81a0e58010941acffebeb51d763368152f35b503461000e57600036600319011261000e576020600354604051908152f35b503461000e57600036600319011261000e57600a54600b5460209103600019015b604051908152f35b606090600319011261000e576004356108b88161072a565b906024356108c58161072a565b9060443590565b5061078d6108d9366108a0565b91612aaf565b503461000e57604036600319011261000e576108ff602435600435611b78565b604080516001600160a01b03939093168352602083019190915290f35b503461000e57600036600319011261000e576020600654604051908152f35b503461000e57600036600319011261000e5760206040516115b38152f35b503461000e57602036600319011261000e57610973611c38565b600435600855005b503461000e576000806003193601126106d257610996611c38565b808080804773d416442dc3d81a0e58010941acffebeb51d763365af16109ba611dee565b50156106d25780f35b5061078d6109d0366108a0565b90604051926109de84610b34565b60008452612c81565b503461000e57602036600319011261000e57610a01611c38565b600435600355005b503461000e5760208060031936011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e5760609260248484028301019136831161000e57610a60611c38565b610a69846113dc565b93604090610a7982519687610b4f565b855260248386019201915b848310610a945761078d86611eb6565b868336031261000e578387918351610aab81610af1565b8535815282860135610abc8161072a565b83820152610acb858701611e2f565b85820152815201920191610a84565b50634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b03821117610b0c57604052565b610b14610ada565b604052565b604081019081106001600160401b03821117610b0c57604052565b602081019081106001600160401b03821117610b0c57604052565b90601f801991011681019081106001600160401b03821117610b0c57604052565b60405190610b7d82610af1565b565b60405190610b7d82610b19565b6020906001600160401b038111610ba9575b601f01601f19160190565b610bb1610ada565b610b9e565b929192610bc282610b8c565b91610bd06040519384610b4f565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e57600435906001600160401b03821161000e578060238301121561000e578160246105f093600401359101610bb6565b503461000e57610c3736610bed565b610c3f611c38565b80516001600160401b038111610d16575b610c6481610c5f600454610f57565b611d30565b602080601f8311600114610ca157508192600092610c96575b5050600019600383901b1c191660019190911b17600455005b015190503880610c7d565b90601f19831693610cc26004600052600080516020612f8583398151915290565b926000905b868210610cfe5750508360019510610ce5575b505050811b01600455005b015160001960f88460031b161c19169055388080610cda565b80600185968294968601518155019501930190610cc7565b610d1e610ada565b610c50565b8015150361000e57565b503461000e57602036600319011261000e57600435610d4b81610d23565b610d53611c38565b61ff0060075491151560081b169061ff00191617600755600080f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b606060031982011261000e57600435610db78161072a565b9160243591604435906001600160401b03821161000e57610dda91600401610d6f565b9091565b503461000e576020610dfb610df236610d9f565b92919091612684565b6040519015158152f35b503461000e57602036600319011261000e5760206001600160a01b03610e2c6004356128fd565b16604051908152f35b50608036600319011261000e57602435600435610e518261072a565b606435916001600160401b03831161000e57610e7461078d933690600401610d6f565b9060ff600754610e8682821615612732565b610e91333214612773565b610e9c861515612323565b600a54600b54610ec0916115b391610eb991036000190189612316565b111561236f565b610ed7610ecf87600354611b5d565b3410156127bf565b60081c1615610ee8575b5050612e08565b610f0191610ef99160443585612622565b8311156127fc565b6001600160a01b0381166000908152600960205260409020610f24838254612316565b90553880610ee1565b503461000e57600036600319011261000e576001546040516001600160a01b039091168152602090f35b90600182811c92168015610f87575b6020831014610f7157565b634e487b7160e01b600052602260045260246000fd5b91607f1691610f66565b6040519060008260045491610fa583610f57565b808352926001908181169081156110195750600114610fcc575b50610b7d92500383610b4f565b600460009081529150600080516020612f858339815191525b848310610ffe5750610b7d935050810160200138610fbf565b81935090816020925483858a01015201910190918592610fe5565b905060209250610b7d94915060ff191682840152151560051b82010138610fbf565b503461000e576000806003193601126106d257604051908060045461105f81610f57565b808552916001918083169081156106a85750600114611088576105938561064181870382610b4f565b925060048352600080516020612f858339815191525b8284106110b957505050810160200161064182610593610631565b8054602085870181019190915290930192810161109e565b503461000e57602036600319011261000e576004356110ef8161072a565b6001600160a01b0316801561111f57600052600f60205260206001600160401b0360406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126106d25761114c611c38565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57601254604080516001600160a01b038316815260a09290921c61ffff16602083015290f35b503461000e57602036600319011261000e576111de611c38565b600435600655005b503461000e57600036600319011261000e576020601454604051908152f35b503461000e57600036600319011261000e57602060ff600754166040519015158152f35b503461000e57600036600319011261000e576000546040516001600160a01b039091168152602090f35b503461000e576000806003193601126106d2576040519080600d5461127781610f57565b808552916001918083169081156106a857506001146112a0576105938561064181870382610b4f565b9250600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8284106112e357505050810160200161064182610593610631565b805460208587018101919091529093019281016112c8565b503461000e57604036600319011261000e5761078d60043561131c8161072a565b6024359061132982610d23565b60025461133e906001600160a01b0316610768565b6001600160a01b038116611353575b50612a09565b600854604051630f8350ed60e41b81526001600160a01b03841660048201526024810191909152611392916001919060209082908180604481016107ca565b3861134d565b503461000e5760206108986113ac36610d9f565b92919091612622565b503461000e57600036600319011261000e57602060ff60075460081c166040519015158152f35b6020906001600160401b0381116113f5575b60051b0190565b6113fd610ada565b6113ee565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57611434903690600401610d6f565b60249291923591821161000e573660238301121561000e5781600401359261145b846113dc565b926114696040519485610b4f565b84845260209460248686019160051b8301019136831161000e57602401905b82821061149a5761078d86868661224b565b81358152908601908601611488565b503461000e57600036600319011261000e576002546040516001600160a01b039091168152602090f35b50608036600319011261000e576004356114ec8161072a565b6024356114f88161072a565b606435916001600160401b03831161000e573660238401121561000e5761152c61078d933690602481600401359101610bb6565b9160443591612c81565b503461000e57602036600319011261000e5760043561155481610d23565b61155c611c38565b60ff8019600754169115151617600755600080f35b503461000e57602036600319011261000e5760043561158f8161072a565b611597611c38565b600180546001600160a01b0319166001600160a01b0392909216919091179055005b503461000e576000806003193601126106d25760405190806005546115dd81610f57565b808552916001918083169081156106a85750600114611606576105938561064181870382610b4f565b925060058352600080516020612f658339815191525b82841061163757505050810160200161064182610593610631565b8054602085870181019190915290930192810161161c565b503461000e57602036600319011261000e5761059361166f60043561256d565b6040519182916020835260208301906105ba565b503461000e57600036600319011261000e576020600854604051908152f35b503461000e576116b136610bed565b6116b9611c38565b80516001600160401b038111611790575b6116de816116d9600554610f57565b611d8f565b602080601f831160011461171b57508192600092611710575b5050600019600383901b1c191660019190911b17600555005b0151905038806116f7565b90601f1983169361173c6005600052600080516020612f6583398151915290565b926000905b868210611778575050836001951061175f575b505050811b01600555005b015160001960f88460031b161c19169055388080611754565b80600185968294968601518155019501930190611741565b611798610ada565b6116ca565b50606036600319011261000e576044356004356001600160401b03821161000e576117cf61078d923690600401610d6f565b9060ff6007546117e182821615612732565b6117ec333214612773565b6117f7851515612323565b600a54600b54611814916115b391610eb991036000190188612316565b611823610ecf86600354611b5d565b60081c1615611835575b505033612e08565b61184e916118469160243533612622565b8211156127fc565b336000908152600960205260409020611868828254612316565b9055388061182d565b503461000e57604036600319011261000e57602060ff6118ce6004356118968161072a565b602435906118a38261072a565b60018060a01b03166000526011845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57604036600319011261000e576118f4611c38565b7f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe4160405161192181610b19565b60043561192d8161072a565b81526119d66119cd61193d611e1e565b92602081019380855261195861271061ffff80931610611e7c565b6119a160018060a01b0383511686519260206040519161197783610b19565b838352851691015260018060a01b03166bffffffffffffffffffffffff60a01b6012541617601255565b6012805461ffff60a01b191660a09290921b61ffff60a01b16919091179055516001600160a01b031690565b915161ffff1690565b604080516001600160a01b0393909316835261ffff91909116602083015290a1005b503461000e57602036600319011261000e57600435611a168161072a565b611a1e611c38565b6001600160a01b039081168015611a6c57600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e57602036600319011261000e57600435611ade8161072a565b60018060a01b031660005260096020526020604060002054604051908152f35b503461000e57602036600319011261000e57600435611b1c8161072a565b611b24611c38565b600280546001600160a01b0319166001600160a01b0392909216919091179055005b50634e487b7160e01b600052601160045260246000fd5b81810292918115918404141715611b7057565b610b7d611b46565b6000818152601360205260409020546001600160a01b03939291908416611be757506012549283169283151580611bd7575b611bba5750509050600090600090565b6105f09161ffff611bcf9260a01c1690611b5d565b612710900490565b5061ffff8160a01c161515611baa565b926105f091611c32611c2b611c20611bcf94611c0d896000526013602052604060002090565b5416976000526013602052604060002090565b5460a01c61ffff1690565b61ffff1690565b90611b5d565b6000546001600160a01b03163303611c4c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b50634e487b7160e01b600052603260045260246000fd5b601454811015611cdf575b60146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0190600090565b611ce7611c90565b611cb2565b63ffffffff60e01b1663152a902d60e11b8114908115611d1f575b8115611d11575090565b6301ffc9a760e01b14919050565b63c69dbd8f60e01b81149150611d07565b601f8111611d3c575050565b60009060048252600080516020612f85833981519152906020601f850160051c83019410611d85575b601f0160051c01915b828110611d7a57505050565b818155600101611d6e565b9092508290611d65565b601f8111611d9b575050565b60009060058252600080516020612f65833981519152906020601f850160051c83019410611de4575b601f0160051c01915b828110611dd957505050565b818155600101611dcd565b9092508290611dc4565b3d15611e19573d90611dff82610b8c565b91611e0d6040519384610b4f565b82523d6000602084013e565b606090565b6024359061ffff8216820361000e57565b359061ffff8216820361000e57565b6001906000198114611e4e570190565b611e56611b46565b0190565b6020918151811015611e6f575b60051b010190565b611e77611c90565b611e67565b15611e8357565b60405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642062707360a81b6044820152606490fd5b906000805b83518110156120785780611ed2611f729286611e5a565b51604090818101611ef4612710611eee611c2b845161ffff1690565b10611e7c565b6020828101805190916001600160a01b039091169081611f7757505050507fa2870857763bd9ae76c957f869f16b31c18dd3bb4c7b4d3a4496dc5c57c657f9918186611f4e611f6a94516000526013602052604060002090565b55611f59815161217d565b505190519081529081906020820190565b0390a1611e3e565b611ebb565b612045849561202b7f389b70fb0887f01e83784eb1c4c589f740eca53b00ed0f45e41db5d079719abb9894611fdf61204e95611fb9611f6a999a5161ffff1690565b90611fd4611fc5610b7f565b6001600160a01b039095168552565b83019061ffff169052565b611ff483516000526013602052604060002090565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b612035815161207e565b505194516001600160a01b031690565b945161ffff1690565b90519283526001600160a01b03909316602083015261ffff90921660408201529081906060820190565b50509050565b8060005260156020526040600020541560001461210f578060145468010000000000000000811015612102575b60018101806014558110156120f5575b7fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155601454906000526015602052604060002055600190565b6120fd611c90565b6120bb565b61210a610ada565b6120ab565b50600090565b60145480156121675760007fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4eb81198301928084101561215a575b601483520155601455565b612162611c90565b61214f565b634e487b7160e01b600052603160045260246000fd5b6000818152601560205260409020548015612244576000916121d891600019808201828111612237575b60145491820191821161222a575b8082036121de575b5050506121c8612115565b6000526015602052604060002090565b55600190565b6121c8612206916121fe6121f461222195611ca7565b90549060031b1c90565b928391611ca7565b90919082549060031b600019811b9283911b16911916179055565b553880806121bd565b612232611b46565b6121b5565b61223f611b46565b6121a7565b5050600090565b9192612255611c38565b600091825b855184101561229557612282906122718588611e5a565b518101809111612288575b93611e3e565b9261225a565b612290611b46565b61227c565b6122c2919350610eb96115b3919593956122b0811515612323565b600a54600b5490036000190190612316565b6122ce845183146123bb565b60005b845181101561230f57806123056122f46122ef61230a9487876123fd565b612415565b6122fe8389611e5a565b5190612e08565b611e3e565b6122d1565b5050509050565b91908201809211611b7057565b1561232a57565b60405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606490fd5b1561237657565b60405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606490fd5b156123c257565b60405162461bcd60e51b81526020600482015260136024820152720c2e4e4c2f240d8cadccee8d040eadcdaeac6d606b1b6044820152606490fd5b919081101561240d5760051b0190565b6113fd611c90565b356105f08161072a565b9081602091031261000e57516105f081610d23565b506040513d6000823e3d90fd5b1561244857565b60405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b6044820152606490fd5b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e5780516124b181610b8c565b926124bf6040519485610b4f565b8184526020828401011161000e576105f09160208085019101610597565b90611e5660209282815194859201610597565b6005546000929161250082610f57565b9160019081811690811561255a575060011461251b57505050565b90919293506005600052600080516020612f65833981519152906000915b848310612547575050500190565b8181602092548587015201920191612539565b60ff191683525050811515909102019150565b600154612582906001600160a01b0316610768565b6001600160a01b0381166125c657506105f06125a06125b392612848565b6125b860405193849260208401906124dd565b6124f0565b03601f198101835282610b4f565b6040516378b219bd60e01b81526004810192909252600090829060249082905afa908115612615575b6000916125fa575090565b6105f0913d8091833e61260d8183610b4f565b81019061247f565b61261d612434565b6125ef565b909160009360ff6007541615918261266a575b505061264057505090565b6001600160a01b03168252600960205260409091205481039081116126625790565b6105f0611b46565b600192509061267a918585612684565b1515143880612635565b9192600093600654936040908151602095868201926bffffffffffffffffffffffff199060601b16835260ff199060081b166034820152603381526126c881610af1565b5190209386935b8085106126ee5750505050509060019114146126e85790565b50600190565b90919293946126fe8683876123fd565b35908181101561272257885282526127198388205b95611e3e565b939291906126cf565b9088528252612719838820612713565b1561273957565b60405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b6044820152606490fd5b1561277a57565b60405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c6572006044820152606490fd5b156127c657565b60405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606490fd5b1561280357565b60405162461bcd60e51b815260206004820152601860248201527f636c61696d206973206f766572206d617820616d6f756e7400000000000000006044820152606490fd5b61285181612a74565b156128eb5761285e610f91565b8051909190600090156128d657506040519060a08201604052608082019060008252905b6000190190600a9060308282060183530490816128825790506128c4926128ca6105f0936080601f1994858101920301815260405195869360208501906124dd565b906124dd565b03908101835282610b4f565b915050604051906128e682610b34565b815290565b604051630a14c4b560e41b8152600490fd5b80806001111561291a575b604051636f96cda160e11b8152600490fd5b600a5481101561290857600052600e60205260406000205490600160e01b8216612908575b8115612949575090565b90506000190161296381600052600e602052604060002090565b549061293f565b6001600160a01b038061297c846128fd565b16918233036129d6575b600084815260106020526040902080546001600160a01b0319166001600160a01b03831617905516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b600083815260116020908152604080832033845290915290205460ff16612986576040516367d9dca160e11b8152600490fd5b3360009081526011602090815260408083206001600160a01b038516845290915290209115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3565b80600111159081612aa3575b81612a89575090565b9050600052600e602052600160e01b604060002054161590565b600a5481109150612a80565b90612ab9836128fd565b6001600160a01b0383811692828216849003612c7057600086815260106020526040902080549092612afe6001600160a01b03881633908114908414171590565b1590565b612c15575b8216958615612c0357612b5693612b3492612bf9575b506001600160a01b03166000908152600f6020526040902090565b80546000190190556001600160a01b03166000908152600f6020526040902090565b80546001019055600160e11b804260a01b851717612b7e86600052600e602052604060002090565b55811615612baf575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401612bc781600052600e602052604060002090565b5415612bd4575b50612b87565b600a548114612bce57612bf190600052600e602052604060002090565b553880612bce565b6000905538612b19565b604051633a954ecd60e21b8152600490fd5b612c59612afa612c5233612c3b8b60018060a01b03166000526011602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b15612b0357604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b929190612c8f828286612aaf565b803b612c9c575b50505050565b612ca593612ddf565b15612cb35738808080612c96565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e57516105f081610404565b6105f0939260809260018060a01b0316825260006020830152604082015281606082015201906105ba565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526105f0929101906105ba565b612d5f60209160009394604051948580948193630a85bd0160e11b998a84523360048501612cda565b03926001600160a01b03165af160009181612daf575b50612da157612d82611dee565b80519081612d9c576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b612dd191925060203d8111612dd8575b612dc98183610b4f565b810190612cc5565b9038612d75565b503d612dbf565b92602091612d5f936000604051809681958294630a85bd0160e11b9a8b85523360048601612d05565b9060408051612e1681610b34565b600093848252600a54908415612f53576001600160a01b0381166000908152600f6020526040902080546801000000000000000187020190556000828152600e60205260409020600192906001600160a01b038316904260a01b85891460e11b17821790558682019184807fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9280858d868180a4015b848103612f445750505015612f3457600a55803b612ecd575b505050505050565b600a549485039180805b612ef4575b505050505050600a54036106d2578080808080612ec5565b15612f27575b86612f0c612afa868487019686612d36565b612f165781612ed7565b85516368d2bf6b60e11b8152600490fd5b858310612efa5780612edc565b8451622e076360e81b8152600490fd5b80848c858180a4018590612eac565b835163b562e8dd60e01b8152600490fdfe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19ba26469706673582212204c71340e724e3825cae45cc032974919b27221f85d39ebd6e9f17fd73677529264736f6c63430008110033
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.