ERC-721
Overview
Max Total Supply
2,771 SHISHI
Holders
733
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 SHISHILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Shishi
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only+VPL pragma solidity ^0.8.16; import {ERC721A} from "@ERC721A/contracts/ERC721A.sol"; import {LibPack} from "./LibPack.sol"; import {Ownable} from "solady/auth/Ownable.sol"; import {MerkleProofLib} from "solady/utils/MerkleProofLib.sol"; import {IShishi} from "./IShishi.sol"; /** * @custom:benediction DEVS BENEDICAT ET PROTEGAT CONTRACTVM MEVM * @title Shishi. Ever dream this girl? * @author 0x_ultra * @author many beautiful Shishis * @custom:version 2.0 * * Shishi is a generative art project by shirosama.eth; yippiee! * * @custom:date December 29th, 2023. */ contract Shishi is ERC721A, IShishi, Ownable { using LibPack for *; /** * Store the provenance hash. This is computed as the keccak256 hash of the * images for all Shishis, in token ID order, concatenated together and then * hashed one last time forever. We understand that this is only a weak * guarantee of honesty--it proves that we committed to the art and its order * prior to beginning the mint but does nothing to trustlessly conceal the * specific metadata of particular Shishis ahead of time. You'll just have to * deal with that; schemes which apply provably-randomized offsets to the * provenance data are very difficult to reconcile with instant reveals. */ bytes32 private constant provenance = 0x33f697f5034dee7c24e34d7c737bab50920b3cbd1a4854e01230b8568d910dae; /// Track the base token metadata URI. string internal baseURI; /// Track whether the base token metadata URI is locked to future changes. bool private baseURILocked; /// Track the total supply cap on the number of Shishis that may be minted. uint256 private constant cap = 3520; // File extension for metadata string private fileExtension = ".json"; /// Phase start times Phases public phasetimes; /// Merkle roots Roots public roots; /// Track the number of utilized FCFS Milady/Remilio mints. uint256 public fcfs; /** * Construct an instance of the Shishi contract. * * @param _owner The initial owner of this contract. * @param _initialBaseURI The initial base token metadata URI to use. * @param _phasetimes The initial phase times. * @param _roots The initial merkle roots. */ constructor(address _owner, string memory _initialBaseURI, Phases memory _phasetimes, Roots memory _roots) ERC721A("Shishi", "SHISHI") { _initializeOwner(_owner); baseURI = _initialBaseURI; phasetimes = _phasetimes; roots = _roots; _mint(_owner, 1); } /** * Phase one mint (Oh I see and Shishi maker) * * @param _paidWant The number of paid Shishis to mint. * @param _freeWant The number of free Shishis to mint. * @param _paidMax The maximum number of paid Shishis that may be minted by the user. * @param _freeMax The maximum number of free Shishis that may be minted by the user. * @param proof The merkle proof. */ function mintOne(uint8 _paidWant, uint8 _freeWant, uint8 _paidMax, uint8 _freeMax, bytes32[] calldata proof) external payable { Claimed memory claimed = claimedOne(msg.sender); _verifyMint(_paidWant, _freeWant, _paidMax, _freeMax, proof, phasetimes.startOne, roots.rootOne, claimed); claimed.paid += _paidWant; claimed.free += _freeWant; _setClaimedOne(msg.sender, claimed); _mint(msg.sender, _paidWant + _freeWant); emit PhaseOneMinted(msg.sender, _paidWant, _freeWant); } /** * Phase two mint (Miladys and Remilios) * * @param _paidWant The number of paid Shishis to mint. * @param _freeWant The number of free Shishis to mint. * @param _paidMax The maximum number of paid Shishis that may be minted by the user. * @param _freeMax The maximum number of free Shishis that may be minted by the user. * @param proof The merkle proof. */ function mintTwo(uint8 _paidWant, uint8 _freeWant, uint8 _paidMax, uint8 _freeMax, bytes32[] calldata proof) external payable { Claimed memory claimed = claimedTwo(msg.sender); if (_freeWant > 0 && fcfs >= 300) { revert OutOfStock(); } _verifyMint(_paidWant, _freeWant, _paidMax, _freeMax, proof, phasetimes.startTwo, roots.rootTwo, claimed); claimed.paid += _paidWant; claimed.free += _freeWant; _setClaimedTwo(msg.sender, claimed); _mint(msg.sender, _paidWant + _freeWant); if (_freeWant > 0) { fcfs += _freeWant; } emit PhaseTwoMinted(msg.sender, _paidWant, _freeWant); } /** * Phase three mint (Public Mint) * * @param _amount The number of Shishis to mint. */ function mintThree(uint8 _amount) external payable { if (block.timestamp < phasetimes.startThree) { revert NotStartedYet(); } if (_totalMinted() + _amount > cap) { revert OutOfStock(); } uint8 claimed = claimedThree(msg.sender); if (claimed + _amount > 2) { revert OutOfMints(); } if (msg.value < uint256(_amount) * 0.04 ether) { revert NotEnoughPayment(); } if (msg.sender != tx.origin) { uint8 claimedOrigin = claimedThree(tx.origin); if (claimedOrigin + _amount > 2) { revert OutOfMints(); } _setClaimedThree(tx.origin, claimedOrigin + _amount); } _setClaimedThree(msg.sender, claimed + _amount); _mint(msg.sender, _amount); emit PhaseThreeMinted(msg.sender, _amount); } /** * Verifies that all conditions are met for the user to mint */ function _verifyMint( uint8 _paidWant, uint8 _freeWant, uint8 _paidMax, uint8 _freeMax, bytes32[] calldata proof, uint256 _phase, bytes32 _root, Claimed memory claimed ) internal { if (block.timestamp < _phase) { revert NotStartedYet(); } if (_totalMinted() + _paidWant + _freeWant > cap) { revert OutOfStock(); } if (MerkleProofLib.verifyCalldata(proof, _root, keccak256(abi.encodePacked(msg.sender, _paidMax, _freeMax)))) { revert CannotClaimInvalidProof(); } if (claimed.paid + _paidWant > _paidMax || claimed.free + _freeWant > _freeMax) { revert OutOfMints(); } if (msg.value < uint256(_paidWant) * 0.033 ether) { revert NotEnoughPayment(); } } /** * Override the starting index of the first Shishi. * * @return _ The token ID of the first Shishi. */ function _startTokenId() internal view virtual override returns (uint256) { return 1; } /** * Override the `_baseURI` used in our parent contract with our set value. * * @return _ The base token metadata URI. */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * Allows querying the URI for a given token ID. * * @param _tokenId uint256 ID of the token to query * @return URI of given token ID */ function tokenURI(uint256 _tokenId) public view override(ERC721A) returns (string memory) { return string(abi.encodePacked(baseURI, _toString(_tokenId), fileExtension)); } /** * Track Shishis minted by users during phase one. * * @return _ Shishis minted. */ function claimedOne(address _address) public view returns (Claimed memory) { uint64 x = _getAux(_address); return Claimed({paid: x.get(0), free: x.get(1)}); } /** * Track Shishis minted by users during phase two. * * @return _ Shishis minted. */ function claimedTwo(address _address) public view returns (Claimed memory) { uint64 x = _getAux(_address); return Claimed({paid: x.get(2), free: x.get(3)}); } /** * Track Shishis minted by users during phase three. * * @return _ Shishis minted. */ function claimedThree(address _address) public view returns (uint8) { uint64 x = _getAux(_address); return x.get(4); } /** * Set Shishis minted by users during phase one. */ function _setClaimedOne(address _address, Claimed memory _claimed) internal { _setAux(_address, _getAux(_address).set(0, _claimed.paid).set(1, _claimed.free)); } /** * Set Shishis minted by users during phase two. */ function _setClaimedTwo(address _address, Claimed memory _claimed) internal { _setAux(_address, _getAux(_address).set(2, _claimed.paid).set(3, _claimed.free)); } /** * Set Shishis minted by users during phase three. */ function _setClaimedThree(address _address, uint8 _claimed) internal { _setAux(_address, _getAux(_address).set(4, _claimed)); } /** * Allow the contract owner to set the base token metadata URI. * * @param _newBaseURI The new base token metadata URI to set. * @custom:throws BaseURILocked if the base token metadata URI is locked * against future changes. */ function setBaseURI(string memory _newBaseURI) external onlyOwner { if (baseURILocked) { revert BaseURILocked(); } else { baseURI = _newBaseURI; } } /** * Allow the contract owner to permanently lock base URI changes. */ function lockBaseURI() external onlyOwner { baseURILocked = true; } /** * Allow the contract owner to set the whitelist phase times. * * @param _startOne The new phase one time. * @param _startTwo The new phase two time. * @param _startThree The new phase three time. */ function setPhases(uint256 _startOne, uint64 _startTwo, uint64 _startThree) external onlyOwner { phasetimes = Phases(uint64(_startOne), _startTwo, _startThree); } /** * Allow the contract owner to set the whitelist roots. * * @param _rootOne The new phase one root. * @param _rootTwo The new phase two root. */ function setRoots(bytes32 _rootOne, bytes32 _rootTwo) external onlyOwner { roots = Roots(_rootOne, _rootTwo); } /** * Allows the owner to sweep the contract balance. */ function sweep(address _to) external onlyOwner { (bool success,) = payable(_to).call{value: address(this).balance}(""); if (!success) revert SweepingTransferFailed(); } }
// 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: AGPL-3.0-only+VPL pragma solidity ^0.8.16; /** * @dev Library for packing uint8s in a uint64. */ library LibPack { /** * @dev Returns the `_i`th uint8 in `_x`. * @param _x The packed uint64. * @param _i The index of the element. * @return The element. */ function get(uint64 _x, uint256 _i) internal pure returns (uint8) { return uint8(uint256(_x) >> (_i << 3)); } /** * @dev Sets the `_i`th element to `_v` and returns the updated packed value. * @param _x The packed uint64. * @param _i The index of the element. * @param _v The value of the element. * @return The updated packed value. */ function set(uint64 _x, uint256 _i, uint8 _v) internal pure returns (uint64) { uint256 s = _i << 3; return uint64(uint256(_x) ^ (((uint256(_x) >> s) ^ uint256(_v)) & 0xff) << s); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// /// @dev Note: /// This implementation does NOT auto-initialize the owner to `msg.sender`. /// You MUST call the `_initializeOwner` in the constructor / initializer. /// /// While the ownable portion follows /// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility, /// the nomenclature for the 2-step ownership handover may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev Cannot double-initialize. error AlreadyInitialized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`. /// It is intentionally chosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. bytes32 internal constant _OWNER_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return true to make `_initializeOwner` prevent double-initialization. function _guardInitializeOwner() internal pure virtual returns (bool guard) {} /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT if sload(ownerSlot) { mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`. revert(0x1c, 0x04) } // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } else { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(_OWNER_SLOT, newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) } } else { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(_OWNER_SLOT))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. /// Override to return a different value if needed. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ownershipHandoverValidFor() internal view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + _ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(_OWNER_SLOT) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Gas optimized verification of proof of inclusion for a leaf in a Merkle tree. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/MerkleProofLib.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol) library MerkleProofLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MERKLE PROOF VERIFICATION OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`. function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool isValid) { /// @solidity memory-safe-assembly assembly { if mload(proof) { // Initialize `offset` to the offset of `proof` elements in memory. let offset := add(proof, 0x20) // Left shift by 5 is equivalent to multiplying by 0x20. let end := add(offset, shl(5, mload(proof))) // Iterate over proof elements to compute root hash. for {} 1 {} { // Slot of `leaf` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(leaf, mload(offset))) // Store elements to hash contiguously in scratch space. // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes. mstore(scratch, leaf) mstore(xor(scratch, 0x20), mload(offset)) // Reuse `leaf` to store the hash to reduce stack operations. leaf := keccak256(0x00, 0x40) offset := add(offset, 0x20) if iszero(lt(offset, end)) { break } } } isValid := eq(leaf, root) } } /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`. function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool isValid) { /// @solidity memory-safe-assembly assembly { if proof.length { // Left shift by 5 is equivalent to multiplying by 0x20. let end := add(proof.offset, shl(5, proof.length)) // Initialize `offset` to the offset of `proof` in the calldata. let offset := proof.offset // Iterate over proof elements to compute root hash. for {} 1 {} { // Slot of `leaf` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(leaf, calldataload(offset))) // Store elements to hash contiguously in scratch space. // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes. mstore(scratch, leaf) mstore(xor(scratch, 0x20), calldataload(offset)) // Reuse `leaf` to store the hash to reduce stack operations. leaf := keccak256(0x00, 0x40) offset := add(offset, 0x20) if iszero(lt(offset, end)) { break } } } isValid := eq(leaf, root) } } /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`, /// given `proof` and `flags`. /// /// Note: /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length` /// will always return false. /// - The sum of the lengths of `proof` and `leaves` must never overflow. /// - Any non-zero word in the `flags` array is treated as true. /// - The memory offset of `proof` must be non-zero /// (i.e. `proof` is not pointing to the scratch space). function verifyMultiProof( bytes32[] memory proof, bytes32 root, bytes32[] memory leaves, bool[] memory flags ) internal pure returns (bool isValid) { // Rebuilds the root by consuming and producing values on a queue. // The queue starts with the `leaves` array, and goes into a `hashes` array. // After the process, the last element on the queue is verified // to be equal to the `root`. // // The `flags` array denotes whether the sibling // should be popped from the queue (`flag == true`), or // should be popped from the `proof` (`flag == false`). /// @solidity memory-safe-assembly assembly { // Cache the lengths of the arrays. let leavesLength := mload(leaves) let proofLength := mload(proof) let flagsLength := mload(flags) // Advance the pointers of the arrays to point to the data. leaves := add(0x20, leaves) proof := add(0x20, proof) flags := add(0x20, flags) // If the number of flags is correct. for {} eq(add(leavesLength, proofLength), add(flagsLength, 1)) {} { // For the case where `proof.length + leaves.length == 1`. if iszero(flagsLength) { // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`. isValid := eq(mload(xor(leaves, mul(xor(proof, leaves), proofLength))), root) break } // The required final proof offset if `flagsLength` is not zero, otherwise zero. let proofEnd := add(proof, shl(5, proofLength)) // We can use the free memory space for the queue. // We don't need to allocate, since the queue is temporary. let hashesFront := mload(0x40) // Copy the leaves into the hashes. // Sometimes, a little memory expansion costs less than branching. // Should cost less, even with a high free memory offset of 0x7d00. leavesLength := shl(5, leavesLength) for { let i := 0 } iszero(eq(i, leavesLength)) { i := add(i, 0x20) } { mstore(add(hashesFront, i), mload(add(leaves, i))) } // Compute the back of the hashes. let hashesBack := add(hashesFront, leavesLength) // This is the end of the memory for the queue. // We recycle `flagsLength` to save on stack variables (sometimes save gas). flagsLength := add(hashesBack, shl(5, flagsLength)) for {} 1 {} { // Pop from `hashes`. let a := mload(hashesFront) // Pop from `hashes`. let b := mload(add(hashesFront, 0x20)) hashesFront := add(hashesFront, 0x40) // If the flag is false, load the next proof, // else, pops from the queue. if iszero(mload(flags)) { // Loads the next proof. b := mload(proof) proof := add(proof, 0x20) // Unpop from `hashes`. hashesFront := sub(hashesFront, 0x20) } // Advance to the next flag. flags := add(flags, 0x20) // Slot of `a` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(a, b)) // Hash the scratch space and push the result onto the queue. mstore(scratch, a) mstore(xor(scratch, 0x20), b) mstore(hashesBack, keccak256(0x00, 0x40)) hashesBack := add(hashesBack, 0x20) if iszero(lt(hashesBack, flagsLength)) { break } } isValid := and( // Checks if the last value in the queue is same as the root. eq(mload(sub(hashesBack, 0x20)), root), // And whether all the proofs are used, if required. eq(proofEnd, proof) ) break } } } /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`, /// given `proof` and `flags`. /// /// Note: /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length` /// will always return false. /// - Any non-zero word in the `flags` array is treated as true. /// - The calldata offset of `proof` must be non-zero /// (i.e. `proof` is from a regular Solidity function with a 4-byte selector). function verifyMultiProofCalldata( bytes32[] calldata proof, bytes32 root, bytes32[] calldata leaves, bool[] calldata flags ) internal pure returns (bool isValid) { // Rebuilds the root by consuming and producing values on a queue. // The queue starts with the `leaves` array, and goes into a `hashes` array. // After the process, the last element on the queue is verified // to be equal to the `root`. // // The `flags` array denotes whether the sibling // should be popped from the queue (`flag == true`), or // should be popped from the `proof` (`flag == false`). /// @solidity memory-safe-assembly assembly { // If the number of flags is correct. for {} eq(add(leaves.length, proof.length), add(flags.length, 1)) {} { // For the case where `proof.length + leaves.length == 1`. if iszero(flags.length) { // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`. // forgefmt: disable-next-item isValid := eq( calldataload( xor(leaves.offset, mul(xor(proof.offset, leaves.offset), proof.length)) ), root ) break } // The required final proof offset if `flagsLength` is not zero, otherwise zero. let proofEnd := add(proof.offset, shl(5, proof.length)) // We can use the free memory space for the queue. // We don't need to allocate, since the queue is temporary. let hashesFront := mload(0x40) // Copy the leaves into the hashes. // Sometimes, a little memory expansion costs less than branching. // Should cost less, even with a high free memory offset of 0x7d00. calldatacopy(hashesFront, leaves.offset, shl(5, leaves.length)) // Compute the back of the hashes. let hashesBack := add(hashesFront, shl(5, leaves.length)) // This is the end of the memory for the queue. // We recycle `flagsLength` to save on stack variables (sometimes save gas). flags.length := add(hashesBack, shl(5, flags.length)) // We don't need to make a copy of `proof.offset` or `flags.offset`, // as they are pass-by-value (this trick may not always save gas). for {} 1 {} { // Pop from `hashes`. let a := mload(hashesFront) // Pop from `hashes`. let b := mload(add(hashesFront, 0x20)) hashesFront := add(hashesFront, 0x40) // If the flag is false, load the next proof, // else, pops from the queue. if iszero(calldataload(flags.offset)) { // Loads the next proof. b := calldataload(proof.offset) proof.offset := add(proof.offset, 0x20) // Unpop from `hashes`. hashesFront := sub(hashesFront, 0x20) } // Advance to the next flag offset. flags.offset := add(flags.offset, 0x20) // Slot of `a` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(a, b)) // Hash the scratch space and push the result onto the queue. mstore(scratch, a) mstore(xor(scratch, 0x20), b) mstore(hashesBack, keccak256(0x00, 0x40)) hashesBack := add(hashesBack, 0x20) if iszero(lt(hashesBack, flags.length)) { break } } isValid := and( // Checks if the last value in the queue is same as the root. eq(mload(sub(hashesBack, 0x20)), root), // And whether all the proofs are used, if required. eq(proofEnd, proof.offset) ) break } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EMPTY CALLDATA HELPERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an empty calldata bytes32 array. function emptyProof() internal pure returns (bytes32[] calldata proof) { /// @solidity memory-safe-assembly assembly { proof.length := 0 } } /// @dev Returns an empty calldata bytes32 array. function emptyLeaves() internal pure returns (bytes32[] calldata leaves) { /// @solidity memory-safe-assembly assembly { leaves.length := 0 } } /// @dev Returns an empty calldata bool array. function emptyFlags() internal pure returns (bool[] calldata flags) { /// @solidity memory-safe-assembly assembly { flags.length := 0 } } }
// SPDX-License-Identifier: AGPL-3.0-only+VPL pragma solidity ^0.8.16; interface IShishi { struct Phases { uint64 startOne; // timestamp start of phase one uint64 startTwo; // timestamp start of phase two uint64 startThree; // timestamp start of phase three } struct Claimed { uint8 paid; // paid mints uint8 free; // free mints } struct Roots { bytes32 rootOne; // root of the first whitelist merkle tree bytes32 rootTwo; // root of the second whitelist merkle tree } /// Thrown if the base token metadata URI is locked to updates. error BaseURILocked(); /// Thrown if an invalid proof is being supplied by the caller. error CannotClaimInvalidProof(); /// Thrown if the mint phase has not yet started. error NotStartedYet(); /// Thrown if the caller did not supply enough payment. error NotEnoughPayment(); /// Thrown if there are no more Shishis left to mint. error OutOfStock(); /** * This is thrown if a particular `msg.sender` (or, additionally, a `tx.origin` * acting on behalf of smart contract caller) has run out of permitted mints. * This does not and is not meant to protect against Sybil attacks originated by * multiple different accounts. */ error OutOfMints(); // Thrown if sweeping funds from this contract fails. error SweepingTransferFailed(); /// Emitted when user mints during phase one. event PhaseOneMinted(address indexed account, uint8 paid, uint8 free); /// Emitted when user mints during phase two. event PhaseTwoMinted(address indexed account, uint8 paid, uint8 free); /// Emitted when user mints during phase three. event PhaseThreeMinted(address indexed account, uint8 paid); }
// 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); }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "@ERC721A/=lib/ERC721A/", "operator-filter-registry/=lib/operator-filter-registry/", "solady/=lib/solady/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ERC721A/=lib/ERC721A/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/operator-filter-registry/lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_initialBaseURI","type":"string"},{"components":[{"internalType":"uint64","name":"startOne","type":"uint64"},{"internalType":"uint64","name":"startTwo","type":"uint64"},{"internalType":"uint64","name":"startThree","type":"uint64"}],"internalType":"struct IShishi.Phases","name":"_phasetimes","type":"tuple"},{"components":[{"internalType":"bytes32","name":"rootOne","type":"bytes32"},{"internalType":"bytes32","name":"rootTwo","type":"bytes32"}],"internalType":"struct IShishi.Roots","name":"_roots","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BaseURILocked","type":"error"},{"inputs":[],"name":"CannotClaimInvalidProof","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NotEnoughPayment","type":"error"},{"inputs":[],"name":"NotStartedYet","type":"error"},{"inputs":[],"name":"OutOfMints","type":"error"},{"inputs":[],"name":"OutOfStock","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SweepingTransferFailed","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"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint8","name":"paid","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"free","type":"uint8"}],"name":"PhaseOneMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint8","name":"paid","type":"uint8"}],"name":"PhaseThreeMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint8","name":"paid","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"free","type":"uint8"}],"name":"PhaseTwoMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"claimedOne","outputs":[{"components":[{"internalType":"uint8","name":"paid","type":"uint8"},{"internalType":"uint8","name":"free","type":"uint8"}],"internalType":"struct IShishi.Claimed","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"claimedThree","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"claimedTwo","outputs":[{"components":[{"internalType":"uint8","name":"paid","type":"uint8"},{"internalType":"uint8","name":"free","type":"uint8"}],"internalType":"struct IShishi.Claimed","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"fcfs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_paidWant","type":"uint8"},{"internalType":"uint8","name":"_freeWant","type":"uint8"},{"internalType":"uint8","name":"_paidMax","type":"uint8"},{"internalType":"uint8","name":"_freeMax","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"mintThree","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_paidWant","type":"uint8"},{"internalType":"uint8","name":"_freeWant","type":"uint8"},{"internalType":"uint8","name":"_paidMax","type":"uint8"},{"internalType":"uint8","name":"_freeMax","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintTwo","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":"result","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":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phasetimes","outputs":[{"internalType":"uint64","name":"startOne","type":"uint64"},{"internalType":"uint64","name":"startTwo","type":"uint64"},{"internalType":"uint64","name":"startThree","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"roots","outputs":[{"internalType":"bytes32","name":"rootOne","type":"bytes32"},{"internalType":"bytes32","name":"rootTwo","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startOne","type":"uint256"},{"internalType":"uint64","name":"_startTwo","type":"uint64"},{"internalType":"uint64","name":"_startThree","type":"uint64"}],"name":"setPhases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_rootOne","type":"bytes32"},{"internalType":"bytes32","name":"_rootTwo","type":"bytes32"}],"name":"setRoots","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":[{"internalType":"address","name":"_to","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60c06040526005608090815264173539b7b760d91b60a052600a9062000026908262000319565b503480156200003457600080fd5b5060405162002546380380620025468339810160408190526200005791620004ff565b6040518060400160405280600681526020016553686973686960d01b8152506040518060400160405280600681526020016553484953484960d01b8152508160029081620000a6919062000319565b506003620000b5828262000319565b5050600160005550620000c88462000154565b6008620000d6848262000319565b508151600b805460208086015160408701516001600160401b03908116600160801b02600160801b600160c01b031992821668010000000000000000026001600160801b0319909516919096161792909217919091169290921790558151600c55810151600d556200014a84600162000190565b50505050620005fe565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6000805490829003620001b65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020620025268339815191528180a4600183015b81811462000245578083600060008051602062002526833981519152600080a46001016200021c565b50816000036200026757604051622e076360e81b815260040160405180910390fd5b60005550505050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002a057607f821691505b602082108103620002c157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200027057600081815260208120601f850160051c81016020861015620002f05750805b601f850160051c820191505b818110156200031157828155600101620002fc565b505050505050565b81516001600160401b0381111562000335576200033562000275565b6200034d816200034684546200028b565b84620002c7565b602080601f8311600181146200038557600084156200036c5750858301515b600019600386901b1c1916600185901b17855562000311565b600085815260208120601f198616915b82811015620003b65788860151825594840194600190910190840162000395565b5085821015620003d55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604051601f8201601f191681016001600160401b038111828210171562000410576200041062000275565b604052919050565b80516001600160401b03811681146200043057600080fd5b919050565b6000606082840312156200044857600080fd5b604051606081016001600160401b03811182821017156200046d576200046d62000275565b6040529050806200047e8362000418565b81526200048e6020840162000418565b6020820152620004a16040840162000418565b60408201525092915050565b600060408284031215620004c057600080fd5b604080519081016001600160401b0381118282101715620004e557620004e562000275565b604052825181526020928301519281019290925250919050565b60008060008060e085870312156200051657600080fd5b84516001600160a01b03811681146200052e57600080fd5b602086810151919550906001600160401b03808211156200054e57600080fd5b818801915088601f8301126200056357600080fd5b81518181111562000578576200057862000275565b6200058c601f8201601f19168501620003e5565b91508082528984828501011115620005a357600080fd5b60005b81811015620005c3578381018501518382018601528401620005a6565b50600084828401015250809550505050620005e2866040870162000435565b9150620005f38660a08701620004ad565b905092959194509250565b611f18806200060e6000396000f3fe6080604052600436106102045760003560e01c806354d1f13d11610118578063a22cb465116100a0578063cc6c47e21161006f578063cc6c47e2146105ba578063e985e9c5146105da578063f04e283e146105fa578063f2fde38b1461060d578063fee81cf41461062057600080fd5b8063a22cb46514610547578063ab864ad914610567578063b88d4fde14610587578063c87b56dd1461059a57600080fd5b8063715018a6116100e7578063715018a61461049e5780638777bc17146104a65780638a4d5e79146105065780638da5cb5b1461051957806395d89b411461053257600080fd5b806354d1f13d1461043657806355f804b31461043e5780636352211e1461045e57806370a082311461047e57600080fd5b8063256929621161019b5780633e503de61161016a5780633e503de6146103a957806342842e0e146103c957806349b9312a146103dc5780634a0a9a7e1461040e57806353df5c7c1461042157600080fd5b806325692962146103485780632853ddf6146103505780632cadce8d14610366578063393fe1cd1461037957600080fd5b8063095ea7b3116101d7578063095ea7b3146102ba57806315effce6146102cd57806318160ddd1461030e57806323b872dd1461033557600080fd5b806301681a621461020957806301ffc9a71461022b57806306fdde0314610260578063081812fc14610282575b600080fd5b34801561021557600080fd5b50610229610224366004611806565b610653565b005b34801561023757600080fd5b5061024b610246366004611837565b6106d3565b60405190151581526020015b60405180910390f35b34801561026c57600080fd5b50610275610725565b60405161025791906118a4565b34801561028e57600080fd5b506102a261029d3660046118b7565b6107b7565b6040516001600160a01b039091168152602001610257565b6102296102c83660046118d0565b6107fb565b3480156102d957600080fd5b506102ed6102e8366004611806565b61089b565b60408051825160ff9081168252602093840151169281019290925201610257565b34801561031a57600080fd5b5060015460005403600019015b604051908152602001610257565b6102296103433660046118fa565b610905565b610229610a9e565b34801561035c57600080fd5b50610327600e5481565b610229610374366004611947565b610aed565b34801561038557600080fd5b50600c54600d54610394919082565b60408051928352602083019190915201610257565b3480156103b557600080fd5b506102296103c4366004611a14565b610c1b565b6102296103d73660046118fa565b610c8f565b3480156103e857600080fd5b506103fc6103f7366004611806565b610caf565b60405160ff9091168152602001610257565b61022961041c366004611947565b610cd0565b34801561042d57600080fd5b50610229610d8c565b610229610da3565b34801561044a57600080fd5b50610229610459366004611adb565b610ddf565b34801561046a57600080fd5b506102a26104793660046118b7565b610e1a565b34801561048a57600080fd5b50610327610499366004611806565b610e25565b610229610e73565b3480156104b257600080fd5b50600b546104dc906001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b0394851681529284166020840152921691810191909152606001610257565b610229610514366004611b23565b610e87565b34801561052557600080fd5b50638b78c6d819546102a2565b34801561053e57600080fd5b50610275611014565b34801561055357600080fd5b50610229610562366004611b3e565b611023565b34801561057357600080fd5b50610229610582366004611b7a565b61108f565b610229610595366004611b9c565b6110b5565b3480156105a657600080fd5b506102756105b53660046118b7565b6110ff565b3480156105c657600080fd5b506102ed6105d5366004611806565b611136565b3480156105e657600080fd5b5061024b6105f5366004611c17565b61119a565b610229610608366004611806565b6111c8565b61022961061b366004611806565b611205565b34801561062c57600080fd5b5061032761063b366004611806565b63389a75e1600c908152600091909152602090205490565b61065b61122c565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146106a8576040519150601f19603f3d011682016040523d82523d6000602084013e6106ad565b606091505b50509050806106cf57604051639081276360e01b815260040160405180910390fd5b5050565b60006301ffc9a760e01b6001600160e01b03198316148061070457506380ac58cd60e01b6001600160e01b03198316145b8061071f5750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461073490611c4a565b80601f016020809104026020016040519081016040528092919081815260200182805461076090611c4a565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b5050505050905090565b60006107c282611247565b6107df576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061080682610e1a565b9050336001600160a01b0382161461083f57610822813361119a565b61083f576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b604080518082019091526000808252602082015260006108ba8361127c565b905060405180604001604052806108e46002846001600160401b031661129a90919063ffffffff16565b60ff16815260200164ffffffffff601884901c165b60ff1690529392505050565b6000610910826112b0565b9050836001600160a01b0316816001600160a01b0316146109435760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761099057610973863361119a565b61099057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109b757604051633a954ecd60e21b815260040160405180910390fd5b80156109c257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a5457600184016000818152600460205260408120549003610a52576000548114610a525760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6000610af83361089b565b905060008660ff16118015610b11575061012c600e5410155b15610b2f5760405163ade1cb4160e01b815260040160405180910390fd5b600b54600d54610b5c91899189918991899189918991600160401b90046001600160401b0316908961131f565b8681600001818151610b6e9190611c9a565b60ff16905250602081018051879190610b88908390611c9a565b60ff16905250610b98338261149c565b610bae33610ba6888a611c9a565b60ff16611510565b60ff861615610bd2578560ff16600e6000828254610bcc9190611cb3565b90915550505b6040805160ff808a1682528816602082015233917f7cb1d1f12896e0890b79b005120d2d562e55a23bb8b2b1eaf7187a1b681d0a9391015b60405180910390a250505050505050565b610c2361122c565b604080516060810182526001600160401b0394851680825293851660208201819052929094169301839052600b80546fffffffffffffffffffffffffffffffff1916909217600160401b9091021767ffffffffffffffff60801b1916600160801b909202919091179055565b610caa838383604051806020016040528060008152506110b5565b505050565b600080610cbb8361127c565b905063ffffffff602082901c165b9392505050565b6000610cdb33611136565b600b54600c54919250610d06918991899189918991899189916001600160401b03909116908961131f565b8681600001818151610d189190611c9a565b60ff16905250602081018051879190610d32908390611c9a565b60ff16905250610d42338261160e565b610d5033610ba6888a611c9a565b6040805160ff808a1682528816602082015233917fc1522a5472c279530a0a1fd3a885f9b16157f0ba415ad892117b2e23567f61709101610c0a565b610d9461122c565b6009805460ff19166001179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610de761122c565b60095460ff1615610e0b5760405163696c636960e01b815260040160405180910390fd5b60086106cf8282611d0c565b50565b600061071f826112b0565b60006001600160a01b038216610e4e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610e7b61122c565b610e85600061162f565b565b600b54600160801b90046001600160401b0316421015610eba57604051631864d7ab60e21b815260040160405180910390fd5b610dc08160ff16610ece6000546000190190565b610ed89190611cb3565b1115610ef75760405163ade1cb4160e01b815260040160405180910390fd5b6000610f0233610caf565b90506002610f108383611c9a565b60ff161115610f32576040516307bbb6ad60e41b815260040160405180910390fd5b610f4660ff8316668e1bc9bf040000611dcb565b341015610f6657604051631b4d7fe360e21b815260040160405180910390fd5b333214610fbd576000610f7832610caf565b90506002610f868483611c9a565b60ff161115610fa8576040516307bbb6ad60e41b815260040160405180910390fd5b610fbb32610fb68584611c9a565b61166d565b505b610fcb33610fb68484611c9a565b610fd8338360ff16611510565b60405160ff8316815233907fdc82077b601a2234da9ad57e97f29b49f5b11c88269b6e8ea102ce187d2693179060200160405180910390a25050565b60606003805461073490611c4a565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61109761122c565b60408051808201909152828152602001819052600c91909155600d55565b6110c0848484610905565b6001600160a01b0383163b156110f9576110dc84848484611680565b6110f9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060600861110c8361176c565b600a60405160200161112093929190611e55565b6040516020818303038152906040529050919050565b604080518082019091526000808252602082015260006111558361127c565b9050604051806040016040528061117f6000846001600160401b031661129a90919063ffffffff16565b60ff16815260200166ffffffffffffff600884901c166108f9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6111d061122c565b63389a75e1600c52806000526020600c2080544211156111f857636f5e88186000526004601cfd5b60009055610e178161162f565b61120d61122c565b8060601b61122357637448fbae6000526004601cfd5b610e178161162f565b638b78c6d819543314610e85576382b429006000526004601cfd5b60008160011115801561125b575060005482105b801561071f575050600090815260046020526040902054600160e01b161590565b6001600160a01b031660009081526005602052604090205460c01c90565b6001600160401b038216600382901b1c92915050565b60008180600111611306576000548110156113065760008181526004602052604081205490600160e01b82169003611304575b80600003610cc95750600019016000818152600460205260409020546112e3565b505b604051636f96cda160e11b815260040160405180910390fd5b8242101561134057604051631864d7ab60e21b815260040160405180910390fd5b610dc08860ff168a60ff166113586000546000190190565b6113629190611cb3565b61136c9190611cb3565b111561138b5760405163ade1cb4160e01b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b1660208201526001600160f81b031960f889811b8216603484015288901b1660358201526113ec90869086908590603601604051602081830303815290604052805190602001206117b0565b1561140a57604051634db2932760e11b815260040160405180910390fd5b805160ff88169061141c908b90611c9a565b60ff16118061143f57508560ff1688826020015161143a9190611c9a565b60ff16115b1561145d576040516307bbb6ad60e41b815260040160405180910390fd5b61147160ff8a1666753d533d968000611dcb565b34101561149157604051631b4d7fe360e21b815260040160405180910390fd5b505050505050505050565b6106cf826114de600384602001516114bd600287600001516114bd8a61127c565b6001600160401b031660039290921b82811c60ff92831618909116901b1890565b6001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b60008054908290036115355760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146115e457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016115ac565b508160000361160557604051622e076360e81b815260040160405180910390fd5b60005550505050565b6106cf826114de600184602001516114bd600087600001516114bd8a61127c565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6106cf826114de6004846114bd8761127c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906116b5903390899088908890600401611e88565b6020604051808303816000875af19250505080156116f0575060408051601f3d908101601f191682019092526116ed91810190611ec5565b60015b61174e573d80801561171e576040519150601f19603f3d011682016040523d82523d6000602084013e611723565b606091505b508051600003611746576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806117865750819003601f19909101908152919050565b600083156117e2578360051b8501855b803580851160051b948552602094851852604060002093018181106117c05750505b501492915050565b80356001600160a01b038116811461180157600080fd5b919050565b60006020828403121561181857600080fd5b610cc9826117ea565b6001600160e01b031981168114610e1757600080fd5b60006020828403121561184957600080fd5b8135610cc981611821565b60005b8381101561186f578181015183820152602001611857565b50506000910152565b60008151808452611890816020860160208601611854565b601f01601f19169290920160200192915050565b602081526000610cc96020830184611878565b6000602082840312156118c957600080fd5b5035919050565b600080604083850312156118e357600080fd5b6118ec836117ea565b946020939093013593505050565b60008060006060848603121561190f57600080fd5b611918846117ea565b9250611926602085016117ea565b9150604084013590509250925092565b803560ff8116811461180157600080fd5b60008060008060008060a0878903121561196057600080fd5b61196987611936565b955061197760208801611936565b945061198560408801611936565b935061199360608801611936565b925060808701356001600160401b03808211156119af57600080fd5b818901915089601f8301126119c357600080fd5b8135818111156119d257600080fd5b8a60208260051b85010111156119e757600080fd5b6020830194508093505050509295509295509295565b80356001600160401b038116811461180157600080fd5b600080600060608486031215611a2957600080fd5b83359250611a39602085016119fd565b9150611a47604085016119fd565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115611a8057611a80611a50565b604051601f8501601f19908116603f01168101908282118183101715611aa857611aa8611a50565b81604052809350858152868686011115611ac157600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611aed57600080fd5b81356001600160401b03811115611b0357600080fd5b8201601f81018413611b1457600080fd5b61176484823560208401611a66565b600060208284031215611b3557600080fd5b610cc982611936565b60008060408385031215611b5157600080fd5b611b5a836117ea565b915060208301358015158114611b6f57600080fd5b809150509250929050565b60008060408385031215611b8d57600080fd5b50508035926020909101359150565b60008060008060808587031215611bb257600080fd5b611bbb856117ea565b9350611bc9602086016117ea565b92506040850135915060608501356001600160401b03811115611beb57600080fd5b8501601f81018713611bfc57600080fd5b611c0b87823560208401611a66565b91505092959194509250565b60008060408385031215611c2a57600080fd5b611c33836117ea565b9150611c41602084016117ea565b90509250929050565b600181811c90821680611c5e57607f821691505b602082108103611c7e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60ff818116838216019081111561071f5761071f611c84565b8082018082111561071f5761071f611c84565b601f821115610caa57600081815260208120601f850160051c81016020861015611ced5750805b601f850160051c820191505b81811015610a9657828155600101611cf9565b81516001600160401b03811115611d2557611d25611a50565b611d3981611d338454611c4a565b84611cc6565b602080601f831160018114611d6e5760008415611d565750858301515b600019600386901b1c1916600185901b178555610a96565b600085815260208120601f198616915b82811015611d9d57888601518255948401946001909101908401611d7e565b5085821015611dbb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761071f5761071f611c84565b60008154611def81611c4a565b60018281168015611e075760018114611e1c57611e4b565b60ff1984168752821515830287019450611e4b565b8560005260208060002060005b85811015611e425781548a820152908401908201611e29565b50505082870194505b5050505092915050565b6000611e618286611de2565b8451611e71818360208901611854565b611e7d81830186611de2565b979650505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611ebb90830184611878565b9695505050505050565b600060208284031215611ed757600080fd5b8151610cc98161182156fea2646970667358221220e76fb78c384aa331694f946604daab8acef9472f87bfabcf26ba39c910d30dc764736f6c63430008140033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef000000000000000000000000e2ab52af4b18e494f03ed8519b5e448a48e92fd000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000658edef000000000000000000000000000000000000000000000000000000000658eed0000000000000000000000000000000000000000000000000000000000658efb10c618445e1026b3963fb1f6879425ed1d76cad82dd9bfce7a17b9dd457eb1736be16b24da08d2c6b1201620e10186cace406b29325f3d9b493da516d0d09052ad000000000000000000000000000000000000000000000000000000000000002768747470733a2f2f6170692e7368697368693532302e696f2f6170692f76312f7368697368692f00000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102045760003560e01c806354d1f13d11610118578063a22cb465116100a0578063cc6c47e21161006f578063cc6c47e2146105ba578063e985e9c5146105da578063f04e283e146105fa578063f2fde38b1461060d578063fee81cf41461062057600080fd5b8063a22cb46514610547578063ab864ad914610567578063b88d4fde14610587578063c87b56dd1461059a57600080fd5b8063715018a6116100e7578063715018a61461049e5780638777bc17146104a65780638a4d5e79146105065780638da5cb5b1461051957806395d89b411461053257600080fd5b806354d1f13d1461043657806355f804b31461043e5780636352211e1461045e57806370a082311461047e57600080fd5b8063256929621161019b5780633e503de61161016a5780633e503de6146103a957806342842e0e146103c957806349b9312a146103dc5780634a0a9a7e1461040e57806353df5c7c1461042157600080fd5b806325692962146103485780632853ddf6146103505780632cadce8d14610366578063393fe1cd1461037957600080fd5b8063095ea7b3116101d7578063095ea7b3146102ba57806315effce6146102cd57806318160ddd1461030e57806323b872dd1461033557600080fd5b806301681a621461020957806301ffc9a71461022b57806306fdde0314610260578063081812fc14610282575b600080fd5b34801561021557600080fd5b50610229610224366004611806565b610653565b005b34801561023757600080fd5b5061024b610246366004611837565b6106d3565b60405190151581526020015b60405180910390f35b34801561026c57600080fd5b50610275610725565b60405161025791906118a4565b34801561028e57600080fd5b506102a261029d3660046118b7565b6107b7565b6040516001600160a01b039091168152602001610257565b6102296102c83660046118d0565b6107fb565b3480156102d957600080fd5b506102ed6102e8366004611806565b61089b565b60408051825160ff9081168252602093840151169281019290925201610257565b34801561031a57600080fd5b5060015460005403600019015b604051908152602001610257565b6102296103433660046118fa565b610905565b610229610a9e565b34801561035c57600080fd5b50610327600e5481565b610229610374366004611947565b610aed565b34801561038557600080fd5b50600c54600d54610394919082565b60408051928352602083019190915201610257565b3480156103b557600080fd5b506102296103c4366004611a14565b610c1b565b6102296103d73660046118fa565b610c8f565b3480156103e857600080fd5b506103fc6103f7366004611806565b610caf565b60405160ff9091168152602001610257565b61022961041c366004611947565b610cd0565b34801561042d57600080fd5b50610229610d8c565b610229610da3565b34801561044a57600080fd5b50610229610459366004611adb565b610ddf565b34801561046a57600080fd5b506102a26104793660046118b7565b610e1a565b34801561048a57600080fd5b50610327610499366004611806565b610e25565b610229610e73565b3480156104b257600080fd5b50600b546104dc906001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b0394851681529284166020840152921691810191909152606001610257565b610229610514366004611b23565b610e87565b34801561052557600080fd5b50638b78c6d819546102a2565b34801561053e57600080fd5b50610275611014565b34801561055357600080fd5b50610229610562366004611b3e565b611023565b34801561057357600080fd5b50610229610582366004611b7a565b61108f565b610229610595366004611b9c565b6110b5565b3480156105a657600080fd5b506102756105b53660046118b7565b6110ff565b3480156105c657600080fd5b506102ed6105d5366004611806565b611136565b3480156105e657600080fd5b5061024b6105f5366004611c17565b61119a565b610229610608366004611806565b6111c8565b61022961061b366004611806565b611205565b34801561062c57600080fd5b5061032761063b366004611806565b63389a75e1600c908152600091909152602090205490565b61065b61122c565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146106a8576040519150601f19603f3d011682016040523d82523d6000602084013e6106ad565b606091505b50509050806106cf57604051639081276360e01b815260040160405180910390fd5b5050565b60006301ffc9a760e01b6001600160e01b03198316148061070457506380ac58cd60e01b6001600160e01b03198316145b8061071f5750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461073490611c4a565b80601f016020809104026020016040519081016040528092919081815260200182805461076090611c4a565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b5050505050905090565b60006107c282611247565b6107df576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061080682610e1a565b9050336001600160a01b0382161461083f57610822813361119a565b61083f576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b604080518082019091526000808252602082015260006108ba8361127c565b905060405180604001604052806108e46002846001600160401b031661129a90919063ffffffff16565b60ff16815260200164ffffffffff601884901c165b60ff1690529392505050565b6000610910826112b0565b9050836001600160a01b0316816001600160a01b0316146109435760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761099057610973863361119a565b61099057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109b757604051633a954ecd60e21b815260040160405180910390fd5b80156109c257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a5457600184016000818152600460205260408120549003610a52576000548114610a525760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6000610af83361089b565b905060008660ff16118015610b11575061012c600e5410155b15610b2f5760405163ade1cb4160e01b815260040160405180910390fd5b600b54600d54610b5c91899189918991899189918991600160401b90046001600160401b0316908961131f565b8681600001818151610b6e9190611c9a565b60ff16905250602081018051879190610b88908390611c9a565b60ff16905250610b98338261149c565b610bae33610ba6888a611c9a565b60ff16611510565b60ff861615610bd2578560ff16600e6000828254610bcc9190611cb3565b90915550505b6040805160ff808a1682528816602082015233917f7cb1d1f12896e0890b79b005120d2d562e55a23bb8b2b1eaf7187a1b681d0a9391015b60405180910390a250505050505050565b610c2361122c565b604080516060810182526001600160401b0394851680825293851660208201819052929094169301839052600b80546fffffffffffffffffffffffffffffffff1916909217600160401b9091021767ffffffffffffffff60801b1916600160801b909202919091179055565b610caa838383604051806020016040528060008152506110b5565b505050565b600080610cbb8361127c565b905063ffffffff602082901c165b9392505050565b6000610cdb33611136565b600b54600c54919250610d06918991899189918991899189916001600160401b03909116908961131f565b8681600001818151610d189190611c9a565b60ff16905250602081018051879190610d32908390611c9a565b60ff16905250610d42338261160e565b610d5033610ba6888a611c9a565b6040805160ff808a1682528816602082015233917fc1522a5472c279530a0a1fd3a885f9b16157f0ba415ad892117b2e23567f61709101610c0a565b610d9461122c565b6009805460ff19166001179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610de761122c565b60095460ff1615610e0b5760405163696c636960e01b815260040160405180910390fd5b60086106cf8282611d0c565b50565b600061071f826112b0565b60006001600160a01b038216610e4e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610e7b61122c565b610e85600061162f565b565b600b54600160801b90046001600160401b0316421015610eba57604051631864d7ab60e21b815260040160405180910390fd5b610dc08160ff16610ece6000546000190190565b610ed89190611cb3565b1115610ef75760405163ade1cb4160e01b815260040160405180910390fd5b6000610f0233610caf565b90506002610f108383611c9a565b60ff161115610f32576040516307bbb6ad60e41b815260040160405180910390fd5b610f4660ff8316668e1bc9bf040000611dcb565b341015610f6657604051631b4d7fe360e21b815260040160405180910390fd5b333214610fbd576000610f7832610caf565b90506002610f868483611c9a565b60ff161115610fa8576040516307bbb6ad60e41b815260040160405180910390fd5b610fbb32610fb68584611c9a565b61166d565b505b610fcb33610fb68484611c9a565b610fd8338360ff16611510565b60405160ff8316815233907fdc82077b601a2234da9ad57e97f29b49f5b11c88269b6e8ea102ce187d2693179060200160405180910390a25050565b60606003805461073490611c4a565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61109761122c565b60408051808201909152828152602001819052600c91909155600d55565b6110c0848484610905565b6001600160a01b0383163b156110f9576110dc84848484611680565b6110f9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060600861110c8361176c565b600a60405160200161112093929190611e55565b6040516020818303038152906040529050919050565b604080518082019091526000808252602082015260006111558361127c565b9050604051806040016040528061117f6000846001600160401b031661129a90919063ffffffff16565b60ff16815260200166ffffffffffffff600884901c166108f9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6111d061122c565b63389a75e1600c52806000526020600c2080544211156111f857636f5e88186000526004601cfd5b60009055610e178161162f565b61120d61122c565b8060601b61122357637448fbae6000526004601cfd5b610e178161162f565b638b78c6d819543314610e85576382b429006000526004601cfd5b60008160011115801561125b575060005482105b801561071f575050600090815260046020526040902054600160e01b161590565b6001600160a01b031660009081526005602052604090205460c01c90565b6001600160401b038216600382901b1c92915050565b60008180600111611306576000548110156113065760008181526004602052604081205490600160e01b82169003611304575b80600003610cc95750600019016000818152600460205260409020546112e3565b505b604051636f96cda160e11b815260040160405180910390fd5b8242101561134057604051631864d7ab60e21b815260040160405180910390fd5b610dc08860ff168a60ff166113586000546000190190565b6113629190611cb3565b61136c9190611cb3565b111561138b5760405163ade1cb4160e01b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b1660208201526001600160f81b031960f889811b8216603484015288901b1660358201526113ec90869086908590603601604051602081830303815290604052805190602001206117b0565b1561140a57604051634db2932760e11b815260040160405180910390fd5b805160ff88169061141c908b90611c9a565b60ff16118061143f57508560ff1688826020015161143a9190611c9a565b60ff16115b1561145d576040516307bbb6ad60e41b815260040160405180910390fd5b61147160ff8a1666753d533d968000611dcb565b34101561149157604051631b4d7fe360e21b815260040160405180910390fd5b505050505050505050565b6106cf826114de600384602001516114bd600287600001516114bd8a61127c565b6001600160401b031660039290921b82811c60ff92831618909116901b1890565b6001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b60008054908290036115355760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146115e457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016115ac565b508160000361160557604051622e076360e81b815260040160405180910390fd5b60005550505050565b6106cf826114de600184602001516114bd600087600001516114bd8a61127c565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6106cf826114de6004846114bd8761127c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906116b5903390899088908890600401611e88565b6020604051808303816000875af19250505080156116f0575060408051601f3d908101601f191682019092526116ed91810190611ec5565b60015b61174e573d80801561171e576040519150601f19603f3d011682016040523d82523d6000602084013e611723565b606091505b508051600003611746576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806117865750819003601f19909101908152919050565b600083156117e2578360051b8501855b803580851160051b948552602094851852604060002093018181106117c05750505b501492915050565b80356001600160a01b038116811461180157600080fd5b919050565b60006020828403121561181857600080fd5b610cc9826117ea565b6001600160e01b031981168114610e1757600080fd5b60006020828403121561184957600080fd5b8135610cc981611821565b60005b8381101561186f578181015183820152602001611857565b50506000910152565b60008151808452611890816020860160208601611854565b601f01601f19169290920160200192915050565b602081526000610cc96020830184611878565b6000602082840312156118c957600080fd5b5035919050565b600080604083850312156118e357600080fd5b6118ec836117ea565b946020939093013593505050565b60008060006060848603121561190f57600080fd5b611918846117ea565b9250611926602085016117ea565b9150604084013590509250925092565b803560ff8116811461180157600080fd5b60008060008060008060a0878903121561196057600080fd5b61196987611936565b955061197760208801611936565b945061198560408801611936565b935061199360608801611936565b925060808701356001600160401b03808211156119af57600080fd5b818901915089601f8301126119c357600080fd5b8135818111156119d257600080fd5b8a60208260051b85010111156119e757600080fd5b6020830194508093505050509295509295509295565b80356001600160401b038116811461180157600080fd5b600080600060608486031215611a2957600080fd5b83359250611a39602085016119fd565b9150611a47604085016119fd565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115611a8057611a80611a50565b604051601f8501601f19908116603f01168101908282118183101715611aa857611aa8611a50565b81604052809350858152868686011115611ac157600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611aed57600080fd5b81356001600160401b03811115611b0357600080fd5b8201601f81018413611b1457600080fd5b61176484823560208401611a66565b600060208284031215611b3557600080fd5b610cc982611936565b60008060408385031215611b5157600080fd5b611b5a836117ea565b915060208301358015158114611b6f57600080fd5b809150509250929050565b60008060408385031215611b8d57600080fd5b50508035926020909101359150565b60008060008060808587031215611bb257600080fd5b611bbb856117ea565b9350611bc9602086016117ea565b92506040850135915060608501356001600160401b03811115611beb57600080fd5b8501601f81018713611bfc57600080fd5b611c0b87823560208401611a66565b91505092959194509250565b60008060408385031215611c2a57600080fd5b611c33836117ea565b9150611c41602084016117ea565b90509250929050565b600181811c90821680611c5e57607f821691505b602082108103611c7e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60ff818116838216019081111561071f5761071f611c84565b8082018082111561071f5761071f611c84565b601f821115610caa57600081815260208120601f850160051c81016020861015611ced5750805b601f850160051c820191505b81811015610a9657828155600101611cf9565b81516001600160401b03811115611d2557611d25611a50565b611d3981611d338454611c4a565b84611cc6565b602080601f831160018114611d6e5760008415611d565750858301515b600019600386901b1c1916600185901b178555610a96565b600085815260208120601f198616915b82811015611d9d57888601518255948401946001909101908401611d7e565b5085821015611dbb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761071f5761071f611c84565b60008154611def81611c4a565b60018281168015611e075760018114611e1c57611e4b565b60ff1984168752821515830287019450611e4b565b8560005260208060002060005b85811015611e425781548a820152908401908201611e29565b50505082870194505b5050505092915050565b6000611e618286611de2565b8451611e71818360208901611854565b611e7d81830186611de2565b979650505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611ebb90830184611878565b9695505050505050565b600060208284031215611ed757600080fd5b8151610cc98161182156fea2646970667358221220e76fb78c384aa331694f946604daab8acef9472f87bfabcf26ba39c910d30dc764736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e2ab52af4b18e494f03ed8519b5e448a48e92fd000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000658edef000000000000000000000000000000000000000000000000000000000658eed0000000000000000000000000000000000000000000000000000000000658efb10c618445e1026b3963fb1f6879425ed1d76cad82dd9bfce7a17b9dd457eb1736be16b24da08d2c6b1201620e10186cace406b29325f3d9b493da516d0d09052ad000000000000000000000000000000000000000000000000000000000000002768747470733a2f2f6170692e7368697368693532302e696f2f6170692f76312f7368697368692f00000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0xe2ab52Af4b18E494F03Ed8519B5E448a48e92Fd0
Arg [1] : _initialBaseURI (string): https://api.shishi520.io/api/v1/shishi/
Arg [2] : _phasetimes (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [3] : _roots (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000e2ab52af4b18e494f03ed8519b5e448a48e92fd0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000658edef0
Arg [3] : 00000000000000000000000000000000000000000000000000000000658eed00
Arg [4] : 00000000000000000000000000000000000000000000000000000000658efb10
Arg [5] : c618445e1026b3963fb1f6879425ed1d76cad82dd9bfce7a17b9dd457eb1736b
Arg [6] : e16b24da08d2c6b1201620e10186cace406b29325f3d9b493da516d0d09052ad
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000027
Arg [8] : 68747470733a2f2f6170692e7368697368693532302e696f2f6170692f76312f
Arg [9] : 7368697368692f00000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.