Overview
ETH Balance
0.0077 ETH
Eth Value
$20.58 (@ $2,672.18/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 162 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 19423994 | 231 days ago | IN | 0 ETH | 0.00250441 | ||||
Safe Transfer Fr... | 19091557 | 278 days ago | IN | 0 ETH | 0.00153583 | ||||
Safe Transfer Fr... | 18704525 | 332 days ago | IN | 0 ETH | 0.00198883 | ||||
Safe Transfer Fr... | 18704346 | 332 days ago | IN | 0 ETH | 0.0012143 | ||||
Pub Mint | 18704316 | 332 days ago | IN | 0.0077 ETH | 0.00241617 | ||||
Set Approval For... | 18528268 | 357 days ago | IN | 0 ETH | 0.00310306 | ||||
Withdraw | 18390520 | 376 days ago | IN | 0 ETH | 0.00136284 | ||||
Set Approval For... | 18146232 | 410 days ago | IN | 0 ETH | 0.0005352 | ||||
Pub Mint | 18129419 | 412 days ago | IN | 0.0385 ETH | 0.00145723 | ||||
Set Approval For... | 18055528 | 423 days ago | IN | 0 ETH | 0.00062448 | ||||
Set Approval For... | 18023244 | 427 days ago | IN | 0 ETH | 0.00210552 | ||||
Set Approval For... | 17974139 | 434 days ago | IN | 0 ETH | 0.0010025 | ||||
Pub Mint | 17874119 | 448 days ago | IN | 0.0077 ETH | 0.00157207 | ||||
Safe Transfer Fr... | 17766814 | 463 days ago | IN | 0 ETH | 0.00201486 | ||||
Withdraw | 17732919 | 468 days ago | IN | 0 ETH | 0.00217175 | ||||
Pub Mint | 17726051 | 469 days ago | IN | 0.0077 ETH | 0.00130418 | ||||
Pub Mint | 17690811 | 474 days ago | IN | 0.0077 ETH | 0.00153214 | ||||
Pub Mint | 17679943 | 475 days ago | IN | 0.0077 ETH | 0.00201077 | ||||
Set Approval For... | 17670784 | 477 days ago | IN | 0 ETH | 0.00120192 | ||||
Pub Mint | 17667199 | 477 days ago | IN | 0.0077 ETH | 0.00140981 | ||||
Transfer Ownersh... | 17661715 | 478 days ago | IN | 0 ETH | 0.00042547 | ||||
Withdraw | 17661520 | 478 days ago | IN | 0 ETH | 0.00178742 | ||||
Pub Mint | 17659998 | 478 days ago | IN | 0.0077 ETH | 0.00116122 | ||||
Pub Mint | 17659866 | 478 days ago | IN | 0.0077 ETH | 0.00138906 | ||||
Pub Mint | 17659762 | 478 days ago | IN | 0.0231 ETH | 0.00105595 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18390520 | 376 days ago | 0.01386 ETH | ||||
18390520 | 376 days ago | 0.002772 ETH | ||||
18390520 | 376 days ago | 0.005082 ETH | ||||
18390520 | 376 days ago | 0.002772 ETH | ||||
18390520 | 376 days ago | 0.00693 ETH | ||||
18390520 | 376 days ago | 0.002772 ETH | ||||
18390520 | 376 days ago | 0.002772 ETH | ||||
18390520 | 376 days ago | 0.00924 ETH | ||||
17732919 | 468 days ago | 0.00924 ETH | ||||
17732919 | 468 days ago | 0.001848 ETH | ||||
17732919 | 468 days ago | 0.003388 ETH | ||||
17732919 | 468 days ago | 0.001848 ETH | ||||
17732919 | 468 days ago | 0.00462 ETH | ||||
17732919 | 468 days ago | 0.001848 ETH | ||||
17732919 | 468 days ago | 0.001848 ETH | ||||
17732919 | 468 days ago | 0.00616 ETH | ||||
17661520 | 478 days ago | 0.72765 ETH | ||||
17661520 | 478 days ago | 0.14553 ETH | ||||
17661520 | 478 days ago | 0.266805 ETH | ||||
17661520 | 478 days ago | 0.14553 ETH | ||||
17661520 | 478 days ago | 0.363825 ETH | ||||
17661520 | 478 days ago | 0.14553 ETH | ||||
17661520 | 478 days ago | 0.14553 ETH | ||||
17661520 | 478 days ago | 0.4851 ETH | ||||
17641363 | 481 days ago | 0.19635 ETH |
Loading...
Loading
Contract Name:
NFTxCMusic
Compiler Version
v0.8.18+commit.87f61d96
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.5.8 <0.9.0; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; import {ERC721Psi} from "./ERC721Psi.sol"; import {DefaultOperatorFilterer} from "./operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract NFTxCMusic is ERC721Psi, ERC2981, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; uint256 public constant MAX_SUPPLY = 777; uint256 public constant PRE_PRICE = 0.0077 ether; uint256 public constant PUB_PRICE = 0.0077 ether; bool public preSaleStart; bool public pubSaleStart; uint256 public mintLimit = 5; bytes32 public merkleRoot; string private _baseTokenURI; mapping(address => uint256) public claimed; event minted( address indexed sender, address indexed receiver, uint256 indexed quantity ); constructor() ERC721Psi("NFTxC Music", "NFTXCM") {} function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function tokenURI( uint256 _tokenId ) public view virtual override(ERC721Psi) returns (string memory) { return string(abi.encodePacked(ERC721Psi.tokenURI(_tokenId), ".json")); } function checkMerkleProof( bytes32[] calldata _merkleProof ) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); return MerkleProof.verifyCalldata(_merkleProof, merkleRoot, leaf); } function preMint( uint256 _quantity, bytes32[] calldata _merkleProof ) public payable nonReentrant { require(preSaleStart, "Before sale begin."); require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply over"); require(msg.value >= PRE_PRICE * _quantity, "Not enough funds"); require(_quantity <= mintLimit, "Mint quantity over"); require( claimed[msg.sender] + _quantity <= mintLimit, "Already claimed max" ); require(checkMerkleProof(_merkleProof), "Invalid Merkle Proof"); claimed[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); emit minted(msg.sender, msg.sender, _quantity); } function pubMint( uint256 _quantity, address _receiver ) public payable nonReentrant { require(pubSaleStart, "Before sale begin."); require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply over"); require(msg.value >= PUB_PRICE * _quantity, "Not enough funds"); claimed[_receiver] += _quantity; _safeMint(_receiver, _quantity); emit minted(msg.sender, _receiver, _quantity); } function ownerMint(address _receiver, uint256 _quantity) public onlyOwner { require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply over"); _safeMint(_receiver, _quantity); emit minted(msg.sender, _receiver, _quantity); } function setBaseURI(string calldata _uri) external onlyOwner { _baseTokenURI = _uri; } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { merkleRoot = _merkleRoot; } function setPresale(bool _state) public onlyOwner { preSaleStart = _state; } function setPubsale(bool _state) public onlyOwner { pubSaleStart = _state; } function setMintLimit(uint256 _quantity) public onlyOwner { mintLimit = _quantity; } struct ProjectMember { address soundDesert; address onigiriman; address ruriho; address artKungFu; address mai; address hayamiAsuka; address ciana; address musician; } ProjectMember private _member; function setMemberAddress( address _soundDesert, address _onigiriman, address _ruriho, address _artKungFu, address _mai, address _hayamiAsuka, address _ciana, address _musician ) public onlyOwner { _member.soundDesert = _soundDesert; _member.onigiriman = _onigiriman; _member.ruriho = _ruriho; _member.artKungFu = _artKungFu; _member.mai = _mai; _member.hayamiAsuka = _hayamiAsuka; _member.ciana = _ciana; _member.musician = _musician; } function withdraw() external onlyOwner { require( _member.soundDesert != address(0) && _member.onigiriman != address(0) && _member.ruriho != address(0) && _member.artKungFu != address(0) && _member.mai != address(0) && _member.hayamiAsuka != address(0) && _member.ciana != address(0) && _member.musician != address(0), "Please set members address" ); uint256 balance = address(this).balance; Address.sendValue( payable(_member.soundDesert), ((balance * 2000) / 10000) ); Address.sendValue( payable(_member.onigiriman), ((balance * 600) / 10000) ); Address.sendValue(payable(_member.ruriho), ((balance * 600) / 10000)); Address.sendValue( payable(_member.artKungFu), ((balance * 1500) / 10000) ); Address.sendValue(payable(_member.mai), ((balance * 600) / 10000)); Address.sendValue( payable(_member.hayamiAsuka), ((balance * 1100) / 10000) ); Address.sendValue(payable(_member.ciana), ((balance * 600) / 10000)); Address.sendValue( payable(_member.musician), ((balance * 3000) / 10000) ); } function setOperatorFilteringEnabled(bool _state) external onlyOwner { operatorFilteringEnabled = _state; } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function setRoyalty( address _royaltyAddress, uint96 _feeNumerator ) external onlyOwner { _setDefaultRoyalty(_royaltyAddress, _feeNumerator); } function supportsInterface( bytes4 _interfaceId ) public view virtual override(ERC721Psi, ERC2981) returns (bool) { return ERC721Psi.supportsInterface(_interfaceId) || ERC2981.supportsInterface(_interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// =================================================== // tokenIdの開始を1からにする場合はこちらをご利用ください // =================================================== // SPDX-License-Identifier: MIT /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; import "solidity-bits/contracts/BitMaps.sol"; contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _batchHead; string private _name; string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; uint256 internal _minted = 1; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint) { require(owner != address(0), "ERC721Psi: balance query for the zero address"); uint count; for( uint i = 1; i < _minted; ++i ){ if(_exists(i)){ if( owner == ownerOf(i)){ ++count; } } } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { (address owner, ) = _ownerAndBatchHeadOf(tokenId); return owner; } function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){ require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token"); tokenIdBatchHead = _getBatchHead(tokenId); owner = _owners[tokenIdBatchHead]; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Psi: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, "ERC721Psi: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721Psi: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require( _exists(tokenId), "ERC721Psi: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721Psi: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: transfer caller is not owner nor approved" ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, 1,_data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _minted; } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require( _exists(tokenId), "ERC721Psi: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { uint256 startTokenId = _minted; _mint(to, quantity); require( _checkOnERC721Received(address(0), to, startTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 tokenIdBatchHead = _minted; require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity); _minted += quantity; _owners[tokenIdBatchHead] = to; _batchHead.set(tokenIdBatchHead); _afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity); // Emit events for(uint256 tokenId=tokenIdBatchHead;tokenId < tokenIdBatchHead + quantity; tokenId++){ emit Transfer(address(0), to, tokenId); } } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId); require( owner == from, "ERC721Psi: transfer of token that is not own" ); require(to != address(0), "ERC721Psi: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId); uint256 nextTokenId = tokenId + 1; if(!_batchHead.get(nextTokenId) && nextTokenId < _minted ) { _owners[nextTokenId] = from; _batchHead.set(nextTokenId); } _owners[tokenId] = to; if(tokenId != tokenIdBatchHead) { _batchHead.set(tokenId); } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param startTokenId uint256 the first ID of the tokens to be transferred * @param quantity uint256 amount of the tokens to be transfered. * @param _data bytes optional data to send along with the call * @return r bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 startTokenId, uint256 quantity, bytes memory _data ) private returns (bool r) { if (to.isContract()) { r = true; for(uint256 tokenId = startTokenId; tokenId < startTokenId + quantity; tokenId++){ try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { r = r && retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Psi: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return r; } else { return true; } } function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) { tokenIdBatchHead = _batchHead.scanForward(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _minted - 1; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { require(index < totalSupply(), "ERC721Psi: global index out of bounds"); uint count; for(uint i = 1; i < _minted; i++){ if(_exists(i)){ if(count == index) return i; else count++; } } } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { uint count; for(uint i = 1; i < _minted; i++){ if(_exists(i) && owner == ownerOf(i)){ if(count == index) return i; else count++; } } revert("ERC721Psi: owner index out of bounds"); } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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 simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 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 from 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) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 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 from 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) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { 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 // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); bool public operatorFilteringEnabled = true; IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0 && operatorFilteringEnabled) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; import "./BitScan.sol"; import "./Popcount.sol"; /** * @dev This Library is a modified version of Openzeppelin's BitMaps library with extra features. * * 1. Functions of finding the index of the closest set bit from a given index are added. * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB. * The modification of indexing makes finding the closest previous set bit more efficient in gas usage. * 2. Setting and unsetting the bitmap consecutively. * 3. Accounting number of set bits within a given range. * */ /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { using BitScan for uint256; uint256 private constant MASK_INDEX_ZERO = (1 << 255); uint256 private constant MASK_FULL = type(uint256).max; struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] &= ~mask; } /** * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`. */ function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex; } else { bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex; amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = MASK_FULL; amount -= 256; bucket++; } bitmap._data[bucket] |= MASK_FULL << (256 - amount); } } } /** * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`. */ function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex); } else { bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = 0; amount -= 256; bucket++; } bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount)); } } } /** * @dev Returns number of set bits within a range. */ function popcountA(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex) ); } else { count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex) ); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { count += Popcount.popcount256A(bitmap._data[bucket]); amount -= 256; bucket++; } count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL << (256 - amount)) ); } } } /** * @dev Returns number of set bits within a range. */ function popcountB(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex) ); } else { count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex) ); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { count += Popcount.popcount256B(bitmap._data[bucket]); amount -= 256; bucket++; } count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL << (256 - amount)) ); } } } /** * @dev Find the closest index of the set bit before `index`. */ function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) { uint256 bucket = index >> 8; // index within the bucket uint256 bucketIndex = (index & 0xff); // load a bitboard from the bitmap. uint256 bb = bitmap._data[bucket]; // offset the bitboard to scan from `bucketIndex`. bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex) if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256()); } } else { while(true) { require(bucket > 0, "BitMaps: The set bit before the index doesn't exist."); unchecked { bucket--; } // No offset. Always scan from the least significiant bit now. bb = bitmap._data[bucket]; if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256()); break; } } } } } function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) { return bitmap._data[bucket]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; library Popcount { uint256 private constant m1 = 0x5555555555555555555555555555555555555555555555555555555555555555; uint256 private constant m2 = 0x3333333333333333333333333333333333333333333333333333333333333333; uint256 private constant m4 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f; uint256 private constant h01 = 0x0101010101010101010101010101010101010101010101010101010101010101; function popcount256A(uint256 x) internal pure returns (uint256 count) { unchecked{ for (count=0; x!=0; count++) x &= x - 1; } } function popcount256B(uint256 x) internal pure returns (uint256) { if (x == type(uint256).max) { return 256; } unchecked { x -= (x >> 1) & m1; //put count of each 2 bits into those 2 bits x = (x & m2) + ((x >> 2) & m2); //put count of each 4 bits into those 4 bits x = (x + (x >> 4)) & m4; //put count of each 8 bits into those 8 bits x = (x * h01) >> 248; //returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ... } return x; } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; library BitScan { uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff; bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8"; /** @dev Isolate the least significant set bit. */ function isolateLS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { return bb & (0 - bb); } } /** @dev Isolate the most significant set bit. */ function isolateMS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { bb |= bb >> 128; bb |= bb >> 64; bb |= bb >> 32; bb |= bb >> 16; bb |= bb >> 8; bb |= bb >> 4; bb |= bb >> 2; bb |= bb >> 1; return (bb >> 1) + 1; } } /** @dev Find the index of the lest significant set bit. (trailing zero count) */ function bitScanForward256(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]); } } /** @dev Find the index of the most significant set bit. */ function bitScanReverse256(uint256 bb) pure internal returns (uint8) { unchecked { return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]); } } function log2(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// 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 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"minted","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUB_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"checkMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintLimit","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":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"preMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"preSaleStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"pubMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pubSaleStart","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":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_soundDesert","type":"address"},{"internalType":"address","name":"_onigiriman","type":"address"},{"internalType":"address","name":"_ruriho","type":"address"},{"internalType":"address","name":"_artKungFu","type":"address"},{"internalType":"address","name":"_mai","type":"address"},{"internalType":"address","name":"_hayamiAsuka","type":"address"},{"internalType":"address","name":"_ciana","type":"address"},{"internalType":"address","name":"_musician","type":"address"}],"name":"setMemberAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPubsale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260016004819055600b805460ff191690911790556005600c553480156200002a57600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280600b81526020016a4e46547843204d7573696360a81b815250604051806040016040528060068152602001654e465458434d60d01b81525081600190816200009691906200030f565b506002620000a582826200030f565b505050620000c2620000bc6200021460201b60201c565b62000218565b6001600a556daaeb6d7670e522a718067333cd4e3b156200020c5780156200015a57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200013b57600080fd5b505af115801562000150573d6000803e3d6000fd5b505050506200020c565b6001600160a01b03821615620001ab5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000120565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001f257600080fd5b505af115801562000207573d6000803e3d6000fd5b505050505b5050620003db565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200029557607f821691505b602082108103620002b657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200030a57600081815260208120601f850160051c81016020861015620002e55750805b601f850160051c820191505b818110156200030657828155600101620002f1565b5050505b505050565b81516001600160401b038111156200032b576200032b6200026a565b62000343816200033c845462000280565b84620002bc565b602080601f8311600181146200037b5760008415620003625750858301515b600019600386901b1c1916600185901b17855562000306565b600085815260208120601f198616915b82811015620003ac578886015182559484019460019091019084016200038b565b5085821015620003cb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61316880620003eb6000396000f3fe60806040526004361061025c5760003560e01c806370a0823111610144578063b472070f116100b6578063c87b56dd1161007a578063c87b56dd146106d5578063c884ef83146106f5578063cfd9480b14610722578063e985e9c514610742578063f2fde38b1461078b578063fb796e6c146107ab57600080fd5b8063b472070f146104b6578063b7c0b8e814610662578063b88d4fde14610682578063c54e73e3146106a2578063c67add3a146106c257600080fd5b806395d89b411161010857806395d89b41146105b7578063996517cf146105cc5780639e6a1d7d146105e2578063a1f7628e14610602578063a22cb46514610622578063a9a382621461064257600080fd5b806370a0823114610524578063715018a6146105445780637cb64759146105595780638da5cb5b146105795780638f2fc60b1461059757600080fd5b80632f745c59116101dd578063484b973c116101a1578063484b973c146104765780634f6ccce714610496578063556fedd2146104b657806355f804b3146104d15780635a546223146104f15780636352211e1461050457600080fd5b80632f745c59146103e957806332cb6b0c146104095780633ccfd60b1461041f57806341f434341461043457806342842e0e1461045657600080fd5b806318160ddd1161022457806318160ddd146103315780631ad4de591461035457806323b872dd146103745780632a55205a146103945780632eb4a7ab146103d357600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f05780630d5624b314610312575b600080fd5b34801561026d57600080fd5b5061028161027c366004612797565b6107c5565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab6107e5565b60405161028d9190612804565b3480156102c457600080fd5b506102d86102d3366004612817565b610877565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b36600461284c565b610909565b005b34801561031e57600080fd5b50600b5461028190610100900460ff1681565b34801561033d57600080fd5b50610346610922565b60405190815260200161028d565b34801561036057600080fd5b5061031061036f366004612884565b610938565b34801561038057600080fd5b5061031061038f3660046128a1565b61095c565b3480156103a057600080fd5b506103b46103af3660046128dd565b610987565b604080516001600160a01b03909316835260208301919091520161028d565b3480156103df57600080fd5b50610346600d5481565b3480156103f557600080fd5b5061034661040436600461284c565b610a35565b34801561041557600080fd5b5061034661030981565b34801561042b57600080fd5b50610310610aff565b34801561044057600080fd5b506102d86daaeb6d7670e522a718067333cd4e81565b34801561046257600080fd5b506103106104713660046128a1565b610d07565b34801561048257600080fd5b5061031061049136600461284c565b610d2c565b3480156104a257600080fd5b506103466104b1366004612817565b610dae565b3480156104c257600080fd5b50610346661b5b1bf4c5400081565b3480156104dd57600080fd5b506103106104ec3660046128ff565b610e68565b6103106104ff3660046129b6565b610e7d565b34801561051057600080fd5b506102d861051f366004612817565b6110b6565b34801561053057600080fd5b5061034661053f366004612a02565b6110ca565b34801561055057600080fd5b5061031061119b565b34801561056557600080fd5b50610310610574366004612817565b6111af565b34801561058557600080fd5b506009546001600160a01b03166102d8565b3480156105a357600080fd5b506103106105b2366004612a1d565b6111bc565b3480156105c357600080fd5b506102ab6111d2565b3480156105d857600080fd5b50610346600c5481565b3480156105ee57600080fd5b506103106105fd366004612817565b6111e1565b34801561060e57600080fd5b5061031061061d366004612a60565b6111ee565b34801561062e57600080fd5b5061031061063d366004612af7565b611284565b34801561064e57600080fd5b5061028161065d366004612b23565b611298565b34801561066e57600080fd5b5061031061067d366004612884565b6112e9565b34801561068e57600080fd5b5061031061069d366004612b7b565b611304565b3480156106ae57600080fd5b506103106106bd366004612884565b611331565b6103106106d0366004612c57565b611353565b3480156106e157600080fd5b506102ab6106f0366004612817565b6114a9565b34801561070157600080fd5b50610346610710366004612a02565b600f6020526000908152604090205481565b34801561072e57600080fd5b50600b546102819062010000900460ff1681565b34801561074e57600080fd5b5061028161075d366004612c83565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561079757600080fd5b506103106107a6366004612a02565b6114da565b3480156107b757600080fd5b50600b546102819060ff1681565b60006107d082611550565b806107df57506107df826115bb565b92915050565b6060600180546107f490612cad565b80601f016020809104026020016040519081016040528092919081815260200182805461082090612cad565b801561086d5780601f106108425761010080835404028352916020019161086d565b820191906000526020600020905b81548152906001019060200180831161085057829003601f168201915b5050505050905090565b6000610884826004541190565b6108ed5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b81610913816115e0565b61091d83836116a9565b505050565b600060016004546109339190612cfd565b905090565b6109406117bb565b600b8054911515620100000262ff000019909216919091179055565b826001600160a01b038116331461097657610976336115e0565b610981848484611815565b50505050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109fc5750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a1b906001600160601b031687612d10565b610a259190612d27565b91519350909150505b9250929050565b60008060015b600454811015610aaa57610a50816004541190565b8015610a755750610a60816110b6565b6001600160a01b0316856001600160a01b0316145b15610a9857838203610a8a5791506107df9050565b81610a9481612d49565b9250505b80610aa281612d49565b915050610a3b565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b60648201526084016108e4565b610b076117bb565b6010546001600160a01b031615801590610b2b57506011546001600160a01b031615155b8015610b4157506012546001600160a01b031615155b8015610b5757506013546001600160a01b031615155b8015610b6d57506014546001600160a01b031615155b8015610b8357506015546001600160a01b031615155b8015610b9957506016546001600160a01b031615155b8015610baf57506017546001600160a01b031615155b610bfb5760405162461bcd60e51b815260206004820152601a60248201527f506c6561736520736574206d656d62657273206164647265737300000000000060448201526064016108e4565b6010544790610c2b906001600160a01b0316612710610c1c846107d0612d10565b610c269190612d27565b611846565b601154610c4a906001600160a01b0316612710610c1c84610258612d10565b601254610c69906001600160a01b0316612710610c1c84610258612d10565b601354610c88906001600160a01b0316612710610c1c846105dc612d10565b601454610ca7906001600160a01b0316612710610c1c84610258612d10565b601554610cc6906001600160a01b0316612710610c1c8461044c612d10565b601654610ce5906001600160a01b0316612710610c1c84610258612d10565b601754610d04906001600160a01b0316612710610c1c84610bb8612d10565b50565b826001600160a01b0381163314610d2157610d21336115e0565b61098184848461195f565b610d346117bb565b61030981610d40610922565b610d4a9190612d62565b1115610d685760405162461bcd60e51b81526004016108e490612d75565b610d72828261197a565b60405181906001600160a01b0384169033907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a45050565b6000610db8610922565b8210610e145760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b60648201526084016108e4565b600060015b600454811015610e6157610e2e816004541190565b15610e4f57838203610e41579392505050565b81610e4b81612d49565b9250505b80610e5981612d49565b915050610e19565b5050919050565b610e706117bb565b600e61091d828483612de4565b610e85611994565b600b54610100900460ff16610ed15760405162461bcd60e51b81526020600482015260126024820152712132b337b9329039b0b632903132b3b4b71760711b60448201526064016108e4565b61030983610edd610922565b610ee79190612d62565b1115610f055760405162461bcd60e51b81526004016108e490612d75565b610f1683661b5b1bf4c54000612d10565b341015610f585760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b60448201526064016108e4565b600c54831115610f9f5760405162461bcd60e51b815260206004820152601260248201527126b4b73a1038bab0b73a34ba3c9037bb32b960711b60448201526064016108e4565b600c54336000908152600f6020526040902054610fbd908590612d62565b11156110015760405162461bcd60e51b8152602060048201526013602482015272082d8e4cac2c8f240c6d8c2d2dacac840dac2f606b1b60448201526064016108e4565b61100b8282611298565b61104e5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21026b2b935b63290283937b7b360611b60448201526064016108e4565b336000908152600f60205260408120805485929061106d908490612d62565b9091555061107d9050338461197a565b6040518390339081907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a461091d6001600a55565b6000806110c2836119ed565b509392505050565b60006001600160a01b0382166111385760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b60648201526084016108e4565b600060015b60045481101561119457611152816004541190565b1561118457611160816110b6565b6001600160a01b0316846001600160a01b0316036111845761118182612d49565b91505b61118d81612d49565b905061113d565b5092915050565b6111a36117bb565b6111ad6000611a86565b565b6111b76117bb565b600d55565b6111c46117bb565b6111ce8282611ad8565b5050565b6060600280546107f490612cad565b6111e96117bb565b600c55565b6111f66117bb565b601080546001600160a01b03199081166001600160a01b039a8b1617909155601180548216988a1698909817909755601280548816968916969096179095556013805487169488169490941790935560148054861692871692909217909155601580548516918616919091179055601680548416918516919091179055601780549092169216919091179055565b8161128e816115e0565b61091d8383611bd5565b6040516bffffffffffffffffffffffff193360601b16602082015260009081906034016040516020818303038152906040528051906020012090506112e18484600d5484611c99565b949350505050565b6112f16117bb565b600b805460ff1916911515919091179055565b836001600160a01b038116331461131e5761131e336115e0565b61132a85858585611cb1565b5050505050565b6113396117bb565b600b80549115156101000261ff0019909216919091179055565b61135b611994565b600b5462010000900460ff166113a85760405162461bcd60e51b81526020600482015260126024820152712132b337b9329039b0b632903132b3b4b71760711b60448201526064016108e4565b610309826113b4610922565b6113be9190612d62565b11156113dc5760405162461bcd60e51b81526004016108e490612d75565b6113ed82661b5b1bf4c54000612d10565b34101561142f5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b60448201526064016108e4565b6001600160a01b0381166000908152600f602052604081208054849290611457908490612d62565b909155506114679050818361197a565b60405182906001600160a01b0383169033907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a46111ce6001600a55565b60606114b482611ce3565b6040516020016114c49190612ea4565b6040516020818303038152906040529050919050565b6114e26117bb565b6001600160a01b0381166115475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108e4565b610d0481611a86565b60006001600160e01b031982166380ac58cd60e01b148061158157506001600160e01b03198216635b5e139f60e01b145b8061159c57506001600160e01b0319821663780e9d6360e01b145b806107df57506301ffc9a760e01b6001600160e01b03198316146107df565b60006001600160e01b0319821663152a902d60e11b14806107df57506107df82611550565b6daaeb6d7670e522a718067333cd4e3b158015906116005750600b5460ff165b15610d0457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612ecd565b610d0457604051633b79c77360e21b81526001600160a01b03821660048201526024016108e4565b60006116b4826110b6565b9050806001600160a01b0316836001600160a01b0316036117235760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016108e4565b336001600160a01b038216148061173f575061173f813361075d565b6117b15760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016108e4565b61091d8383611dab565b6009546001600160a01b031633146111ad5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108e4565b61181f3382611e19565b61183b5760405162461bcd60e51b81526004016108e490612eea565b61091d838383611f04565b804710156118965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108e4565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146118e3576040519150601f19603f3d011682016040523d82523d6000602084013e6118e8565b606091505b505090508061091d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108e4565b61091d83838360405180602001604052806000815250611304565b6111ce8282604051806020016040528060008152506120f1565b6002600a54036119e65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108e4565b6002600a55565b6000806119fb836004541190565b611a5c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108e4565b611a6583612128565b6000818152600360205260409020546001600160a01b031694909350915050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115611b465760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016108e4565b6001600160a01b038216611b9c5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108e4565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600755565b336001600160a01b03831603611c2d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016108e4565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600082611ca7868685612134565b1495945050505050565b611cbb3383611e19565b611cd75760405162461bcd60e51b81526004016108e490612eea565b61098184848484612180565b6060611cf0826004541190565b611d4f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016108e4565b6000611d59612199565b90506000815111611d795760405180602001604052806000815250611da4565b80611d83846121a8565b604051602001611d94929190612f3e565b6040516020818303038152906040525b9392505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de0826110b6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611e26826004541190565b611e8a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108e4565b6000611e95836110b6565b9050806001600160a01b0316846001600160a01b03161480611ed05750836001600160a01b0316611ec584610877565b6001600160a01b0316145b806112e157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff166112e1565b600080611f10836119ed565b91509150846001600160a01b0316826001600160a01b031614611f8a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b60648201526084016108e4565b6001600160a01b038416611ff05760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b60648201526084016108e4565b611ffb600084611dab565b6000612008846001612d62565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612038575060045481105b1561206e57600081815260036020526040812080546001600160a01b0319166001600160a01b03891617905561206e908261223b565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146120a7576120a760008561223b565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6004546120fe8484612267565b61210c6000858386866123cc565b6109815760405162461bcd60e51b81526004016108e490612f6d565b60006107df8183612503565b600081815b84811015612177576121638287878481811061215757612157612fc2565b905060200201356125fb565b91508061216f81612d49565b915050612139565b50949350505050565b61218b848484611f04565b61210c8484846001856123cc565b6060600e80546107f490612cad565b606060006121b583612627565b600101905060008167ffffffffffffffff8111156121d5576121d5612b65565b6040519080825280601f01601f1916602001820160405280156121ff576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461220957509392505050565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600454816122c55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b60648201526084016108e4565b6001600160a01b0383166123275760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108e4565b81600460008282546123399190612d62565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b03861617905561236f908261223b565b805b61237b8383612d62565b8110156109815760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806123c481612d49565b915050612371565b60006001600160a01b0385163b156124f657506001835b6123ed8486612d62565b8110156124f057604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906124269033908b9086908990600401612fd8565b6020604051808303816000875af1925050508015612461575060408051601f3d908101601f1916820190925261245e91810190613015565b60015b6124be573d80801561248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5080516000036124b65760405162461bcd60e51b81526004016108e490612f6d565b805181602001fd5b8280156124db57506001600160e01b03198116630a85bd0160e11b145b925050806124e881612d49565b9150506123e3565b506124fa565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c801561254557612533816126ff565b60ff168203600884901b1793506125f2565b600083116125b25760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b60648201526084016108e4565b5060001990910160008181526020869052604090205490919080156125ed576125da816126ff565b60ff0360ff16600884901b1793506125f2565b612545565b50505092915050565b6000818310612617576000828152602084905260409020611da4565b5060009182526020526040902090565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106126665772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612692576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106126b057662386f26fc10000830492506010015b6305f5e10083106126c8576305f5e100830492506008015b61271083106126dc57612710830492506004015b606483106126ee576064830492506002015b600a83106107df5760010192915050565b60006040518061012001604052806101008152602001613033610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61274885612769565b02901c8151811061275b5761275b612fc2565b016020015160f81c92915050565b600080821161277757600080fd5b5060008190031690565b6001600160e01b031981168114610d0457600080fd5b6000602082840312156127a957600080fd5b8135611da481612781565b60005b838110156127cf5781810151838201526020016127b7565b50506000910152565b600081518084526127f08160208601602086016127b4565b601f01601f19169290920160200192915050565b602081526000611da460208301846127d8565b60006020828403121561282957600080fd5b5035919050565b80356001600160a01b038116811461284757600080fd5b919050565b6000806040838503121561285f57600080fd5b61286883612830565b946020939093013593505050565b8015158114610d0457600080fd5b60006020828403121561289657600080fd5b8135611da481612876565b6000806000606084860312156128b657600080fd5b6128bf84612830565b92506128cd60208501612830565b9150604084013590509250925092565b600080604083850312156128f057600080fd5b50508035926020909101359150565b6000806020838503121561291257600080fd5b823567ffffffffffffffff8082111561292a57600080fd5b818501915085601f83011261293e57600080fd5b81358181111561294d57600080fd5b86602082850101111561295f57600080fd5b60209290920196919550909350505050565b60008083601f84011261298357600080fd5b50813567ffffffffffffffff81111561299b57600080fd5b6020830191508360208260051b8501011115610a2e57600080fd5b6000806000604084860312156129cb57600080fd5b83359250602084013567ffffffffffffffff8111156129e957600080fd5b6129f586828701612971565b9497909650939450505050565b600060208284031215612a1457600080fd5b611da482612830565b60008060408385031215612a3057600080fd5b612a3983612830565b915060208301356001600160601b0381168114612a5557600080fd5b809150509250929050565b600080600080600080600080610100898b031215612a7d57600080fd5b612a8689612830565b9750612a9460208a01612830565b9650612aa260408a01612830565b9550612ab060608a01612830565b9450612abe60808a01612830565b9350612acc60a08a01612830565b9250612ada60c08a01612830565b9150612ae860e08a01612830565b90509295985092959890939650565b60008060408385031215612b0a57600080fd5b612b1383612830565b91506020830135612a5581612876565b60008060208385031215612b3657600080fd5b823567ffffffffffffffff811115612b4d57600080fd5b612b5985828601612971565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612b9157600080fd5b612b9a85612830565b9350612ba860208601612830565b925060408501359150606085013567ffffffffffffffff80821115612bcc57600080fd5b818701915087601f830112612be057600080fd5b813581811115612bf257612bf2612b65565b604051601f8201601f19908116603f01168101908382118183101715612c1a57612c1a612b65565b816040528281528a6020848701011115612c3357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215612c6a57600080fd5b82359150612c7a60208401612830565b90509250929050565b60008060408385031215612c9657600080fd5b612c9f83612830565b9150612c7a60208401612830565b600181811c90821680612cc157607f821691505b602082108103612ce157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156107df576107df612ce7565b80820281158282048414176107df576107df612ce7565b600082612d4457634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612d5b57612d5b612ce7565b5060010190565b808201808211156107df576107df612ce7565b6020808252600f908201526e26b0bc1039bab838363c9037bb32b960891b604082015260600190565b601f82111561091d57600081815260208120601f850160051c81016020861015612dc55750805b601f850160051c820191505b818110156120e957828155600101612dd1565b67ffffffffffffffff831115612dfc57612dfc612b65565b612e1083612e0a8354612cad565b83612d9e565b6000601f841160018114612e445760008515612e2c5750838201355b600019600387901b1c1916600186901b17835561132a565b600083815260209020601f19861690835b82811015612e755786850135825560209485019460019092019101612e55565b5086821015612e925760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008251612eb68184602087016127b4565b64173539b7b760d91b920191825250600501919050565b600060208284031215612edf57600080fd5b8151611da481612876565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60008351612f508184602088016127b4565b835190830190612f648183602088016127b4565b01949350505050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061300b908301846127d8565b9695505050505050565b60006020828403121561302757600080fd5b8151611da48161278156fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220c775a7faab66606a97cd6cf990cabbb33c7421ce5879c1b364bc3b8dbfe966a964736f6c63430008120033
Deployed Bytecode
0x60806040526004361061025c5760003560e01c806370a0823111610144578063b472070f116100b6578063c87b56dd1161007a578063c87b56dd146106d5578063c884ef83146106f5578063cfd9480b14610722578063e985e9c514610742578063f2fde38b1461078b578063fb796e6c146107ab57600080fd5b8063b472070f146104b6578063b7c0b8e814610662578063b88d4fde14610682578063c54e73e3146106a2578063c67add3a146106c257600080fd5b806395d89b411161010857806395d89b41146105b7578063996517cf146105cc5780639e6a1d7d146105e2578063a1f7628e14610602578063a22cb46514610622578063a9a382621461064257600080fd5b806370a0823114610524578063715018a6146105445780637cb64759146105595780638da5cb5b146105795780638f2fc60b1461059757600080fd5b80632f745c59116101dd578063484b973c116101a1578063484b973c146104765780634f6ccce714610496578063556fedd2146104b657806355f804b3146104d15780635a546223146104f15780636352211e1461050457600080fd5b80632f745c59146103e957806332cb6b0c146104095780633ccfd60b1461041f57806341f434341461043457806342842e0e1461045657600080fd5b806318160ddd1161022457806318160ddd146103315780631ad4de591461035457806323b872dd146103745780632a55205a146103945780632eb4a7ab146103d357600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f05780630d5624b314610312575b600080fd5b34801561026d57600080fd5b5061028161027c366004612797565b6107c5565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab6107e5565b60405161028d9190612804565b3480156102c457600080fd5b506102d86102d3366004612817565b610877565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b36600461284c565b610909565b005b34801561031e57600080fd5b50600b5461028190610100900460ff1681565b34801561033d57600080fd5b50610346610922565b60405190815260200161028d565b34801561036057600080fd5b5061031061036f366004612884565b610938565b34801561038057600080fd5b5061031061038f3660046128a1565b61095c565b3480156103a057600080fd5b506103b46103af3660046128dd565b610987565b604080516001600160a01b03909316835260208301919091520161028d565b3480156103df57600080fd5b50610346600d5481565b3480156103f557600080fd5b5061034661040436600461284c565b610a35565b34801561041557600080fd5b5061034661030981565b34801561042b57600080fd5b50610310610aff565b34801561044057600080fd5b506102d86daaeb6d7670e522a718067333cd4e81565b34801561046257600080fd5b506103106104713660046128a1565b610d07565b34801561048257600080fd5b5061031061049136600461284c565b610d2c565b3480156104a257600080fd5b506103466104b1366004612817565b610dae565b3480156104c257600080fd5b50610346661b5b1bf4c5400081565b3480156104dd57600080fd5b506103106104ec3660046128ff565b610e68565b6103106104ff3660046129b6565b610e7d565b34801561051057600080fd5b506102d861051f366004612817565b6110b6565b34801561053057600080fd5b5061034661053f366004612a02565b6110ca565b34801561055057600080fd5b5061031061119b565b34801561056557600080fd5b50610310610574366004612817565b6111af565b34801561058557600080fd5b506009546001600160a01b03166102d8565b3480156105a357600080fd5b506103106105b2366004612a1d565b6111bc565b3480156105c357600080fd5b506102ab6111d2565b3480156105d857600080fd5b50610346600c5481565b3480156105ee57600080fd5b506103106105fd366004612817565b6111e1565b34801561060e57600080fd5b5061031061061d366004612a60565b6111ee565b34801561062e57600080fd5b5061031061063d366004612af7565b611284565b34801561064e57600080fd5b5061028161065d366004612b23565b611298565b34801561066e57600080fd5b5061031061067d366004612884565b6112e9565b34801561068e57600080fd5b5061031061069d366004612b7b565b611304565b3480156106ae57600080fd5b506103106106bd366004612884565b611331565b6103106106d0366004612c57565b611353565b3480156106e157600080fd5b506102ab6106f0366004612817565b6114a9565b34801561070157600080fd5b50610346610710366004612a02565b600f6020526000908152604090205481565b34801561072e57600080fd5b50600b546102819062010000900460ff1681565b34801561074e57600080fd5b5061028161075d366004612c83565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561079757600080fd5b506103106107a6366004612a02565b6114da565b3480156107b757600080fd5b50600b546102819060ff1681565b60006107d082611550565b806107df57506107df826115bb565b92915050565b6060600180546107f490612cad565b80601f016020809104026020016040519081016040528092919081815260200182805461082090612cad565b801561086d5780601f106108425761010080835404028352916020019161086d565b820191906000526020600020905b81548152906001019060200180831161085057829003601f168201915b5050505050905090565b6000610884826004541190565b6108ed5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b81610913816115e0565b61091d83836116a9565b505050565b600060016004546109339190612cfd565b905090565b6109406117bb565b600b8054911515620100000262ff000019909216919091179055565b826001600160a01b038116331461097657610976336115e0565b610981848484611815565b50505050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109fc5750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a1b906001600160601b031687612d10565b610a259190612d27565b91519350909150505b9250929050565b60008060015b600454811015610aaa57610a50816004541190565b8015610a755750610a60816110b6565b6001600160a01b0316856001600160a01b0316145b15610a9857838203610a8a5791506107df9050565b81610a9481612d49565b9250505b80610aa281612d49565b915050610a3b565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b60648201526084016108e4565b610b076117bb565b6010546001600160a01b031615801590610b2b57506011546001600160a01b031615155b8015610b4157506012546001600160a01b031615155b8015610b5757506013546001600160a01b031615155b8015610b6d57506014546001600160a01b031615155b8015610b8357506015546001600160a01b031615155b8015610b9957506016546001600160a01b031615155b8015610baf57506017546001600160a01b031615155b610bfb5760405162461bcd60e51b815260206004820152601a60248201527f506c6561736520736574206d656d62657273206164647265737300000000000060448201526064016108e4565b6010544790610c2b906001600160a01b0316612710610c1c846107d0612d10565b610c269190612d27565b611846565b601154610c4a906001600160a01b0316612710610c1c84610258612d10565b601254610c69906001600160a01b0316612710610c1c84610258612d10565b601354610c88906001600160a01b0316612710610c1c846105dc612d10565b601454610ca7906001600160a01b0316612710610c1c84610258612d10565b601554610cc6906001600160a01b0316612710610c1c8461044c612d10565b601654610ce5906001600160a01b0316612710610c1c84610258612d10565b601754610d04906001600160a01b0316612710610c1c84610bb8612d10565b50565b826001600160a01b0381163314610d2157610d21336115e0565b61098184848461195f565b610d346117bb565b61030981610d40610922565b610d4a9190612d62565b1115610d685760405162461bcd60e51b81526004016108e490612d75565b610d72828261197a565b60405181906001600160a01b0384169033907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a45050565b6000610db8610922565b8210610e145760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b60648201526084016108e4565b600060015b600454811015610e6157610e2e816004541190565b15610e4f57838203610e41579392505050565b81610e4b81612d49565b9250505b80610e5981612d49565b915050610e19565b5050919050565b610e706117bb565b600e61091d828483612de4565b610e85611994565b600b54610100900460ff16610ed15760405162461bcd60e51b81526020600482015260126024820152712132b337b9329039b0b632903132b3b4b71760711b60448201526064016108e4565b61030983610edd610922565b610ee79190612d62565b1115610f055760405162461bcd60e51b81526004016108e490612d75565b610f1683661b5b1bf4c54000612d10565b341015610f585760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b60448201526064016108e4565b600c54831115610f9f5760405162461bcd60e51b815260206004820152601260248201527126b4b73a1038bab0b73a34ba3c9037bb32b960711b60448201526064016108e4565b600c54336000908152600f6020526040902054610fbd908590612d62565b11156110015760405162461bcd60e51b8152602060048201526013602482015272082d8e4cac2c8f240c6d8c2d2dacac840dac2f606b1b60448201526064016108e4565b61100b8282611298565b61104e5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21026b2b935b63290283937b7b360611b60448201526064016108e4565b336000908152600f60205260408120805485929061106d908490612d62565b9091555061107d9050338461197a565b6040518390339081907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a461091d6001600a55565b6000806110c2836119ed565b509392505050565b60006001600160a01b0382166111385760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b60648201526084016108e4565b600060015b60045481101561119457611152816004541190565b1561118457611160816110b6565b6001600160a01b0316846001600160a01b0316036111845761118182612d49565b91505b61118d81612d49565b905061113d565b5092915050565b6111a36117bb565b6111ad6000611a86565b565b6111b76117bb565b600d55565b6111c46117bb565b6111ce8282611ad8565b5050565b6060600280546107f490612cad565b6111e96117bb565b600c55565b6111f66117bb565b601080546001600160a01b03199081166001600160a01b039a8b1617909155601180548216988a1698909817909755601280548816968916969096179095556013805487169488169490941790935560148054861692871692909217909155601580548516918616919091179055601680548416918516919091179055601780549092169216919091179055565b8161128e816115e0565b61091d8383611bd5565b6040516bffffffffffffffffffffffff193360601b16602082015260009081906034016040516020818303038152906040528051906020012090506112e18484600d5484611c99565b949350505050565b6112f16117bb565b600b805460ff1916911515919091179055565b836001600160a01b038116331461131e5761131e336115e0565b61132a85858585611cb1565b5050505050565b6113396117bb565b600b80549115156101000261ff0019909216919091179055565b61135b611994565b600b5462010000900460ff166113a85760405162461bcd60e51b81526020600482015260126024820152712132b337b9329039b0b632903132b3b4b71760711b60448201526064016108e4565b610309826113b4610922565b6113be9190612d62565b11156113dc5760405162461bcd60e51b81526004016108e490612d75565b6113ed82661b5b1bf4c54000612d10565b34101561142f5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b60448201526064016108e4565b6001600160a01b0381166000908152600f602052604081208054849290611457908490612d62565b909155506114679050818361197a565b60405182906001600160a01b0383169033907fe46b50d0a0bf8b2bd44aa8a4e4dd346ba0e8b35d8a438c6ce48d1910401b302390600090a46111ce6001600a55565b60606114b482611ce3565b6040516020016114c49190612ea4565b6040516020818303038152906040529050919050565b6114e26117bb565b6001600160a01b0381166115475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108e4565b610d0481611a86565b60006001600160e01b031982166380ac58cd60e01b148061158157506001600160e01b03198216635b5e139f60e01b145b8061159c57506001600160e01b0319821663780e9d6360e01b145b806107df57506301ffc9a760e01b6001600160e01b03198316146107df565b60006001600160e01b0319821663152a902d60e11b14806107df57506107df82611550565b6daaeb6d7670e522a718067333cd4e3b158015906116005750600b5460ff165b15610d0457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612ecd565b610d0457604051633b79c77360e21b81526001600160a01b03821660048201526024016108e4565b60006116b4826110b6565b9050806001600160a01b0316836001600160a01b0316036117235760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016108e4565b336001600160a01b038216148061173f575061173f813361075d565b6117b15760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016108e4565b61091d8383611dab565b6009546001600160a01b031633146111ad5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108e4565b61181f3382611e19565b61183b5760405162461bcd60e51b81526004016108e490612eea565b61091d838383611f04565b804710156118965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108e4565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146118e3576040519150601f19603f3d011682016040523d82523d6000602084013e6118e8565b606091505b505090508061091d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108e4565b61091d83838360405180602001604052806000815250611304565b6111ce8282604051806020016040528060008152506120f1565b6002600a54036119e65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108e4565b6002600a55565b6000806119fb836004541190565b611a5c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108e4565b611a6583612128565b6000818152600360205260409020546001600160a01b031694909350915050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115611b465760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016108e4565b6001600160a01b038216611b9c5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108e4565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600755565b336001600160a01b03831603611c2d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016108e4565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600082611ca7868685612134565b1495945050505050565b611cbb3383611e19565b611cd75760405162461bcd60e51b81526004016108e490612eea565b61098184848484612180565b6060611cf0826004541190565b611d4f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016108e4565b6000611d59612199565b90506000815111611d795760405180602001604052806000815250611da4565b80611d83846121a8565b604051602001611d94929190612f3e565b6040516020818303038152906040525b9392505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de0826110b6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611e26826004541190565b611e8a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108e4565b6000611e95836110b6565b9050806001600160a01b0316846001600160a01b03161480611ed05750836001600160a01b0316611ec584610877565b6001600160a01b0316145b806112e157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff166112e1565b600080611f10836119ed565b91509150846001600160a01b0316826001600160a01b031614611f8a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b60648201526084016108e4565b6001600160a01b038416611ff05760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b60648201526084016108e4565b611ffb600084611dab565b6000612008846001612d62565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612038575060045481105b1561206e57600081815260036020526040812080546001600160a01b0319166001600160a01b03891617905561206e908261223b565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146120a7576120a760008561223b565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6004546120fe8484612267565b61210c6000858386866123cc565b6109815760405162461bcd60e51b81526004016108e490612f6d565b60006107df8183612503565b600081815b84811015612177576121638287878481811061215757612157612fc2565b905060200201356125fb565b91508061216f81612d49565b915050612139565b50949350505050565b61218b848484611f04565b61210c8484846001856123cc565b6060600e80546107f490612cad565b606060006121b583612627565b600101905060008167ffffffffffffffff8111156121d5576121d5612b65565b6040519080825280601f01601f1916602001820160405280156121ff576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461220957509392505050565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600454816122c55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b60648201526084016108e4565b6001600160a01b0383166123275760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108e4565b81600460008282546123399190612d62565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b03861617905561236f908261223b565b805b61237b8383612d62565b8110156109815760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806123c481612d49565b915050612371565b60006001600160a01b0385163b156124f657506001835b6123ed8486612d62565b8110156124f057604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906124269033908b9086908990600401612fd8565b6020604051808303816000875af1925050508015612461575060408051601f3d908101601f1916820190925261245e91810190613015565b60015b6124be573d80801561248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5080516000036124b65760405162461bcd60e51b81526004016108e490612f6d565b805181602001fd5b8280156124db57506001600160e01b03198116630a85bd0160e11b145b925050806124e881612d49565b9150506123e3565b506124fa565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c801561254557612533816126ff565b60ff168203600884901b1793506125f2565b600083116125b25760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b60648201526084016108e4565b5060001990910160008181526020869052604090205490919080156125ed576125da816126ff565b60ff0360ff16600884901b1793506125f2565b612545565b50505092915050565b6000818310612617576000828152602084905260409020611da4565b5060009182526020526040902090565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106126665772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612692576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106126b057662386f26fc10000830492506010015b6305f5e10083106126c8576305f5e100830492506008015b61271083106126dc57612710830492506004015b606483106126ee576064830492506002015b600a83106107df5760010192915050565b60006040518061012001604052806101008152602001613033610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61274885612769565b02901c8151811061275b5761275b612fc2565b016020015160f81c92915050565b600080821161277757600080fd5b5060008190031690565b6001600160e01b031981168114610d0457600080fd5b6000602082840312156127a957600080fd5b8135611da481612781565b60005b838110156127cf5781810151838201526020016127b7565b50506000910152565b600081518084526127f08160208601602086016127b4565b601f01601f19169290920160200192915050565b602081526000611da460208301846127d8565b60006020828403121561282957600080fd5b5035919050565b80356001600160a01b038116811461284757600080fd5b919050565b6000806040838503121561285f57600080fd5b61286883612830565b946020939093013593505050565b8015158114610d0457600080fd5b60006020828403121561289657600080fd5b8135611da481612876565b6000806000606084860312156128b657600080fd5b6128bf84612830565b92506128cd60208501612830565b9150604084013590509250925092565b600080604083850312156128f057600080fd5b50508035926020909101359150565b6000806020838503121561291257600080fd5b823567ffffffffffffffff8082111561292a57600080fd5b818501915085601f83011261293e57600080fd5b81358181111561294d57600080fd5b86602082850101111561295f57600080fd5b60209290920196919550909350505050565b60008083601f84011261298357600080fd5b50813567ffffffffffffffff81111561299b57600080fd5b6020830191508360208260051b8501011115610a2e57600080fd5b6000806000604084860312156129cb57600080fd5b83359250602084013567ffffffffffffffff8111156129e957600080fd5b6129f586828701612971565b9497909650939450505050565b600060208284031215612a1457600080fd5b611da482612830565b60008060408385031215612a3057600080fd5b612a3983612830565b915060208301356001600160601b0381168114612a5557600080fd5b809150509250929050565b600080600080600080600080610100898b031215612a7d57600080fd5b612a8689612830565b9750612a9460208a01612830565b9650612aa260408a01612830565b9550612ab060608a01612830565b9450612abe60808a01612830565b9350612acc60a08a01612830565b9250612ada60c08a01612830565b9150612ae860e08a01612830565b90509295985092959890939650565b60008060408385031215612b0a57600080fd5b612b1383612830565b91506020830135612a5581612876565b60008060208385031215612b3657600080fd5b823567ffffffffffffffff811115612b4d57600080fd5b612b5985828601612971565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612b9157600080fd5b612b9a85612830565b9350612ba860208601612830565b925060408501359150606085013567ffffffffffffffff80821115612bcc57600080fd5b818701915087601f830112612be057600080fd5b813581811115612bf257612bf2612b65565b604051601f8201601f19908116603f01168101908382118183101715612c1a57612c1a612b65565b816040528281528a6020848701011115612c3357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215612c6a57600080fd5b82359150612c7a60208401612830565b90509250929050565b60008060408385031215612c9657600080fd5b612c9f83612830565b9150612c7a60208401612830565b600181811c90821680612cc157607f821691505b602082108103612ce157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156107df576107df612ce7565b80820281158282048414176107df576107df612ce7565b600082612d4457634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612d5b57612d5b612ce7565b5060010190565b808201808211156107df576107df612ce7565b6020808252600f908201526e26b0bc1039bab838363c9037bb32b960891b604082015260600190565b601f82111561091d57600081815260208120601f850160051c81016020861015612dc55750805b601f850160051c820191505b818110156120e957828155600101612dd1565b67ffffffffffffffff831115612dfc57612dfc612b65565b612e1083612e0a8354612cad565b83612d9e565b6000601f841160018114612e445760008515612e2c5750838201355b600019600387901b1c1916600186901b17835561132a565b600083815260209020601f19861690835b82811015612e755786850135825560209485019460019092019101612e55565b5086821015612e925760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008251612eb68184602087016127b4565b64173539b7b760d91b920191825250600501919050565b600060208284031215612edf57600080fd5b8151611da481612876565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60008351612f508184602088016127b4565b835190830190612f648183602088016127b4565b01949350505050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061300b908301846127d8565b9695505050505050565b60006020828403121561302757600080fd5b8151611da48161278156fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220c775a7faab66606a97cd6cf990cabbb33c7421ce5879c1b364bc3b8dbfe966a964736f6c63430008120033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $2,672.18 | 0.0077 | $20.58 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.