Overview
ETH Balance
0.4995 ETH
Eth Value
$1,315.90 (@ $2,634.43/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 59 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 20573545 | 58 days ago | IN | 0 ETH | 0.00004012 | ||||
Mint Sale | 18149617 | 397 days ago | IN | 0.0111 ETH | 0.00140457 | ||||
Safe Transfer Fr... | 17978359 | 421 days ago | IN | 0 ETH | 0.0022934 | ||||
Mint Sale | 17830477 | 442 days ago | IN | 0.0111 ETH | 0.00157949 | ||||
Mint Sale | 17830467 | 442 days ago | IN | 0.0111 ETH | 0.00168307 | ||||
Mint Sale | 17819007 | 443 days ago | IN | 0.0333 ETH | 0.00135215 | ||||
Mint Sale | 17816379 | 444 days ago | IN | 0.0111 ETH | 0.00161698 | ||||
Mint Sale | 17815719 | 444 days ago | IN | 0.0222 ETH | 0.00189175 | ||||
Mint Sale | 17813740 | 444 days ago | IN | 0.0111 ETH | 0.0032919 | ||||
Mint Sale | 17812654 | 444 days ago | IN | 0.0222 ETH | 0.00128243 | ||||
Mint Sale | 17806251 | 445 days ago | IN | 0.0111 ETH | 0.00135019 | ||||
Mint Sale | 17804164 | 445 days ago | IN | 0.0111 ETH | 0.00142345 | ||||
Mint Sale | 17803818 | 445 days ago | IN | 0.0222 ETH | 0.0010482 | ||||
Safe Transfer Fr... | 17801895 | 446 days ago | IN | 0 ETH | 0.0021592 | ||||
Mint Sale | 17801281 | 446 days ago | IN | 0.0111 ETH | 0.00166847 | ||||
Mint Sale | 17800706 | 446 days ago | IN | 0.0333 ETH | 0.00216235 | ||||
Mint Sale | 17800603 | 446 days ago | IN | 0.0444 ETH | 0.00178905 | ||||
Mint Sale | 17800282 | 446 days ago | IN | 0.0111 ETH | 0.00273345 | ||||
Mint Sale | 17800121 | 446 days ago | IN | 0.0333 ETH | 0.00199419 | ||||
Mint Sale | 17800120 | 446 days ago | IN | 0.0222 ETH | 0.00185229 | ||||
Mint Sale | 17800091 | 446 days ago | IN | 0.0333 ETH | 0.0019156 | ||||
Mint Presale | 17799189 | 446 days ago | IN | 0.0111 ETH | 0.00415788 | ||||
Mint Presale | 17798817 | 446 days ago | IN | 0.0222 ETH | 0.00243947 | ||||
Mint Presale | 17797784 | 446 days ago | IN | 0.0111 ETH | 0.00187598 | ||||
Mint Presale | 17797564 | 446 days ago | IN | 0.0111 ETH | 0.00193533 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17793827 | 447 days ago | 0.8325 ETH |
Loading...
Loading
Contract Name:
WHOB
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.19; /// @title: WHO B? /// @author: WHO B? import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "./ITokenURISupplier.sol"; import "./RaribleV1Royalties.sol"; import "./ERC2981.sol"; // // // ▄▄███████████████████▄▄ // ▄█████▀▀└ └╙▀▀████▄ // ▄███▀└^ └▀████µ // ▄███▀ '▀███, // ▄██▀└ ▄▄█▄▄████▀ ▀███ // ▄██▀ "████▀▀▀▀╙' '▀██▄ // ███⌐ ,, ╙███ // ███ ,█████████▄ ,▄▄▄▄▄ ▀██ // ▐██` ╙▀ ▄███▀▀▀▀██ ╙██▄ // ██░ ▄▄▄█▄▄ ████▌ ██▌ ╟██ // ▐██ ,███▀╙███▌ █████ ███ ██▌ // ██▌ ███ε ▄███▀ ╙██▌~ ,███▀ ██▌ // ██▌ ▄█ε ▀█████▀" ╙███████▀¬ ╟██ // ██▌ ]██▌ └└ └└└¬ ╟██⌐ // ██▌ █████▀▀ ▐███ // ███ └└╙██⌐ ▐███ // ╟██▄ ▀█▌ ▐███ // "███ ▐██▌ // ╙███ ▄▄▄▄▄▄▄▄███████████████████ε ███▌ // ▀███ ▀▀▀▀▀██▀▀▀▀▀▀▀╙└└└^' ▐███▌ // ▀███▄ ▄█████⌐ // └▀███▄ ,███▀ `██ // .▀███▄ ▄▄███▀ ██▄ // └▀███▄µ ,▄████▀└ ██ // └▀▀██████▄▄▄▄▄▄▄▄▄▄▄▄▄▄██████▀▀▀└. ▐█▌ // └└└╙▀▀▀▀▀▀▀▀▀▀▀╙└└└└ ██ // ▐█▌ // ██ // ▐█▌ // "██ // ╟█ε // ██ // "█▌ // "▀ // contract WHOB is ERC721ABurnable, ERC721AQueryable, Pausable, RaribleV1Royalties, ERC2981, AccessControl { event Frozen(); error ContractPaused(); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); uint256 public constant MAX_SUPPLY = 5555; ITokenURISupplier public tokenURIContract; address payable public paymentSplitter = payable(0x000000000000000000000000000000000000dEaD); address payable public royaltySplitter = payable(0x000000000000000000000000000000000000dEaD); uint256 public presaleActivationTime = 1690563600; uint256 public saleActivationTime = 1690650000; uint256 public bps = 5000; uint256 public presalePrice = 77700000000000000; uint256 public salePrice = 77700000000000000; address public provenanceHash; bool public frozen = false; address public owner; mapping(address => bool) public presaleClaimed; bytes32 private presaleRoot = bytes32(0); constructor() ERC721A("WHOB", "WHOB") { owner = msg.sender; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _mintERC2309(msg.sender, 23); royaltySplitter = payable(msg.sender); paymentSplitter = payable(msg.sender); } modifier onlyOwner() { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not owner"); _; } modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, _msgSender()) || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not admin"); _; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function withdraw() public onlyOwner { uint256 balance = address(this).balance; paymentSplitter.transfer(balance); } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC721A, RaribleV1Royalties, ERC2981, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } function presaleActivated() public view returns (bool) { return block.timestamp >= presaleActivationTime; } function saleActivated() public view returns (bool) { return block.timestamp >= saleActivationTime; } function setPaymentSplitter(address payable newAddress) external onlyAdmin { paymentSplitter = newAddress; } function setRoyaltySplitter(address payable newAddress, uint256 newBps) external onlyAdmin { royaltySplitter = newAddress; bps = newBps; } function setPresalePrice(uint256 price) external onlyAdmin { presalePrice = price; } function setSalePrice(uint256 price) external onlyAdmin { salePrice = price; } function setProvenanceHash(address phash) external onlyAdmin { provenanceHash = phash; } function setPresaleActivationTime(uint256 ts) external onlyAdmin { presaleActivationTime = ts; } function setSaleActivationTime(uint256 ts) external onlyAdmin { saleActivationTime = ts; } function setPresaleMerkleRoot(bytes32 mroot) external onlyAdmin { presaleRoot = mroot; } function setTokenURIContract(address addy) external onlyAdmin { require(frozen == false, "Frozen"); require(Address.isContract(addy), "Not a contract"); tokenURIContract = ITokenURISupplier(addy); } function freezeMetadata() external onlyOwner { frozen = true; emit Frozen(); } function pause() external onlyAdmin { _pause(); } function unpause() external onlyAdmin { _unpause(); } function tokenURI(uint256 tokenId) public view virtual override(IERC721A, ERC721A) returns (string memory) { require(_exists(tokenId), "DNE"); return tokenURIContract.tokenURI(tokenId); } function checkPresaleMerkleProof(bytes32[] calldata merkleProof, uint256 amount) internal view returns (bool){ bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(MerkleProof.verify(merkleProof, presaleRoot, leaf), "BadProof"); return true; } /* * The first five parameters of this are used to validate the call. * If the max mint, v, r, s, or the merkle proof are incorrect this reverts. * If they are all correct, the user can mint <= to their maxMints. * After that, they can never mint in this presale again. */ function mintPresale(uint256 maxMints, bytes32[] calldata merkleProof, uint256 amount) public payable { require(presaleActivated(), "TooEarly"); require(presalePrice * amount == msg.value, "BadPrice"); require(checkPresaleMerkleProof(merkleProof, maxMints), "BadProof"); require(amount <= maxMints, "ExceedsPresaleMax"); require(!presaleClaimed[msg.sender], "Claimed"); presaleClaimed[msg.sender] = true; mintAmount(amount); } function mintSale(uint256 amount) public payable { require(saleActivated(), "TooEarly"); require(salePrice * amount == msg.value, "BadPrice"); mintAmount(amount); } /** * @dev See {ERC721A-_safeMint}. * * The only function for minting outside of the intial contract creation. * This is used by the presale and sale functions. * It ensures that every 100th token is an artist proof for project owners. */ function mintAmount(uint256 amount) internal { uint256 initialTotalSupply = totalSupply(); uint256 finalTotalSupply = initialTotalSupply + amount; uint256 artistProofs = (finalTotalSupply - 1) / 100 - (initialTotalSupply - 1) / 100; require(finalTotalSupply + artistProofs <= MAX_SUPPLY, "ExceedsSupply"); _safeMint(msg.sender, amount); if (artistProofs > 0) { _safeMint(owner, artistProofs); } } /** * @dev See {ERC721A-_beforeTokenTransfers}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { super._beforeTokenTransfers(from, to, startTokenId, quantity); if (paused()) revert ContractPaused(); } /* * Rarible/Foundation Royalties Protocol */ function getFeeRecipients(uint256 id) public view override returns (address payable[] memory) { require(_exists(id), "DNE"); address payable[] memory result = new address payable[](1); result[0] = royaltySplitter; return result; } /* * Rarible/Foundation Royalties Protocol */ function getFeeBps(uint256 id) public view override returns (uint[] memory) { require(_exists(id), "DNE"); uint[] memory result = new uint[](1); result[0] = bps; return result; } /* * ERC2981 Royalties Standard */ function royaltyInfo(uint256, uint256 _value, bytes calldata _data) external view override returns (address _receiver, uint256 _royaltyAmount, bytes memory _royaltyPaymentData) { return (royaltySplitter, _value / (bps / 100), _data); } /* * @dev For returning ERC20s we dont know what to do with. * If buyers accidentally send ERC20s, they can contact admins * and we can send back their tokens. */ function recoverERC20s(IERC20 token, address to, uint256 amount) external onlyAdmin { token.approve(address(this), amount); token.transferFrom(address(this), to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /* * Implements Rarible Royalties V1 Schema * @dev https://eips.ethereum.org/EIPS/eip-2981 */ abstract contract ERC2981 is ERC165 { /* * bytes4(keccak256('royaltyInfo(uint256, uint256, bytes)')) == 0xc155531d */ bytes4 private constant _INTERFACE_ID_ERC2981 = 0xc155531d; /// @notice Called with the sale price to determine how much royalty /// is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @param _data - information used by extensions of this ERC. /// Must not to be used by implementers of EIP-2981 /// alone. /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for _value sale price /// @return _royaltyPaymentData - information used by extensions of this ERC. /// Must not to be used by implementers of /// EIP-2981 alone. function royaltyInfo(uint256 _tokenId, uint256 _value, bytes calldata _data) external virtual returns (address _receiver, uint256 _royaltyAmount, bytes memory _royaltyPaymentData); function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == _INTERFACE_ID_ERC2981 || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * Implements Rarible Royalties V1 Schema * @dev https://docs.rarible.com/asset/creating-an-asset/royalties-schema */ abstract contract RaribleV1Royalties is ERC165 { event SecondarySaleFees(uint256 tokenId, address[] recipients, uint[] bps); /* * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb * * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584 */ bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584; function getFeeRecipients(uint256 id) public view virtual returns (address payable[] memory); function getFeeBps(uint256 id) public view virtual returns (uint[] memory); function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == _INTERFACE_ID_FEES || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.19; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface ITokenURISupplier is IERC165 { function tokenURI(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "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":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ContractPaused","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"name":"SecondarySaleFees","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"frozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint256","name":"maxMints","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentSplitter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActivationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_royaltyAmount","type":"uint256"},{"internalType":"bytes","name":"_royaltyPaymentData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltySplitter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleActivationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"}],"name":"setPaymentSplitter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ts","type":"uint256"}],"name":"setPresaleActivationTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"mroot","type":"bytes32"}],"name":"setPresaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"phash","type":"address"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"},{"internalType":"uint256","name":"newBps","type":"uint256"}],"name":"setRoyaltySplitter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ts","type":"uint256"}],"name":"setSaleActivationTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addy","type":"address"}],"name":"setTokenURIContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIContract","outputs":[{"internalType":"contract ITokenURISupplier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600b805461dead6001600160a01b03199182168117909255600c805490911690911790556364c3f410600d556364c54590600e55611388600f556701140bbd030c400060108190556011556012805460ff60a01b191690555f6015553480156200006c575f80fd5b506040805180820182526004808252632ba427a160e11b6020808401829052845180860190955291845290830152906002620000a983826200039e565b506003620000b882826200039e565b505060015f9081556008805460ff19169055601380546001600160a01b03191633908117909155620000eb925062000120565b620000f833601762000130565b600c8054336001600160a01b03199182168117909255600b8054909116909117905562000466565b6200012c828262000232565b5050565b5f546001600160a01b0383166200015957604051622e076360e81b815260040160405180910390fd5b815f036200017a5760405163b562e8dd60e01b815260040160405180910390fd5b6113888211156200019e57604051633db1f9af60e01b815260040160405180910390fd5b620001ac5f848385620002d4565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600482528083206001871460e11b4260a01b178517905580515f19868801018152905185927fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d928290030190a4015f5550565b505050565b5f8281526009602090815260408083206001600160a01b038516845290915290205460ff166200012c575f8281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002903390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60085460ff1615620002f95760405163ab35696f60e01b815260040160405180910390fd5b50505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200032857607f821691505b6020821081036200034757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200022d575f81815260208120601f850160051c81016020861015620003755750805b601f850160051c820191505b81811015620003965782815560010162000381565b505050505050565b81516001600160401b03811115620003ba57620003ba620002ff565b620003d281620003cb845462000313565b846200034d565b602080601f83116001811462000408575f8415620003f05750858301515b5f19600386901b1c1916600185901b17855562000396565b5f85815260208120601f198616915b82811015620004385788860151825594840194600190910190840162000417565b50858210156200045657878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b61325f80620004745f395ff3fe608060405260043610610391575f3560e01c8063698f87be116101de578063b9c4d9fb11610108578063d547741f1161009d578063ed4a6b0c1161006d578063ed4a6b0c14610a5d578063f51f96dd14610a7c578063f9765bc114610a91578063fc3483b414610abf575f80fd5b8063d547741f146109c9578063dc9b125d146109e8578063e4c94fa1146109ff578063e985e9c514610a16575f80fd5b8063c6ab67a3116100d8578063c6ab67a314610962578063c87b56dd14610981578063ca6ce643146109a0578063d111515d146109b5575f80fd5b8063b9c4d9fb146108c7578063bebb42c1146108f3578063c155531d14610908578063c23dc68f14610936575f80fd5b80638462151c1161017e57806399a2557a1161014e57806399a2557a14610863578063a217fddf14610882578063a22cb46514610895578063b88d4fde146108b4575f80fd5b80638462151c146107f25780638da5cb5b1461081157806391d148541461083057806395d89b411461084f575f80fd5b806375b238fc116101b957806375b238fc146107805780637c7bd02b146107a057806382fc3147146107bf5780638456cb59146107de575f80fd5b8063698f87be146107235780636b29b79f1461074257806370a0823114610761575f80fd5b80633549345e116102bf57806342966c681161025f5780635c975abb1161022f5780635c975abb146106b9578063613d165b146106d05780636352211e146106ef578063682373291461070e575f80fd5b806342966c681461063c5780634875bccb1461065b57806350f418ef1461066e5780635bbb21771461068d575f80fd5b80633ccfd60b1161029a5780633ccfd60b146105e25780633f4ba83a146105f6578063411d8f2f1461060a57806342842e0e14610629575f80fd5b80633549345e1461059157806336568abe146105b05780633c14a2de146105cf575f80fd5b8063119bba6211610335578063248a9ca311610305578063248a9ca31461051057806328d7b2761461053e5780632f2ff15d1461055d57806332cb6b0c1461057c575f80fd5b8063119bba62146104a557806318160ddd146104c45780631919fed7146104de57806323b872dd146104fd575f80fd5b806306fdde031161037057806306fdde031461040c578063081812fc1461042d578063095ea7b3146104645780630ebd4c7f14610479575f80fd5b80620e7fa81461039557806301ffc9a7146103bd578063054f7d9c146103ec575b5f80fd5b3480156103a0575f80fd5b506103aa60105481565b6040519081526020015b60405180910390f35b3480156103c8575f80fd5b506103dc6103d73660046129ee565b610ade565b60405190151581526020016103b4565b3480156103f7575f80fd5b506012546103dc90600160a01b900460ff1681565b348015610417575f80fd5b50610420610aee565b6040516103b49190612a56565b348015610438575f80fd5b5061044c610447366004612a68565b610b7e565b6040516001600160a01b0390911681526020016103b4565b610477610472366004612a93565b610bc0565b005b348015610484575f80fd5b50610498610493366004612a68565b610c5e565b6040516103b49190612abd565b3480156104b0575f80fd5b506104776104bf366004612a68565b610cd5565b3480156104cf575f80fd5b506001545f54035f19016103aa565b3480156104e9575f80fd5b506104776104f8366004612a68565b610d1d565b61047761050b366004612af4565b610d65565b34801561051b575f80fd5b506103aa61052a366004612a68565b5f9081526009602052604090206001015490565b348015610549575f80fd5b50610477610558366004612a68565b610ef8565b348015610568575f80fd5b50610477610577366004612b32565b610f40565b348015610587575f80fd5b506103aa6115b381565b34801561059c575f80fd5b506104776105ab366004612a68565b610f69565b3480156105bb575f80fd5b506104776105ca366004612b32565b610fb1565b6104776105dd366004612ba7565b61102f565b3480156105ed575f80fd5b506104776111aa565b348015610601575f80fd5b5061047761122d565b348015610615575f80fd5b50600c5461044c906001600160a01b031681565b610477610637366004612af4565b61127a565b348015610647575f80fd5b50610477610656366004612a68565b611294565b610477610669366004612a68565b6112a2565b348015610679575f80fd5b50610477610688366004612af4565b61132f565b348015610698575f80fd5b506106ac6106a7366004612bf5565b611457565b6040516103b49190612c6f565b3480156106c4575f80fd5b5060085460ff166103dc565b3480156106db575f80fd5b506104776106ea366004612cb0565b61151e565b3480156106fa575f80fd5b5061044c610709366004612a68565b611583565b348015610719575f80fd5b506103aa600f5481565b34801561072e575f80fd5b50600a5461044c906001600160a01b031681565b34801561074d575f80fd5b5061047761075c366004612cb0565b61158d565b34801561076c575f80fd5b506103aa61077b366004612cb0565b6115f2565b34801561078b575f80fd5b506103aa5f8051602061320a83398151915281565b3480156107ab575f80fd5b506104776107ba366004612a93565b61163e565b3480156107ca575f80fd5b506104776107d9366004612cb0565b6116a7565b3480156107e9575f80fd5b50610477611797565b3480156107fd575f80fd5b5061049861080c366004612cb0565b6117e2565b34801561081c575f80fd5b5060135461044c906001600160a01b031681565b34801561083b575f80fd5b506103dc61084a366004612b32565b6118e6565b34801561085a575f80fd5b50610420611910565b34801561086e575f80fd5b5061049861087d366004612ccb565b61191f565b34801561088d575f80fd5b506103aa5f81565b3480156108a0575f80fd5b506104776108af366004612d0a565b611a9e565b6104776108c2366004612da0565b611b09565b3480156108d2575f80fd5b506108e66108e1366004612a68565b611b4d565b6040516103b49190612e47565b3480156108fe575f80fd5b506103aa600d5481565b348015610913575f80fd5b50610927610922366004612e87565b611bd2565b6040516103b493929190612eff565b348015610941575f80fd5b50610955610950366004612a68565b611c49565b6040516103b49190612f2e565b34801561096d575f80fd5b5060125461044c906001600160a01b031681565b34801561098c575f80fd5b5061042061099b366004612a68565b611cce565b3480156109ab575f80fd5b506103aa600e5481565b3480156109c0575f80fd5b50610477611d62565b3480156109d4575f80fd5b506104776109e3366004612b32565b611deb565b3480156109f3575f80fd5b50600e544210156103dc565b348015610a0a575f80fd5b50600d544210156103dc565b348015610a21575f80fd5b506103dc610a30366004612f3c565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b348015610a68575f80fd5b50600b5461044c906001600160a01b031681565b348015610a87575f80fd5b506103aa60115481565b348015610a9c575f80fd5b506103dc610aab366004612cb0565b60146020525f908152604090205460ff1681565b348015610aca575f80fd5b50610477610ad9366004612a68565b611e0f565b5f610ae882611e57565b92915050565b606060028054610afd90612f68565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2990612f68565b8015610b745780601f10610b4b57610100808354040283529160200191610b74565b820191905f5260205f20905b815481529060010190602001808311610b5757829003601f168201915b5050505050905090565b5f610b8882611e7b565b610ba5576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610bca82611583565b9050336001600160a01b03821614610c0357610be68133610a30565b610c03576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6060610c6982611e7b565b610c8e5760405162461bcd60e51b8152600401610c8590612fa0565b60405180910390fd5b6040805160018082528183019092525f9160208083019080368337019050509050600f54815f81518110610cc457610cc4612fbd565b602090810291909101015292915050565b610cec5f8051602061320a833981519152336118e6565b80610cfc5750610cfc5f336118e6565b610d185760405162461bcd60e51b8152600401610c8590612fd1565b600d55565b610d345f8051602061320a833981519152336118e6565b80610d445750610d445f336118e6565b610d605760405162461bcd60e51b8152600401610c8590612fd1565b601155565b5f610d6f82611ead565b9050836001600160a01b0316816001600160a01b031614610da25760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054610dcd8187335b6001600160a01b039081169116811491141790565b610df857610ddb8633610a30565b610df857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e1f57604051633a954ecd60e21b815260040160405180910390fd5b610e2c8686866001611f16565b8015610e36575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610ec257600184015f818152600460205260408120549003610ec0575f548114610ec0575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03165f805160206131ea83398151915260405160405180910390a4505050505050565b610f0f5f8051602061320a833981519152336118e6565b80610f1f5750610f1f5f336118e6565b610f3b5760405162461bcd60e51b8152600401610c8590612fd1565b601555565b5f82815260096020526040902060010154610f5a81611f3a565b610f648383611f44565b505050565b610f805f8051602061320a833981519152336118e6565b80610f905750610f905f336118e6565b610fac5760405162461bcd60e51b8152600401610c8590612fd1565b601055565b6001600160a01b03811633146110215760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c85565b61102b8282611fc9565b5050565b600d5442101561106c5760405162461bcd60e51b8152602060048201526008602482015267546f6f4561726c7960c01b6044820152606401610c85565b348160105461107b9190613012565b146110b35760405162461bcd60e51b8152602060048201526008602482015267426164507269636560c01b6044820152606401610c85565b6110be83838661202f565b6110f55760405162461bcd60e51b81526020600482015260086024820152672130b2283937b7b360c11b6044820152606401610c85565b838111156111395760405162461bcd60e51b815260206004820152601160248201527008af0c6cacac8e6a0e4cae6c2d8ca9ac2f607b1b6044820152606401610c85565b335f9081526014602052604090205460ff16156111825760405162461bcd60e51b815260206004820152600760248201526610db185a5b595960ca1b6044820152606401610c85565b335f908152601460205260409020805460ff191660011790556111a4816120f2565b50505050565b6111b45f336118e6565b6111f65760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610c85565b600b5460405147916001600160a01b03169082156108fc029083905f818181858888f1935050505015801561102b573d5f803e3d5ffd5b6112445f8051602061320a833981519152336118e6565b8061125457506112545f336118e6565b6112705760405162461bcd60e51b8152600401610c8590612fd1565b6112786121bf565b565b610f6483838360405180602001604052805f815250611b09565b61129f816001612252565b50565b600e544210156112df5760405162461bcd60e51b8152602060048201526008602482015267546f6f4561726c7960c01b6044820152606401610c85565b34816011546112ee9190613012565b146113265760405162461bcd60e51b8152602060048201526008602482015267426164507269636560c01b6044820152606401610c85565b61129f816120f2565b6113465f8051602061320a833981519152336118e6565b8061135657506113565f336118e6565b6113725760405162461bcd60e51b8152600401610c8590612fd1565b60405163095ea7b360e01b8152306004820152602481018290526001600160a01b0384169063095ea7b3906044016020604051808303815f875af11580156113bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113e09190613029565b506040516323b872dd60e01b81523060048201526001600160a01b038381166024830152604482018390528416906323b872dd906064016020604051808303815f875af1158015611433573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111a49190613029565b6060815f816001600160401b0381111561147357611473612d36565b6040519080825280602002602001820160405280156114c357816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f199092019101816114915790505b5090505f5b828114611515576114f08686838181106114e4576114e4612fbd565b90506020020135611c49565b82828151811061150257611502612fbd565b60209081029190910101526001016114c8565b50949350505050565b6115355f8051602061320a833981519152336118e6565b8061154557506115455f336118e6565b6115615760405162461bcd60e51b8152600401610c8590612fd1565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b5f610ae882611ead565b6115a45f8051602061320a833981519152336118e6565b806115b457506115b45f336118e6565b6115d05760405162461bcd60e51b8152600401610c8590612fd1565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001600160a01b03821661161a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b6116555f8051602061320a833981519152336118e6565b8061166557506116655f336118e6565b6116815760405162461bcd60e51b8152600401610c8590612fd1565b600c80546001600160a01b0319166001600160a01b039390931692909217909155600f55565b6116be5f8051602061320a833981519152336118e6565b806116ce57506116ce5f336118e6565b6116ea5760405162461bcd60e51b8152600401610c8590612fd1565b601254600160a01b900460ff161561172d5760405162461bcd60e51b8152602060048201526006602482015265233937bd32b760d11b6044820152606401610c85565b6001600160a01b0381163b6117755760405162461bcd60e51b815260206004820152600e60248201526d139bdd08184818dbdb9d1c9858dd60921b6044820152606401610c85565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6117ae5f8051602061320a833981519152336118e6565b806117be57506117be5f336118e6565b6117da5760405162461bcd60e51b8152600401610c8590612fd1565b61127861238c565b60605f805f6117f0856115f2565b90505f816001600160401b0381111561180b5761180b612d36565b604051908082528060200260200182016040528015611834578160200160208202803683370190505b509050611860604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146118da5761187381612407565b915081604001516118d25781516001600160a01b03161561189357815194505b876001600160a01b0316856001600160a01b0316036118d257808387806001019850815181106118c5576118c5612fbd565b6020026020010181815250505b600101611863565b50909695505050505050565b5f9182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060038054610afd90612f68565b606081831061194157604051631960ccad60e11b815260040160405180910390fd5b5f8061194b5f5490565b9050600185101561195b57600194505b80841115611967578093505b5f611971876115f2565b905084861015611990578585038181101561198a578091505b50611993565b505f5b5f816001600160401b038111156119ac576119ac612d36565b6040519080825280602002602001820160405280156119d5578160200160208202803683370190505b509050815f036119ea579350611a9792505050565b5f6119f488611c49565b90505f8160400151611a04575080515b885b888114158015611a165750848714155b15611a8b57611a2481612407565b92508260400151611a835782516001600160a01b031615611a4457825191505b8a6001600160a01b0316826001600160a01b031603611a835780848880600101995081518110611a7657611a76612fbd565b6020026020010181815250505b600101611a06565b50505092835250909150505b9392505050565b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b14848484610d65565b6001600160a01b0383163b156111a457611b3084848484612441565b6111a4576040516368d2bf6b60e11b815260040160405180910390fd5b6060611b5882611e7b565b611b745760405162461bcd60e51b8152600401610c8590612fa0565b6040805160018082528183019092525f91602080830190803683375050600c5482519293506001600160a01b0316918391505f90611bb457611bb4612fbd565b6001600160a01b039092166020928302919091019091015292915050565b600c54600f545f9182916060916001600160a01b031690611bf590606490613044565b611bff9088613044565b868681818080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250969e959d50919b50939950505050505050505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091526001831080611c9f57505f548310155b15611caa5792915050565b611cb383612407565b9050806040015115611cc55792915050565b611a9783612528565b6060611cd982611e7b565b611cf55760405162461bcd60e51b8152600401610c8590612fa0565b600a5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd906024015f60405180830381865afa158015611d3b573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610ae89190810190613063565b611d6c5f336118e6565b611dae5760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610c85565b6012805460ff60a01b1916600160a01b1790556040517fa8cab3d1893ed53071b052fafa843143492f25d1d6b0170d460789f7ab1954be905f90a1565b5f82815260096020526040902060010154611e0581611f3a565b610f648383611fc9565b611e265f8051602061320a833981519152336118e6565b80611e365750611e365f336118e6565b611e525760405162461bcd60e51b8152600401610c8590612fd1565b600e55565b5f6001600160e01b03198216637965db0b60e01b1480610ae85750610ae88261255c565b5f81600111158015611e8d57505f5482105b8015610ae85750505f90815260046020526040902054600160e01b161590565b5f8180600111611efd575f54811015611efd575f8181526004602052604081205490600160e01b82169003611efb575b805f03611a9757505f19015f81815260046020526040902054611edd565b505b604051636f96cda160e11b815260040160405180910390fd5b60085460ff16156111a45760405163ab35696f60e01b815260040160405180910390fd5b61129f8133612580565b611f4e82826118e6565b61102b575f8281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fd382826118e6565b1561102b575f8281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516bffffffffffffffffffffffff193360601b166020820152603481018290525f9081906054016040516020818303038152906040528051906020012090506120b08585808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505060155491508490506125e4565b6120e75760405162461bcd60e51b81526020600482015260086024820152672130b2283937b7b360c11b6044820152606401610c85565b506001949350505050565b5f6121046001545f545f199190030190565b90505f61211183836130cb565b90505f60646121216001856130de565b61212b9190613044565b60646121386001856130de565b6121429190613044565b61214c91906130de565b90506115b361215b82846130cb565b11156121995760405162461bcd60e51b815260206004820152600d60248201526c45786365656473537570706c7960981b6044820152606401610c85565b6121a333856125f9565b80156111a4576013546111a4906001600160a01b0316826125f9565b60085460ff166122085760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c85565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b5f61225c83611ead565b9050805f80612278865f90815260066020526040902080549091565b9150915084156122b85761228d818433610db8565b6122b85761229b8333610a30565b6122b857604051632ce44b5f60e11b815260040160405180910390fd5b6122c5835f886001611f16565b80156122cf575f82555b6001600160a01b0383165f81815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b175f87815260046020526040812091909155600160e11b8516900361235857600186015f818152600460205260408120549003612356575f548114612356575f8181526004602052604090208590555b505b60405186905f906001600160a01b038616905f805160206131ea833981519152908390a45050600180548101905550505050565b60085460ff16156123d25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c85565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122353390565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610ae890612612565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906124759033908990889088906004016130f1565b6020604051808303815f875af19250505080156124af575060408051601f3d908101601f191682019092526124ac9181019061312d565b60015b61250b573d8080156124dc576040519150601f19603f3d011682016040523d82523d5f602084013e6124e1565b606091505b5080515f03612503576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152610ae861255783611ead565b612612565b5f6001600160e01b0319821663c155531d60e01b1480610ae85750610ae882612659565b61258a82826118e6565b61102b576125a2816001600160a01b0316601461268d565b6125ad83602061268d565b6040516020016125be929190613148565b60408051601f198184030181529082905262461bcd60e51b8252610c8591600401612a56565b5f826125f08584612822565b14949350505050565b61102b828260405180602001604052805f815250612892565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b5f6001600160e01b03198216632dde656160e21b1480610ae857506301ffc9a760e01b6001600160e01b0319831614610ae8565b60605f61269b836002613012565b6126a69060026130cb565b6001600160401b038111156126bd576126bd612d36565b6040519080825280601f01601f1916602001820160405280156126e7576020820181803683370190505b509050600360fc1b815f8151811061270157612701612fbd565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061272f5761272f612fbd565b60200101906001600160f81b03191690815f1a9053505f612751846002613012565b61275c9060016130cb565b90505b60018111156127d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061279057612790612fbd565b1a60f81b8282815181106127a6576127a6612fbd565b60200101906001600160f81b03191690815f1a90535060049490941c936127cc816131bc565b905061275f565b508315611a975760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c85565b5f81815b845181101561288a575f85828151811061284257612842612fbd565b60200260200101519050808311612867575f8381526020829052604090209250612877565b5f81815260208490526040902092505b5080612882816131d1565b915050612826565b509392505050565b61289c83836128fb565b6001600160a01b0383163b15610f64575f548281035b6128c45f868380600101945086612441565b6128e1576040516368d2bf6b60e11b815260040160405180910390fd5b8181106128b257815f54146128f4575f80fd5b5050505050565b5f80549082900361291f5760405163b562e8dd60e01b815260040160405180910390fd5b61292b5f848385611f16565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083905f805160206131ea8339815191528180a4600183015b8181146129b15780835f5f805160206131ea8339815191525f80a460010161298e565b50815f036129d157604051622e076360e81b815260040160405180910390fd5b5f5550505050565b6001600160e01b03198116811461129f575f80fd5b5f602082840312156129fe575f80fd5b8135611a97816129d9565b5f5b83811015612a23578181015183820152602001612a0b565b50505f910152565b5f8151808452612a42816020860160208601612a09565b601f01601f19169290920160200192915050565b602081525f611a976020830184612a2b565b5f60208284031215612a78575f80fd5b5035919050565b6001600160a01b038116811461129f575f80fd5b5f8060408385031215612aa4575f80fd5b8235612aaf81612a7f565b946020939093013593505050565b602080825282518282018190525f9190848201906040850190845b818110156118da57835183529284019291840191600101612ad8565b5f805f60608486031215612b06575f80fd5b8335612b1181612a7f565b92506020840135612b2181612a7f565b929592945050506040919091013590565b5f8060408385031215612b43575f80fd5b823591506020830135612b5581612a7f565b809150509250929050565b5f8083601f840112612b70575f80fd5b5081356001600160401b03811115612b86575f80fd5b6020830191508360208260051b8501011115612ba0575f80fd5b9250929050565b5f805f8060608587031215612bba575f80fd5b8435935060208501356001600160401b03811115612bd6575f80fd5b612be287828801612b60565b9598909750949560400135949350505050565b5f8060208385031215612c06575f80fd5b82356001600160401b03811115612c1b575f80fd5b612c2785828601612b60565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156118da57612c9d838551612c33565b9284019260809290920191600101612c8a565b5f60208284031215612cc0575f80fd5b8135611a9781612a7f565b5f805f60608486031215612cdd575f80fd5b8335612ce881612a7f565b95602085013595506040909401359392505050565b801515811461129f575f80fd5b5f8060408385031215612d1b575f80fd5b8235612d2681612a7f565b91506020830135612b5581612cfd565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715612d7257612d72612d36565b604052919050565b5f6001600160401b03821115612d9257612d92612d36565b50601f01601f191660200190565b5f805f8060808587031215612db3575f80fd5b8435612dbe81612a7f565b93506020850135612dce81612a7f565b92506040850135915060608501356001600160401b03811115612def575f80fd5b8501601f81018713612dff575f80fd5b8035612e12612e0d82612d7a565b612d4a565b818152886020838501011115612e26575f80fd5b816020840160208301375f6020838301015280935050505092959194509250565b602080825282518282018190525f9190848201906040850190845b818110156118da5783516001600160a01b031683529284019291840191600101612e62565b5f805f8060608587031215612e9a575f80fd5b843593506020850135925060408501356001600160401b0380821115612ebe575f80fd5b818701915087601f830112612ed1575f80fd5b813581811115612edf575f80fd5b886020828501011115612ef0575f80fd5b95989497505060200194505050565b60018060a01b0384168152826020820152606060408201525f612f256060830184612a2b565b95945050505050565b60808101610ae88284612c33565b5f8060408385031215612f4d575f80fd5b8235612f5881612a7f565b91506020830135612b5581612a7f565b600181811c90821680612f7c57607f821691505b602082108103612f9a57634e487b7160e01b5f52602260045260245ffd5b50919050565b602080825260039082015262444e4560e81b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b60208082526013908201527221b0b63632b91034b9903737ba1030b236b4b760691b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610ae857610ae8612ffe565b5f60208284031215613039575f80fd5b8151611a9781612cfd565b5f8261305e57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215613073575f80fd5b81516001600160401b03811115613088575f80fd5b8201601f81018413613098575f80fd5b80516130a6612e0d82612d7a565b8181528560208385010111156130ba575f80fd5b612f25826020830160208601612a09565b80820180821115610ae857610ae8612ffe565b81810381811115610ae857610ae8612ffe565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061312390830184612a2b565b9695505050505050565b5f6020828403121561313d575f80fd5b8151611a97816129d9565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f835161317f816017850160208801612a09565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516131b0816028840160208801612a09565b01602801949350505050565b5f816131ca576131ca612ffe565b505f190190565b5f600182016131e2576131e2612ffe565b506001019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220b6c42bae1014ba8878ddcb54792ff237b38f6d5f79747b4bc56c236cb8638bf764736f6c63430008140033
Deployed Bytecode
0x608060405260043610610391575f3560e01c8063698f87be116101de578063b9c4d9fb11610108578063d547741f1161009d578063ed4a6b0c1161006d578063ed4a6b0c14610a5d578063f51f96dd14610a7c578063f9765bc114610a91578063fc3483b414610abf575f80fd5b8063d547741f146109c9578063dc9b125d146109e8578063e4c94fa1146109ff578063e985e9c514610a16575f80fd5b8063c6ab67a3116100d8578063c6ab67a314610962578063c87b56dd14610981578063ca6ce643146109a0578063d111515d146109b5575f80fd5b8063b9c4d9fb146108c7578063bebb42c1146108f3578063c155531d14610908578063c23dc68f14610936575f80fd5b80638462151c1161017e57806399a2557a1161014e57806399a2557a14610863578063a217fddf14610882578063a22cb46514610895578063b88d4fde146108b4575f80fd5b80638462151c146107f25780638da5cb5b1461081157806391d148541461083057806395d89b411461084f575f80fd5b806375b238fc116101b957806375b238fc146107805780637c7bd02b146107a057806382fc3147146107bf5780638456cb59146107de575f80fd5b8063698f87be146107235780636b29b79f1461074257806370a0823114610761575f80fd5b80633549345e116102bf57806342966c681161025f5780635c975abb1161022f5780635c975abb146106b9578063613d165b146106d05780636352211e146106ef578063682373291461070e575f80fd5b806342966c681461063c5780634875bccb1461065b57806350f418ef1461066e5780635bbb21771461068d575f80fd5b80633ccfd60b1161029a5780633ccfd60b146105e25780633f4ba83a146105f6578063411d8f2f1461060a57806342842e0e14610629575f80fd5b80633549345e1461059157806336568abe146105b05780633c14a2de146105cf575f80fd5b8063119bba6211610335578063248a9ca311610305578063248a9ca31461051057806328d7b2761461053e5780632f2ff15d1461055d57806332cb6b0c1461057c575f80fd5b8063119bba62146104a557806318160ddd146104c45780631919fed7146104de57806323b872dd146104fd575f80fd5b806306fdde031161037057806306fdde031461040c578063081812fc1461042d578063095ea7b3146104645780630ebd4c7f14610479575f80fd5b80620e7fa81461039557806301ffc9a7146103bd578063054f7d9c146103ec575b5f80fd5b3480156103a0575f80fd5b506103aa60105481565b6040519081526020015b60405180910390f35b3480156103c8575f80fd5b506103dc6103d73660046129ee565b610ade565b60405190151581526020016103b4565b3480156103f7575f80fd5b506012546103dc90600160a01b900460ff1681565b348015610417575f80fd5b50610420610aee565b6040516103b49190612a56565b348015610438575f80fd5b5061044c610447366004612a68565b610b7e565b6040516001600160a01b0390911681526020016103b4565b610477610472366004612a93565b610bc0565b005b348015610484575f80fd5b50610498610493366004612a68565b610c5e565b6040516103b49190612abd565b3480156104b0575f80fd5b506104776104bf366004612a68565b610cd5565b3480156104cf575f80fd5b506001545f54035f19016103aa565b3480156104e9575f80fd5b506104776104f8366004612a68565b610d1d565b61047761050b366004612af4565b610d65565b34801561051b575f80fd5b506103aa61052a366004612a68565b5f9081526009602052604090206001015490565b348015610549575f80fd5b50610477610558366004612a68565b610ef8565b348015610568575f80fd5b50610477610577366004612b32565b610f40565b348015610587575f80fd5b506103aa6115b381565b34801561059c575f80fd5b506104776105ab366004612a68565b610f69565b3480156105bb575f80fd5b506104776105ca366004612b32565b610fb1565b6104776105dd366004612ba7565b61102f565b3480156105ed575f80fd5b506104776111aa565b348015610601575f80fd5b5061047761122d565b348015610615575f80fd5b50600c5461044c906001600160a01b031681565b610477610637366004612af4565b61127a565b348015610647575f80fd5b50610477610656366004612a68565b611294565b610477610669366004612a68565b6112a2565b348015610679575f80fd5b50610477610688366004612af4565b61132f565b348015610698575f80fd5b506106ac6106a7366004612bf5565b611457565b6040516103b49190612c6f565b3480156106c4575f80fd5b5060085460ff166103dc565b3480156106db575f80fd5b506104776106ea366004612cb0565b61151e565b3480156106fa575f80fd5b5061044c610709366004612a68565b611583565b348015610719575f80fd5b506103aa600f5481565b34801561072e575f80fd5b50600a5461044c906001600160a01b031681565b34801561074d575f80fd5b5061047761075c366004612cb0565b61158d565b34801561076c575f80fd5b506103aa61077b366004612cb0565b6115f2565b34801561078b575f80fd5b506103aa5f8051602061320a83398151915281565b3480156107ab575f80fd5b506104776107ba366004612a93565b61163e565b3480156107ca575f80fd5b506104776107d9366004612cb0565b6116a7565b3480156107e9575f80fd5b50610477611797565b3480156107fd575f80fd5b5061049861080c366004612cb0565b6117e2565b34801561081c575f80fd5b5060135461044c906001600160a01b031681565b34801561083b575f80fd5b506103dc61084a366004612b32565b6118e6565b34801561085a575f80fd5b50610420611910565b34801561086e575f80fd5b5061049861087d366004612ccb565b61191f565b34801561088d575f80fd5b506103aa5f81565b3480156108a0575f80fd5b506104776108af366004612d0a565b611a9e565b6104776108c2366004612da0565b611b09565b3480156108d2575f80fd5b506108e66108e1366004612a68565b611b4d565b6040516103b49190612e47565b3480156108fe575f80fd5b506103aa600d5481565b348015610913575f80fd5b50610927610922366004612e87565b611bd2565b6040516103b493929190612eff565b348015610941575f80fd5b50610955610950366004612a68565b611c49565b6040516103b49190612f2e565b34801561096d575f80fd5b5060125461044c906001600160a01b031681565b34801561098c575f80fd5b5061042061099b366004612a68565b611cce565b3480156109ab575f80fd5b506103aa600e5481565b3480156109c0575f80fd5b50610477611d62565b3480156109d4575f80fd5b506104776109e3366004612b32565b611deb565b3480156109f3575f80fd5b50600e544210156103dc565b348015610a0a575f80fd5b50600d544210156103dc565b348015610a21575f80fd5b506103dc610a30366004612f3c565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b348015610a68575f80fd5b50600b5461044c906001600160a01b031681565b348015610a87575f80fd5b506103aa60115481565b348015610a9c575f80fd5b506103dc610aab366004612cb0565b60146020525f908152604090205460ff1681565b348015610aca575f80fd5b50610477610ad9366004612a68565b611e0f565b5f610ae882611e57565b92915050565b606060028054610afd90612f68565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2990612f68565b8015610b745780601f10610b4b57610100808354040283529160200191610b74565b820191905f5260205f20905b815481529060010190602001808311610b5757829003601f168201915b5050505050905090565b5f610b8882611e7b565b610ba5576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610bca82611583565b9050336001600160a01b03821614610c0357610be68133610a30565b610c03576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6060610c6982611e7b565b610c8e5760405162461bcd60e51b8152600401610c8590612fa0565b60405180910390fd5b6040805160018082528183019092525f9160208083019080368337019050509050600f54815f81518110610cc457610cc4612fbd565b602090810291909101015292915050565b610cec5f8051602061320a833981519152336118e6565b80610cfc5750610cfc5f336118e6565b610d185760405162461bcd60e51b8152600401610c8590612fd1565b600d55565b610d345f8051602061320a833981519152336118e6565b80610d445750610d445f336118e6565b610d605760405162461bcd60e51b8152600401610c8590612fd1565b601155565b5f610d6f82611ead565b9050836001600160a01b0316816001600160a01b031614610da25760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054610dcd8187335b6001600160a01b039081169116811491141790565b610df857610ddb8633610a30565b610df857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e1f57604051633a954ecd60e21b815260040160405180910390fd5b610e2c8686866001611f16565b8015610e36575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610ec257600184015f818152600460205260408120549003610ec0575f548114610ec0575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03165f805160206131ea83398151915260405160405180910390a4505050505050565b610f0f5f8051602061320a833981519152336118e6565b80610f1f5750610f1f5f336118e6565b610f3b5760405162461bcd60e51b8152600401610c8590612fd1565b601555565b5f82815260096020526040902060010154610f5a81611f3a565b610f648383611f44565b505050565b610f805f8051602061320a833981519152336118e6565b80610f905750610f905f336118e6565b610fac5760405162461bcd60e51b8152600401610c8590612fd1565b601055565b6001600160a01b03811633146110215760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c85565b61102b8282611fc9565b5050565b600d5442101561106c5760405162461bcd60e51b8152602060048201526008602482015267546f6f4561726c7960c01b6044820152606401610c85565b348160105461107b9190613012565b146110b35760405162461bcd60e51b8152602060048201526008602482015267426164507269636560c01b6044820152606401610c85565b6110be83838661202f565b6110f55760405162461bcd60e51b81526020600482015260086024820152672130b2283937b7b360c11b6044820152606401610c85565b838111156111395760405162461bcd60e51b815260206004820152601160248201527008af0c6cacac8e6a0e4cae6c2d8ca9ac2f607b1b6044820152606401610c85565b335f9081526014602052604090205460ff16156111825760405162461bcd60e51b815260206004820152600760248201526610db185a5b595960ca1b6044820152606401610c85565b335f908152601460205260409020805460ff191660011790556111a4816120f2565b50505050565b6111b45f336118e6565b6111f65760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610c85565b600b5460405147916001600160a01b03169082156108fc029083905f818181858888f1935050505015801561102b573d5f803e3d5ffd5b6112445f8051602061320a833981519152336118e6565b8061125457506112545f336118e6565b6112705760405162461bcd60e51b8152600401610c8590612fd1565b6112786121bf565b565b610f6483838360405180602001604052805f815250611b09565b61129f816001612252565b50565b600e544210156112df5760405162461bcd60e51b8152602060048201526008602482015267546f6f4561726c7960c01b6044820152606401610c85565b34816011546112ee9190613012565b146113265760405162461bcd60e51b8152602060048201526008602482015267426164507269636560c01b6044820152606401610c85565b61129f816120f2565b6113465f8051602061320a833981519152336118e6565b8061135657506113565f336118e6565b6113725760405162461bcd60e51b8152600401610c8590612fd1565b60405163095ea7b360e01b8152306004820152602481018290526001600160a01b0384169063095ea7b3906044016020604051808303815f875af11580156113bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113e09190613029565b506040516323b872dd60e01b81523060048201526001600160a01b038381166024830152604482018390528416906323b872dd906064016020604051808303815f875af1158015611433573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111a49190613029565b6060815f816001600160401b0381111561147357611473612d36565b6040519080825280602002602001820160405280156114c357816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f199092019101816114915790505b5090505f5b828114611515576114f08686838181106114e4576114e4612fbd565b90506020020135611c49565b82828151811061150257611502612fbd565b60209081029190910101526001016114c8565b50949350505050565b6115355f8051602061320a833981519152336118e6565b8061154557506115455f336118e6565b6115615760405162461bcd60e51b8152600401610c8590612fd1565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b5f610ae882611ead565b6115a45f8051602061320a833981519152336118e6565b806115b457506115b45f336118e6565b6115d05760405162461bcd60e51b8152600401610c8590612fd1565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001600160a01b03821661161a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b6116555f8051602061320a833981519152336118e6565b8061166557506116655f336118e6565b6116815760405162461bcd60e51b8152600401610c8590612fd1565b600c80546001600160a01b0319166001600160a01b039390931692909217909155600f55565b6116be5f8051602061320a833981519152336118e6565b806116ce57506116ce5f336118e6565b6116ea5760405162461bcd60e51b8152600401610c8590612fd1565b601254600160a01b900460ff161561172d5760405162461bcd60e51b8152602060048201526006602482015265233937bd32b760d11b6044820152606401610c85565b6001600160a01b0381163b6117755760405162461bcd60e51b815260206004820152600e60248201526d139bdd08184818dbdb9d1c9858dd60921b6044820152606401610c85565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6117ae5f8051602061320a833981519152336118e6565b806117be57506117be5f336118e6565b6117da5760405162461bcd60e51b8152600401610c8590612fd1565b61127861238c565b60605f805f6117f0856115f2565b90505f816001600160401b0381111561180b5761180b612d36565b604051908082528060200260200182016040528015611834578160200160208202803683370190505b509050611860604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146118da5761187381612407565b915081604001516118d25781516001600160a01b03161561189357815194505b876001600160a01b0316856001600160a01b0316036118d257808387806001019850815181106118c5576118c5612fbd565b6020026020010181815250505b600101611863565b50909695505050505050565b5f9182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060038054610afd90612f68565b606081831061194157604051631960ccad60e11b815260040160405180910390fd5b5f8061194b5f5490565b9050600185101561195b57600194505b80841115611967578093505b5f611971876115f2565b905084861015611990578585038181101561198a578091505b50611993565b505f5b5f816001600160401b038111156119ac576119ac612d36565b6040519080825280602002602001820160405280156119d5578160200160208202803683370190505b509050815f036119ea579350611a9792505050565b5f6119f488611c49565b90505f8160400151611a04575080515b885b888114158015611a165750848714155b15611a8b57611a2481612407565b92508260400151611a835782516001600160a01b031615611a4457825191505b8a6001600160a01b0316826001600160a01b031603611a835780848880600101995081518110611a7657611a76612fbd565b6020026020010181815250505b600101611a06565b50505092835250909150505b9392505050565b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b14848484610d65565b6001600160a01b0383163b156111a457611b3084848484612441565b6111a4576040516368d2bf6b60e11b815260040160405180910390fd5b6060611b5882611e7b565b611b745760405162461bcd60e51b8152600401610c8590612fa0565b6040805160018082528183019092525f91602080830190803683375050600c5482519293506001600160a01b0316918391505f90611bb457611bb4612fbd565b6001600160a01b039092166020928302919091019091015292915050565b600c54600f545f9182916060916001600160a01b031690611bf590606490613044565b611bff9088613044565b868681818080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250969e959d50919b50939950505050505050505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091526001831080611c9f57505f548310155b15611caa5792915050565b611cb383612407565b9050806040015115611cc55792915050565b611a9783612528565b6060611cd982611e7b565b611cf55760405162461bcd60e51b8152600401610c8590612fa0565b600a5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd906024015f60405180830381865afa158015611d3b573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610ae89190810190613063565b611d6c5f336118e6565b611dae5760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610c85565b6012805460ff60a01b1916600160a01b1790556040517fa8cab3d1893ed53071b052fafa843143492f25d1d6b0170d460789f7ab1954be905f90a1565b5f82815260096020526040902060010154611e0581611f3a565b610f648383611fc9565b611e265f8051602061320a833981519152336118e6565b80611e365750611e365f336118e6565b611e525760405162461bcd60e51b8152600401610c8590612fd1565b600e55565b5f6001600160e01b03198216637965db0b60e01b1480610ae85750610ae88261255c565b5f81600111158015611e8d57505f5482105b8015610ae85750505f90815260046020526040902054600160e01b161590565b5f8180600111611efd575f54811015611efd575f8181526004602052604081205490600160e01b82169003611efb575b805f03611a9757505f19015f81815260046020526040902054611edd565b505b604051636f96cda160e11b815260040160405180910390fd5b60085460ff16156111a45760405163ab35696f60e01b815260040160405180910390fd5b61129f8133612580565b611f4e82826118e6565b61102b575f8281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fd382826118e6565b1561102b575f8281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516bffffffffffffffffffffffff193360601b166020820152603481018290525f9081906054016040516020818303038152906040528051906020012090506120b08585808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505060155491508490506125e4565b6120e75760405162461bcd60e51b81526020600482015260086024820152672130b2283937b7b360c11b6044820152606401610c85565b506001949350505050565b5f6121046001545f545f199190030190565b90505f61211183836130cb565b90505f60646121216001856130de565b61212b9190613044565b60646121386001856130de565b6121429190613044565b61214c91906130de565b90506115b361215b82846130cb565b11156121995760405162461bcd60e51b815260206004820152600d60248201526c45786365656473537570706c7960981b6044820152606401610c85565b6121a333856125f9565b80156111a4576013546111a4906001600160a01b0316826125f9565b60085460ff166122085760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c85565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b5f61225c83611ead565b9050805f80612278865f90815260066020526040902080549091565b9150915084156122b85761228d818433610db8565b6122b85761229b8333610a30565b6122b857604051632ce44b5f60e11b815260040160405180910390fd5b6122c5835f886001611f16565b80156122cf575f82555b6001600160a01b0383165f81815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b175f87815260046020526040812091909155600160e11b8516900361235857600186015f818152600460205260408120549003612356575f548114612356575f8181526004602052604090208590555b505b60405186905f906001600160a01b038616905f805160206131ea833981519152908390a45050600180548101905550505050565b60085460ff16156123d25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c85565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122353390565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610ae890612612565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906124759033908990889088906004016130f1565b6020604051808303815f875af19250505080156124af575060408051601f3d908101601f191682019092526124ac9181019061312d565b60015b61250b573d8080156124dc576040519150601f19603f3d011682016040523d82523d5f602084013e6124e1565b606091505b5080515f03612503576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152610ae861255783611ead565b612612565b5f6001600160e01b0319821663c155531d60e01b1480610ae85750610ae882612659565b61258a82826118e6565b61102b576125a2816001600160a01b0316601461268d565b6125ad83602061268d565b6040516020016125be929190613148565b60408051601f198184030181529082905262461bcd60e51b8252610c8591600401612a56565b5f826125f08584612822565b14949350505050565b61102b828260405180602001604052805f815250612892565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b5f6001600160e01b03198216632dde656160e21b1480610ae857506301ffc9a760e01b6001600160e01b0319831614610ae8565b60605f61269b836002613012565b6126a69060026130cb565b6001600160401b038111156126bd576126bd612d36565b6040519080825280601f01601f1916602001820160405280156126e7576020820181803683370190505b509050600360fc1b815f8151811061270157612701612fbd565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061272f5761272f612fbd565b60200101906001600160f81b03191690815f1a9053505f612751846002613012565b61275c9060016130cb565b90505b60018111156127d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061279057612790612fbd565b1a60f81b8282815181106127a6576127a6612fbd565b60200101906001600160f81b03191690815f1a90535060049490941c936127cc816131bc565b905061275f565b508315611a975760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c85565b5f81815b845181101561288a575f85828151811061284257612842612fbd565b60200260200101519050808311612867575f8381526020829052604090209250612877565b5f81815260208490526040902092505b5080612882816131d1565b915050612826565b509392505050565b61289c83836128fb565b6001600160a01b0383163b15610f64575f548281035b6128c45f868380600101945086612441565b6128e1576040516368d2bf6b60e11b815260040160405180910390fd5b8181106128b257815f54146128f4575f80fd5b5050505050565b5f80549082900361291f5760405163b562e8dd60e01b815260040160405180910390fd5b61292b5f848385611f16565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083905f805160206131ea8339815191528180a4600183015b8181146129b15780835f5f805160206131ea8339815191525f80a460010161298e565b50815f036129d157604051622e076360e81b815260040160405180910390fd5b5f5550505050565b6001600160e01b03198116811461129f575f80fd5b5f602082840312156129fe575f80fd5b8135611a97816129d9565b5f5b83811015612a23578181015183820152602001612a0b565b50505f910152565b5f8151808452612a42816020860160208601612a09565b601f01601f19169290920160200192915050565b602081525f611a976020830184612a2b565b5f60208284031215612a78575f80fd5b5035919050565b6001600160a01b038116811461129f575f80fd5b5f8060408385031215612aa4575f80fd5b8235612aaf81612a7f565b946020939093013593505050565b602080825282518282018190525f9190848201906040850190845b818110156118da57835183529284019291840191600101612ad8565b5f805f60608486031215612b06575f80fd5b8335612b1181612a7f565b92506020840135612b2181612a7f565b929592945050506040919091013590565b5f8060408385031215612b43575f80fd5b823591506020830135612b5581612a7f565b809150509250929050565b5f8083601f840112612b70575f80fd5b5081356001600160401b03811115612b86575f80fd5b6020830191508360208260051b8501011115612ba0575f80fd5b9250929050565b5f805f8060608587031215612bba575f80fd5b8435935060208501356001600160401b03811115612bd6575f80fd5b612be287828801612b60565b9598909750949560400135949350505050565b5f8060208385031215612c06575f80fd5b82356001600160401b03811115612c1b575f80fd5b612c2785828601612b60565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156118da57612c9d838551612c33565b9284019260809290920191600101612c8a565b5f60208284031215612cc0575f80fd5b8135611a9781612a7f565b5f805f60608486031215612cdd575f80fd5b8335612ce881612a7f565b95602085013595506040909401359392505050565b801515811461129f575f80fd5b5f8060408385031215612d1b575f80fd5b8235612d2681612a7f565b91506020830135612b5581612cfd565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715612d7257612d72612d36565b604052919050565b5f6001600160401b03821115612d9257612d92612d36565b50601f01601f191660200190565b5f805f8060808587031215612db3575f80fd5b8435612dbe81612a7f565b93506020850135612dce81612a7f565b92506040850135915060608501356001600160401b03811115612def575f80fd5b8501601f81018713612dff575f80fd5b8035612e12612e0d82612d7a565b612d4a565b818152886020838501011115612e26575f80fd5b816020840160208301375f6020838301015280935050505092959194509250565b602080825282518282018190525f9190848201906040850190845b818110156118da5783516001600160a01b031683529284019291840191600101612e62565b5f805f8060608587031215612e9a575f80fd5b843593506020850135925060408501356001600160401b0380821115612ebe575f80fd5b818701915087601f830112612ed1575f80fd5b813581811115612edf575f80fd5b886020828501011115612ef0575f80fd5b95989497505060200194505050565b60018060a01b0384168152826020820152606060408201525f612f256060830184612a2b565b95945050505050565b60808101610ae88284612c33565b5f8060408385031215612f4d575f80fd5b8235612f5881612a7f565b91506020830135612b5581612a7f565b600181811c90821680612f7c57607f821691505b602082108103612f9a57634e487b7160e01b5f52602260045260245ffd5b50919050565b602080825260039082015262444e4560e81b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b60208082526013908201527221b0b63632b91034b9903737ba1030b236b4b760691b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610ae857610ae8612ffe565b5f60208284031215613039575f80fd5b8151611a9781612cfd565b5f8261305e57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215613073575f80fd5b81516001600160401b03811115613088575f80fd5b8201601f81018413613098575f80fd5b80516130a6612e0d82612d7a565b8181528560208385010111156130ba575f80fd5b612f25826020830160208601612a09565b80820180821115610ae857610ae8612ffe565b81810381811115610ae857610ae8612ffe565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061312390830184612a2b565b9695505050505050565b5f6020828403121561313d575f80fd5b8151611a97816129d9565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f835161317f816017850160208801612a09565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516131b0816028840160208801612a09565b01602801949350505050565b5f816131ca576131ca612ffe565b505f190190565b5f600182016131e2576131e2612ffe565b506001019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220b6c42bae1014ba8878ddcb54792ff237b38f6d5f79747b4bc56c236cb8638bf764736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $2,634.43 | 0.4995 | $1,315.9 |
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.