Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 2,835 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21296993 | 20 days ago | IN | 0 ETH | 0.00022135 | ||||
Set Approval For... | 21103165 | 47 days ago | IN | 0 ETH | 0.00010067 | ||||
Set Approval For... | 20767698 | 94 days ago | IN | 0 ETH | 0.00028992 | ||||
Set Approval For... | 20730136 | 99 days ago | IN | 0 ETH | 0.00011357 | ||||
Set Approval For... | 20649535 | 110 days ago | IN | 0 ETH | 0.00003027 | ||||
Set Approval For... | 20649508 | 110 days ago | IN | 0 ETH | 0.00005961 | ||||
Set Approval For... | 20648337 | 110 days ago | IN | 0 ETH | 0.00004606 | ||||
Set Approval For... | 20647571 | 110 days ago | IN | 0 ETH | 0.00003856 | ||||
Set Approval For... | 20574584 | 121 days ago | IN | 0 ETH | 0.00004479 | ||||
Set Approval For... | 20524019 | 128 days ago | IN | 0 ETH | 0.0000463 | ||||
Set Approval For... | 20524018 | 128 days ago | IN | 0 ETH | 0.00004758 | ||||
Safe Transfer Fr... | 20156053 | 179 days ago | IN | 0 ETH | 0.00018293 | ||||
Set Approval For... | 20140138 | 181 days ago | IN | 0 ETH | 0.00017841 | ||||
Set Approval For... | 19997029 | 201 days ago | IN | 0 ETH | 0.00031729 | ||||
Set Approval For... | 19949264 | 208 days ago | IN | 0 ETH | 0.0001079 | ||||
Set Approval For... | 19838912 | 223 days ago | IN | 0 ETH | 0.00021818 | ||||
Set Approval For... | 19838632 | 223 days ago | IN | 0 ETH | 0.00017824 | ||||
Set Approval For... | 19825252 | 225 days ago | IN | 0 ETH | 0.00023761 | ||||
Set Approval For... | 19525254 | 267 days ago | IN | 0 ETH | 0.0012619 | ||||
Set Approval For... | 19497045 | 271 days ago | IN | 0 ETH | 0.00086302 | ||||
Transfer From | 19248578 | 306 days ago | IN | 0 ETH | 0.0018148 | ||||
Set Approval For... | 19155639 | 319 days ago | IN | 0 ETH | 0.00097943 | ||||
Set Approval For... | 18859376 | 361 days ago | IN | 0 ETH | 0.00079021 | ||||
Safe Transfer Fr... | 18824002 | 366 days ago | IN | 0 ETH | 0.00204125 | ||||
Set Approval For... | 18630959 | 393 days ago | IN | 0 ETH | 0.00101074 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
15704851 | 803 days ago | 33.4519 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704453 | 803 days ago | 0.0995 ETH | ||||
15704443 | 803 days ago | 0.0199 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH | ||||
15704441 | 803 days ago | 0.0995 ETH |
Loading...
Loading
Contract Name:
NineteenNinetyX
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./SignatureChecker.sol"; import "./SignerManager.sol"; /* ^ / \ / \ / \ | 1 | | 9 | \ \ / \ \/ /\ \ / \ \ | 9 | | X | \ / \ / \ / v */ contract NineteenNinetyX is ERC721A, Ownable, SignerManager, ReentrancyGuard { uint256 public constant MINT_PRICE = 0.0199 ether; uint256 public constant MAX_SUPPLY = 1999; bytes32 public constant PRIORITY_MINT_STATE = keccak256(abi.encodePacked("priority")); bytes32 public constant PRESALE_MINT_STATE = keccak256(abi.encodePacked("presale")); bytes32 public constant PUBLIC_MINT_STATE = keccak256(abi.encodePacked("public")); bytes32 public constant CLOSED_MINT_STATE = keccak256(abi.encodePacked("closed")); uint256 public txnLimit = 5; // only relevant to public mint string public currentBaseURI; bytes32 public mintState = CLOSED_MINT_STATE; // start closed /** @dev Record of already-used signatures. */ mapping(bytes32 => bool) public usedMessages; constructor() ERC721A("NineteenNinetyX", "199X") {} /** * @dev Dawnkey mint, can occur in any mint state, requires sig. */ function mintDK( uint256 quantity, uint256 allocation, bytes calldata signature ) public payable nonReentrant { checkMintParams(quantity, allocation, ""); mintWithSig(quantity, allocation, signature, "dawnkey"); } /** * @dev Priority mint, only in priority state, requires sig. */ function mintPriority( uint256 quantity, uint256 allocation, bytes calldata signature ) public payable nonReentrant { checkMintParams(quantity, allocation, PRIORITY_MINT_STATE); mintWithSig(quantity, allocation, signature, "priority"); } /** * @dev Presale mint, only in presale state, requires sig. */ function mintPresale( uint256 quantity, uint256 allocation, bytes calldata signature ) public payable nonReentrant { checkMintParams(quantity, allocation, PRESALE_MINT_STATE); mintWithSig(quantity, allocation, signature, "presale"); } /** * @dev Public mint, only in public state, does not require sig. */ function mintPublic(uint256 quantity) public payable nonReentrant { checkMintParams(quantity, txnLimit, PUBLIC_MINT_STATE); _safeMint(msg.sender, quantity); } /** * @dev Runs checks on mint parameters */ function checkMintParams( uint256 quantity, uint256 allocation, bytes32 expectedMintState ) private { if (expectedMintState == "") { // check that the mint state is not closed, any other is ok require(mintState != CLOSED_MINT_STATE, "Minting is closed"); } else { // check mint state is correct // dawnkey can mint in any state for free, so these checks dont matter require(mintState == expectedMintState, "Wrong mintState"); // prevent txns that don't provide enough ether require(msg.value >= MINT_PRICE * quantity, "Insufficient value"); } if (expectedMintState == PUBLIC_MINT_STATE) { // check txn limit require(quantity <= txnLimit, "Exceeds txnLimit"); } else { // check allocation limit require(quantity <= allocation, "Exceeds allocation"); } // prevent txns that would exceed the maxSupply require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds max supply"); } /** @dev Mint tokens with a signature * @param quantity The quantity of tokens to mint */ function mintWithSig( uint256 quantity, uint256 allocation, bytes calldata signature, string memory expectedSigType ) internal { bytes memory data = abi.encode( this, msg.sender, expectedSigType, allocation ); SignatureChecker.requireValidSignature( signers, data, signature, usedMessages ); _safeMint(msg.sender, quantity); } function teamMint(uint256 quantity) public onlyOwner { require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds max supply"); _safeMint(msg.sender, quantity); } function _baseURI() internal view virtual override returns (string memory) { return currentBaseURI; } function setBaseURI(string memory baseURI_) public onlyOwner { currentBaseURI = baseURI_; } function setTxnLimit(uint256 txnLimit_) public onlyOwner { txnLimit = txnLimit_; } function setMintState(string memory mintState_) public onlyOwner { /* priority, presale, or public */ mintState = keccak256(abi.encodePacked(mintState_)); } /** * @dev Helper to check if a signature has been used * @param to The address to mint to * @param allocation The max number of tokens to mint * @param expectedSigType The expected signature type */ function sigUsed( address to, uint256 allocation, string calldata expectedSigType ) public view returns (bool) { bytes memory data = abi.encode(this, to, expectedSigType, allocation); bytes32 message = SignatureChecker.generateMessage(data); return usedMessages[message]; } /** * @dev override _startTokenId so tokens go from 1 -> 1999 */ function _startTokenId() internal pure override returns (uint256) { return 1; } /** * @dev Withdraw ether to owner's wallet */ function withdrawEth() public onlyOwner { uint256 balance = address(this).balance; (bool success, ) = payable(msg.sender).call{value: balance}(""); require(success, "Withdraw failed"); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; /** @title SignatureChecker @notice Additional functions for EnumerableSet.Addresset that require a valid ECDSA signature of a standardized message, signed by any member of the set. */ library SignatureChecker { using EnumerableSet for EnumerableSet.AddressSet; /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation + signature verification + marking message as used @param signers Set of addresses from which signatures are accepted. @param usedMessages Set of already-used messages. @param signature ECDSA signature of message. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes memory data, bytes calldata signature, mapping(bytes32 => bool) storage usedMessages ) internal { bytes32 message = generateMessage(data); require( !usedMessages[message], "SignatureChecker: Message already used" ); usedMessages[message] = true; requireValidSignature(signers, message, signature); } /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation + signature verification. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes memory data, bytes calldata signature ) internal view { bytes32 message = generateMessage(data); requireValidSignature(signers, message, signature); } /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation from address + signature verification. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, address a, bytes calldata signature ) internal view { bytes32 message = generateMessage(abi.encodePacked(a)); requireValidSignature(signers, message, signature); } /** @notice Common validator logic, checking if the recovered signer is contained in the signers AddressSet. */ function validSignature( EnumerableSet.AddressSet storage signers, bytes32 message, bytes calldata signature ) internal view returns (bool) { return signers.contains(ECDSA.recover(message, signature)); } /** @notice Requires that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper that reverts if the signature validation fails. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes32 message, bytes calldata signature ) internal view { require( validSignature(signers, message, signature), "SignatureChecker: Invalid signature" ); } /** @notice Generates a message for a given data input that will be signed off-chain using ECDSA. @dev For multiple data fields, a standard concatenation using `abi.encodePacked` is commonly used to build data. */ function generateMessage(bytes memory data) internal pure returns (bytes32) { return ECDSA.toEthSignedMessageHash(data); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2022 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; /** @title SignerManager @notice Manges addition and removal of a core set of addresses from which valid ECDSA signatures can be accepted; see SignatureChecker. */ contract SignerManager is Ownable { using EnumerableSet for EnumerableSet.AddressSet; /** @dev Addresses from which signatures can be accepted. */ EnumerableSet.AddressSet internal signers; /** @notice Add an address to the set of accepted signers. */ function addSigner(address signer) external onlyOwner { signers.add(signer); } /** @notice Remove an address previously added with addSigner(). */ function removeSigner(address signer) external onlyOwner { signers.remove(signer); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CLOSED_MINT_STATE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_MINT_STATE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRIORITY_MINT_STATE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_MINT_STATE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"addSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintDK","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPriority","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintState","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"removeSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"mintState_","type":"string"}],"name":"setMintState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"txnLimit_","type":"uint256"}],"name":"setTxnLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"string","name":"expectedSigType","type":"string"}],"name":"sigUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","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":"nonpayable","type":"function"},{"inputs":[],"name":"txnLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedMessages","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6005600c556518db1bdcd95960d21b60a052600660805260a66040527f5cdcafd80f762bdc98fd6ec295c784ef6e795af18d23dff7061c51f083ef9d2e600e553480156200004c57600080fd5b50604080518082018252600f81526e09cd2dccae8cacadc9cd2dccae8f2b608b1b6020808301918252835180850190945260048452630627272b60e31b908401528151919291620000a09160029162000126565b508051620000b690600390602084019062000126565b5050600160005550620000c933620000d4565b6001600b5562000209565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200013490620001cc565b90600052602060002090601f016020900481019282620001585760008555620001a3565b82601f106200017357805160ff1916838001178555620001a3565b82800160010185558215620001a3579182015b82811115620001a357825182559160200191906001019062000186565b50620001b1929150620001b5565b5090565b5b80821115620001b15760008155600101620001b6565b600181811c90821680620001e157607f821691505b602082108114156200020357634e487b7160e01b600052602260045260246000fd5b50919050565b61281180620002196000396000f3fe6080604052600436106102305760003560e01c80638da5cb5b1161012e578063c87b56dd116100ab578063e985e9c51161006f578063e985e9c5146105e5578063eb12d61e14610605578063efd0cbf914610625578063f2fde38b14610638578063f74568cc1461065857600080fd5b8063c87b56dd14610573578063cc142ead14610593578063d0e79b42146105a6578063d44ccfed146105bb578063de9c5702146105d057600080fd5b8063a22cb465116100f2578063a22cb465146104fc578063b88d4fde1461051c578063bc6cb0801461052f578063c002d23d14610542578063c051e38a1461055d57600080fd5b80638da5cb5b1461047f57806395d89b411461049d57806397d4ccd2146104b25780639c340370146104c7578063a0ef91df146104e757600080fd5b80632fbba115116101bc5780635a028400116101805780635a028400146103e55780636352211e1461041557806370a0823114610435578063715018a6146104555780638415031a1461046a57600080fd5b80632fbba1151461036657806332cb6b0c146103865780633feb6a6f1461039c57806342842e0e146103b257806355f804b3146103c557600080fd5b806308fc550e1161020357806308fc550e146102d9578063095ea7b3146102f95780630e316ab71461030c57806318160ddd1461032c57806323b872dd1461035357600080fd5b806301ffc9a71461023557806306bbe64e1461026a57806306fdde031461027f578063081812fc146102a1575b600080fd5b34801561024157600080fd5b506102556102503660046120d0565b610678565b60405190151581526020015b60405180910390f35b61027d61027836600461212f565b6106ca565b005b34801561028b57600080fd5b5061029461076e565b60405161026191906121da565b3480156102ad57600080fd5b506102c16102bc3660046121ed565b610800565b6040516001600160a01b039091168152602001610261565b3480156102e557600080fd5b5061027d6102f4366004612292565b610844565b61027d6103073660046122f7565b61089d565b34801561031857600080fd5b5061027d610327366004612321565b61093d565b34801561033857600080fd5b5060015460005403600019015b604051908152602001610261565b61027d61036136600461233c565b610976565b34801561037257600080fd5b5061027d6103813660046121ed565b610b08565b34801561039257600080fd5b506103456107cf81565b3480156103a857600080fd5b50610345600c5481565b61027d6103c036600461233c565b610b9d565b3480156103d157600080fd5b5061027d6103e0366004612292565b610bbd565b3480156103f157600080fd5b506102556104003660046121ed565b600f6020526000908152604090205460ff1681565b34801561042157600080fd5b506102c16104303660046121ed565b610bfa565b34801561044157600080fd5b50610345610450366004612321565b610c05565b34801561046157600080fd5b5061027d610c54565b34801561047657600080fd5b50610345610c8a565b34801561048b57600080fd5b506008546001600160a01b03166102c1565b3480156104a957600080fd5b50610294610cb9565b3480156104be57600080fd5b50610294610cc8565b3480156104d357600080fd5b506102556104e2366004612378565b610d56565b3480156104f357600080fd5b5061027d610dad565b34801561050857600080fd5b5061027d6105173660046123ba565b610e63565b61027d61052a3660046123f6565b610ecf565b61027d61053d36600461212f565b610f19565b34801561054e57600080fd5b506103456646b2f1cf07c00081565b34801561056957600080fd5b50610345600e5481565b34801561057f57600080fd5b5061029461058e3660046121ed565b610f90565b61027d6105a136600461212f565b611015565b3480156105b257600080fd5b50610345611075565b3480156105c757600080fd5b50610345611090565b3480156105dc57600080fd5b506103456110ac565b3480156105f157600080fd5b50610255610600366004612472565b6110c6565b34801561061157600080fd5b5061027d610620366004612321565b6110f4565b61027d6106333660046121ed565b611129565b34801561064457600080fd5b5061027d610653366004612321565b611186565b34801561066457600080fd5b5061027d6106733660046121ed565b61121e565b60006301ffc9a760e01b6001600160e01b0319831614806106a957506380ac58cd60e01b6001600160e01b03198316145b806106c45750635b5e139f60e01b6001600160e01b03198316145b92915050565b6002600b5414156106f65760405162461bcd60e51b81526004016106ed906124a5565b60405180910390fd5b6002600b55604051677072696f7269747960c01b602082015261073690859085906028015b6040516020818303038152906040528051906020012061124d565b61076384848484604051806040016040528060088152602001677072696f7269747960c01b81525061147e565b50506001600b555050565b60606002805461077d906124dc565b80601f01602080910402602001604051908101604052809291908181526020018280546107a9906124dc565b80156107f65780601f106107cb576101008083540402835291602001916107f6565b820191906000526020600020905b8154815290600101906020018083116107d957829003601f168201915b5050505050905090565b600061080b826114c1565b610828576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6008546001600160a01b0316331461086e5760405162461bcd60e51b81526004016106ed90612517565b8060405160200161087f919061254c565b60408051601f198184030181529190528051602090910120600e5550565b60006108a882610bfa565b9050336001600160a01b038216146108e1576108c481336110c6565b6108e1576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b031633146109675760405162461bcd60e51b81526004016106ed90612517565b6109726009826114f6565b5050565b60006109818261150b565b9050836001600160a01b0316816001600160a01b0316146109b45760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610a01576109e486336110c6565b610a0157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610a2857604051633a954ecd60e21b815260040160405180910390fd5b8015610a3357600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610abe5760018401600081815260046020526040902054610abc576000548114610abc5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6008546001600160a01b03163314610b325760405162461bcd60e51b81526004016106ed90612517565b6001546000546107cf9183910360001901610b4d919061257e565b1115610b905760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016106ed565b610b9a3382611574565b50565b610bb883838360405180602001604052806000815250610ecf565b505050565b6008546001600160a01b03163314610be75760405162461bcd60e51b81526004016106ed90612517565b805161097290600d906020840190612021565b60006106c48261150b565b60006001600160a01b038216610c2e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610c7e5760405162461bcd60e51b81526004016106ed90612517565b610c88600061158e565b565b6040516518db1bdcd95960d21b60208201526026015b6040516020818303038152906040528051906020012081565b60606003805461077d906124dc565b600d8054610cd5906124dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d01906124dc565b8015610d4e5780601f10610d2357610100808354040283529160200191610d4e565b820191906000526020600020905b815481529060010190602001808311610d3157829003601f168201915b505050505081565b6000803086858588604051602001610d72959493929190612596565b60405160208183030381529060405290506000610d8e826115e0565b6000908152600f602052604090205460ff16925050505b949350505050565b6008546001600160a01b03163314610dd75760405162461bcd60e51b81526004016106ed90612517565b6040514790600090339083908381818185875af1925050503d8060008114610e1b576040519150601f19603f3d011682016040523d82523d6000602084013e610e20565b606091505b50509050806109725760405162461bcd60e51b815260206004820152600f60248201526e15da5d1a191c985dc819985a5b1959608a1b60448201526064016106ed565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610eda848484610976565b6001600160a01b0383163b15610f1357610ef6848484846115eb565b610f13576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6002600b541415610f3c5760405162461bcd60e51b81526004016106ed906124a5565b6002600b556040516670726573616c6560c81b6020820152610f64908590859060270161071b565b610763848484846040518060400160405280600781526020016670726573616c6560c81b81525061147e565b6060610f9b826114c1565b610fb857604051630a14c4b560e41b815260040160405180910390fd5b6000610fc26116df565b9050805160001415610fe3576040518060200160405280600081525061100e565b80610fed846116ee565b604051602001610ffe9291906125e9565b6040516020818303038152906040525b9392505050565b6002600b5414156110385760405162461bcd60e51b81526004016106ed906124a5565b6002600b556110498484600061124d565b61076384848484604051806040016040528060078152602001666461776e6b657960c81b81525061147e565b6040516670726573616c6560c81b6020820152602701610ca0565b604051677072696f7269747960c01b6020820152602801610ca0565b604051657075626c696360d01b6020820152602601610ca0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b0316331461111e5760405162461bcd60e51b81526004016106ed90612517565b61097260098261173c565b6002600b54141561114c5760405162461bcd60e51b81526004016106ed906124a5565b6002600b55600c54604051657075626c696360d01b602082015261117491839160260161071b565b61117e3382611574565b506001600b55565b6008546001600160a01b031633146111b05760405162461bcd60e51b81526004016106ed90612517565b6001600160a01b0381166112155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ed565b610b9a8161158e565b6008546001600160a01b031633146112485760405162461bcd60e51b81526004016106ed90612517565b600c55565b806112c7576040516518db1bdcd95960d21b602082015260260160405160208183030381529060405280519060200120600e5414156112c25760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc818db1bdcd959607a1b60448201526064016106ed565b61135f565b80600e541461130a5760405162461bcd60e51b815260206004820152600f60248201526e57726f6e67206d696e74537461746560881b60448201526064016106ed565b61131b836646b2f1cf07c000612618565b34101561135f5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b60448201526064016106ed565b604051657075626c696360d01b6020820152602601604051602081830303815290604052805190602001208114156113db57600c548311156113d65760405162461bcd60e51b815260206004820152601060248201526f115e18d959591cc81d1e1b931a5b5a5d60821b60448201526064016106ed565b611420565b818311156114205760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b2399030b63637b1b0ba34b7b760711b60448201526064016106ed565b6001546000546107cf918591036000190161143b919061257e565b1115610bb85760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016106ed565b6000303383876040516020016114979493929190612637565b60405160208183030381529060405290506114b76009828686600f611751565b610b003387611574565b6000816001111580156114d5575060005482105b80156106c4575050600090815260046020526040902054600160e01b161590565b600061100e836001600160a01b0384166117f2565b6000818060011161155b5760005481101561155b57600081815260046020526040902054600160e01b8116611559575b8061100e57506000190160008181526004602052604090205461153b565b505b604051636f96cda160e11b815260040160405180910390fd5b6109728282604051806020016040528060008152506118e5565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006106c482611952565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611620903390899088908890600401612674565b602060405180830381600087803b15801561163a57600080fd5b505af192505050801561166a575060408051601f3d908101601f19168201909252611667918101906126b1565b60015b6116c5573d808015611698576040519150601f19603f3d011682016040523d82523d6000602084013e61169d565b606091505b5080516116bd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610da5565b6060600d805461077d906124dc565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806117255761172a565b611708565b50819003601f19909101908152919050565b600061100e836001600160a01b03841661198d565b600061175c856115e0565b60008181526020849052604090205490915060ff16156117cd5760405162461bcd60e51b815260206004820152602660248201527f5369676e6174757265436865636b65723a204d65737361676520616c726561646044820152651e481d5cd95960d21b60648201526084016106ed565b6000818152602083905260409020805460ff19166001179055610b00868286866119dc565b600081815260018301602052604081205480156118db5760006118166001836126ce565b855490915060009061182a906001906126ce565b905081811461188f57600086600001828154811061184a5761184a6126e5565b906000526020600020015490508087600001848154811061186d5761186d6126e5565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806118a0576118a06126fb565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106c4565b60009150506106c4565b6118ef8383611a40565b6001600160a01b0383163b15610bb8576000548281035b61191960008683806001019450866115eb565b611936576040516368d2bf6b60e11b815260040160405180910390fd5b81811061190657816000541461194b57600080fd5b5050505050565b600061195e8251611b37565b82604051602001611970929190612711565b604051602081830303815290604052805190602001209050919050565b60008181526001830160205260408120546119d4575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106c4565b5060006106c4565b6119e884848484611c35565b610f135760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b60648201526084016106ed565b60005481611a615760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b1057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611ad8565b5081611b2e57604051622e076360e81b815260040160405180910390fd5b60005550505050565b606081611b5b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b855780611b6f8161276c565b9150611b7e9050600a8361279d565b9150611b5f565b60008167ffffffffffffffff811115611ba057611ba0612206565b6040519080825280601f01601f191660200182016040528015611bca576020820181803683370190505b5090505b8415610da557611bdf6001836126ce565b9150611bec600a866127b1565b611bf790603061257e565b60f81b818381518110611c0c57611c0c6126e5565b60200101906001600160f81b031916908160001a905350611c2e600a8661279d565b9450611bce565b6000611c81611c7a8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c8a92505050565b8690611cae565b95945050505050565b6000806000611c998585611cd0565b91509150611ca681611d40565b509392505050565b6001600160a01b0381166000908152600183016020526040812054151561100e565b600080825160411415611d075760208301516040840151606085015160001a611cfb87828585611efb565b94509450505050611d39565b825160401415611d315760208301516040840151611d26868383611fe8565b935093505050611d39565b506000905060025b9250929050565b6000816004811115611d5457611d546127c5565b1415611d5d5750565b6001816004811115611d7157611d716127c5565b1415611dbf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106ed565b6002816004811115611dd357611dd36127c5565b1415611e215760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106ed565b6003816004811115611e3557611e356127c5565b1415611e8e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106ed565b6004816004811115611ea257611ea26127c5565b1415610b9a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f325750600090506003611fdf565b8460ff16601b14158015611f4a57508460ff16601c14155b15611f5b5750600090506004611fdf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611faf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611fd857600060019250925050611fdf565b9150600090505b94509492505050565b6000806001600160ff1b0383168161200560ff86901c601b61257e565b905061201387828885611efb565b935093505050935093915050565b82805461202d906124dc565b90600052602060002090601f01602090048101928261204f5760008555612095565b82601f1061206857805160ff1916838001178555612095565b82800160010185558215612095579182015b8281111561209557825182559160200191906001019061207a565b506120a19291506120a5565b5090565b5b808211156120a157600081556001016120a6565b6001600160e01b031981168114610b9a57600080fd5b6000602082840312156120e257600080fd5b813561100e816120ba565b60008083601f8401126120ff57600080fd5b50813567ffffffffffffffff81111561211757600080fd5b602083019150836020828501011115611d3957600080fd5b6000806000806060858703121561214557600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561216a57600080fd5b612176878288016120ed565b95989497509550505050565b60005b8381101561219d578181015183820152602001612185565b83811115610f135750506000910152565b600081518084526121c6816020860160208601612182565b601f01601f19169290920160200192915050565b60208152600061100e60208301846121ae565b6000602082840312156121ff57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561223757612237612206565b604051601f8501601f19908116603f0116810190828211818310171561225f5761225f612206565b8160405280935085815286868601111561227857600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156122a457600080fd5b813567ffffffffffffffff8111156122bb57600080fd5b8201601f810184136122cc57600080fd5b610da58482356020840161221c565b80356001600160a01b03811681146122f257600080fd5b919050565b6000806040838503121561230a57600080fd5b612313836122db565b946020939093013593505050565b60006020828403121561233357600080fd5b61100e826122db565b60008060006060848603121561235157600080fd5b61235a846122db565b9250612368602085016122db565b9150604084013590509250925092565b6000806000806060858703121561238e57600080fd5b612397856122db565b935060208501359250604085013567ffffffffffffffff81111561216a57600080fd5b600080604083850312156123cd57600080fd5b6123d6836122db565b9150602083013580151581146123eb57600080fd5b809150509250929050565b6000806000806080858703121561240c57600080fd5b612415856122db565b9350612423602086016122db565b925060408501359150606085013567ffffffffffffffff81111561244657600080fd5b8501601f8101871361245757600080fd5b6124668782356020840161221c565b91505092959194509250565b6000806040838503121561248557600080fd5b61248e836122db565b915061249c602084016122db565b90509250929050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600181811c908216806124f057607f821691505b6020821081141561251157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000825161255e818460208701612182565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561259157612591612568565b500190565b6001600160a01b0386811682528516602082015260806040820181905281018390526000838560a0840137600060a0858401015260a0601f19601f86011683010190508260608301529695505050505050565b600083516125fb818460208801612182565b83519083019061260f818360208801612182565b01949350505050565b600081600019048311821515161561263257612632612568565b500290565b6001600160a01b03858116825284166020820152608060408201819052600090612663908301856121ae565b905082606083015295945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126a7908301846121ae565b9695505050505050565b6000602082840312156126c357600080fd5b815161100e816120ba565b6000828210156126e0576126e0612568565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161274981601a850160208801612182565b83519083019061276081601a840160208801612182565b01601a01949350505050565b600060001982141561278057612780612568565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826127ac576127ac612787565b500490565b6000826127c0576127c0612787565b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c1017c175a4b315f09e49cb0ba8a8fd48e8ef41760691ed01d562dc3a28e1b0764736f6c63430008090033
Deployed Bytecode
0x6080604052600436106102305760003560e01c80638da5cb5b1161012e578063c87b56dd116100ab578063e985e9c51161006f578063e985e9c5146105e5578063eb12d61e14610605578063efd0cbf914610625578063f2fde38b14610638578063f74568cc1461065857600080fd5b8063c87b56dd14610573578063cc142ead14610593578063d0e79b42146105a6578063d44ccfed146105bb578063de9c5702146105d057600080fd5b8063a22cb465116100f2578063a22cb465146104fc578063b88d4fde1461051c578063bc6cb0801461052f578063c002d23d14610542578063c051e38a1461055d57600080fd5b80638da5cb5b1461047f57806395d89b411461049d57806397d4ccd2146104b25780639c340370146104c7578063a0ef91df146104e757600080fd5b80632fbba115116101bc5780635a028400116101805780635a028400146103e55780636352211e1461041557806370a0823114610435578063715018a6146104555780638415031a1461046a57600080fd5b80632fbba1151461036657806332cb6b0c146103865780633feb6a6f1461039c57806342842e0e146103b257806355f804b3146103c557600080fd5b806308fc550e1161020357806308fc550e146102d9578063095ea7b3146102f95780630e316ab71461030c57806318160ddd1461032c57806323b872dd1461035357600080fd5b806301ffc9a71461023557806306bbe64e1461026a57806306fdde031461027f578063081812fc146102a1575b600080fd5b34801561024157600080fd5b506102556102503660046120d0565b610678565b60405190151581526020015b60405180910390f35b61027d61027836600461212f565b6106ca565b005b34801561028b57600080fd5b5061029461076e565b60405161026191906121da565b3480156102ad57600080fd5b506102c16102bc3660046121ed565b610800565b6040516001600160a01b039091168152602001610261565b3480156102e557600080fd5b5061027d6102f4366004612292565b610844565b61027d6103073660046122f7565b61089d565b34801561031857600080fd5b5061027d610327366004612321565b61093d565b34801561033857600080fd5b5060015460005403600019015b604051908152602001610261565b61027d61036136600461233c565b610976565b34801561037257600080fd5b5061027d6103813660046121ed565b610b08565b34801561039257600080fd5b506103456107cf81565b3480156103a857600080fd5b50610345600c5481565b61027d6103c036600461233c565b610b9d565b3480156103d157600080fd5b5061027d6103e0366004612292565b610bbd565b3480156103f157600080fd5b506102556104003660046121ed565b600f6020526000908152604090205460ff1681565b34801561042157600080fd5b506102c16104303660046121ed565b610bfa565b34801561044157600080fd5b50610345610450366004612321565b610c05565b34801561046157600080fd5b5061027d610c54565b34801561047657600080fd5b50610345610c8a565b34801561048b57600080fd5b506008546001600160a01b03166102c1565b3480156104a957600080fd5b50610294610cb9565b3480156104be57600080fd5b50610294610cc8565b3480156104d357600080fd5b506102556104e2366004612378565b610d56565b3480156104f357600080fd5b5061027d610dad565b34801561050857600080fd5b5061027d6105173660046123ba565b610e63565b61027d61052a3660046123f6565b610ecf565b61027d61053d36600461212f565b610f19565b34801561054e57600080fd5b506103456646b2f1cf07c00081565b34801561056957600080fd5b50610345600e5481565b34801561057f57600080fd5b5061029461058e3660046121ed565b610f90565b61027d6105a136600461212f565b611015565b3480156105b257600080fd5b50610345611075565b3480156105c757600080fd5b50610345611090565b3480156105dc57600080fd5b506103456110ac565b3480156105f157600080fd5b50610255610600366004612472565b6110c6565b34801561061157600080fd5b5061027d610620366004612321565b6110f4565b61027d6106333660046121ed565b611129565b34801561064457600080fd5b5061027d610653366004612321565b611186565b34801561066457600080fd5b5061027d6106733660046121ed565b61121e565b60006301ffc9a760e01b6001600160e01b0319831614806106a957506380ac58cd60e01b6001600160e01b03198316145b806106c45750635b5e139f60e01b6001600160e01b03198316145b92915050565b6002600b5414156106f65760405162461bcd60e51b81526004016106ed906124a5565b60405180910390fd5b6002600b55604051677072696f7269747960c01b602082015261073690859085906028015b6040516020818303038152906040528051906020012061124d565b61076384848484604051806040016040528060088152602001677072696f7269747960c01b81525061147e565b50506001600b555050565b60606002805461077d906124dc565b80601f01602080910402602001604051908101604052809291908181526020018280546107a9906124dc565b80156107f65780601f106107cb576101008083540402835291602001916107f6565b820191906000526020600020905b8154815290600101906020018083116107d957829003601f168201915b5050505050905090565b600061080b826114c1565b610828576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6008546001600160a01b0316331461086e5760405162461bcd60e51b81526004016106ed90612517565b8060405160200161087f919061254c565b60408051601f198184030181529190528051602090910120600e5550565b60006108a882610bfa565b9050336001600160a01b038216146108e1576108c481336110c6565b6108e1576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b031633146109675760405162461bcd60e51b81526004016106ed90612517565b6109726009826114f6565b5050565b60006109818261150b565b9050836001600160a01b0316816001600160a01b0316146109b45760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610a01576109e486336110c6565b610a0157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610a2857604051633a954ecd60e21b815260040160405180910390fd5b8015610a3357600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610abe5760018401600081815260046020526040902054610abc576000548114610abc5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6008546001600160a01b03163314610b325760405162461bcd60e51b81526004016106ed90612517565b6001546000546107cf9183910360001901610b4d919061257e565b1115610b905760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016106ed565b610b9a3382611574565b50565b610bb883838360405180602001604052806000815250610ecf565b505050565b6008546001600160a01b03163314610be75760405162461bcd60e51b81526004016106ed90612517565b805161097290600d906020840190612021565b60006106c48261150b565b60006001600160a01b038216610c2e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610c7e5760405162461bcd60e51b81526004016106ed90612517565b610c88600061158e565b565b6040516518db1bdcd95960d21b60208201526026015b6040516020818303038152906040528051906020012081565b60606003805461077d906124dc565b600d8054610cd5906124dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d01906124dc565b8015610d4e5780601f10610d2357610100808354040283529160200191610d4e565b820191906000526020600020905b815481529060010190602001808311610d3157829003601f168201915b505050505081565b6000803086858588604051602001610d72959493929190612596565b60405160208183030381529060405290506000610d8e826115e0565b6000908152600f602052604090205460ff16925050505b949350505050565b6008546001600160a01b03163314610dd75760405162461bcd60e51b81526004016106ed90612517565b6040514790600090339083908381818185875af1925050503d8060008114610e1b576040519150601f19603f3d011682016040523d82523d6000602084013e610e20565b606091505b50509050806109725760405162461bcd60e51b815260206004820152600f60248201526e15da5d1a191c985dc819985a5b1959608a1b60448201526064016106ed565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610eda848484610976565b6001600160a01b0383163b15610f1357610ef6848484846115eb565b610f13576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6002600b541415610f3c5760405162461bcd60e51b81526004016106ed906124a5565b6002600b556040516670726573616c6560c81b6020820152610f64908590859060270161071b565b610763848484846040518060400160405280600781526020016670726573616c6560c81b81525061147e565b6060610f9b826114c1565b610fb857604051630a14c4b560e41b815260040160405180910390fd5b6000610fc26116df565b9050805160001415610fe3576040518060200160405280600081525061100e565b80610fed846116ee565b604051602001610ffe9291906125e9565b6040516020818303038152906040525b9392505050565b6002600b5414156110385760405162461bcd60e51b81526004016106ed906124a5565b6002600b556110498484600061124d565b61076384848484604051806040016040528060078152602001666461776e6b657960c81b81525061147e565b6040516670726573616c6560c81b6020820152602701610ca0565b604051677072696f7269747960c01b6020820152602801610ca0565b604051657075626c696360d01b6020820152602601610ca0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b0316331461111e5760405162461bcd60e51b81526004016106ed90612517565b61097260098261173c565b6002600b54141561114c5760405162461bcd60e51b81526004016106ed906124a5565b6002600b55600c54604051657075626c696360d01b602082015261117491839160260161071b565b61117e3382611574565b506001600b55565b6008546001600160a01b031633146111b05760405162461bcd60e51b81526004016106ed90612517565b6001600160a01b0381166112155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ed565b610b9a8161158e565b6008546001600160a01b031633146112485760405162461bcd60e51b81526004016106ed90612517565b600c55565b806112c7576040516518db1bdcd95960d21b602082015260260160405160208183030381529060405280519060200120600e5414156112c25760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc818db1bdcd959607a1b60448201526064016106ed565b61135f565b80600e541461130a5760405162461bcd60e51b815260206004820152600f60248201526e57726f6e67206d696e74537461746560881b60448201526064016106ed565b61131b836646b2f1cf07c000612618565b34101561135f5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b60448201526064016106ed565b604051657075626c696360d01b6020820152602601604051602081830303815290604052805190602001208114156113db57600c548311156113d65760405162461bcd60e51b815260206004820152601060248201526f115e18d959591cc81d1e1b931a5b5a5d60821b60448201526064016106ed565b611420565b818311156114205760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b2399030b63637b1b0ba34b7b760711b60448201526064016106ed565b6001546000546107cf918591036000190161143b919061257e565b1115610bb85760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016106ed565b6000303383876040516020016114979493929190612637565b60405160208183030381529060405290506114b76009828686600f611751565b610b003387611574565b6000816001111580156114d5575060005482105b80156106c4575050600090815260046020526040902054600160e01b161590565b600061100e836001600160a01b0384166117f2565b6000818060011161155b5760005481101561155b57600081815260046020526040902054600160e01b8116611559575b8061100e57506000190160008181526004602052604090205461153b565b505b604051636f96cda160e11b815260040160405180910390fd5b6109728282604051806020016040528060008152506118e5565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006106c482611952565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611620903390899088908890600401612674565b602060405180830381600087803b15801561163a57600080fd5b505af192505050801561166a575060408051601f3d908101601f19168201909252611667918101906126b1565b60015b6116c5573d808015611698576040519150601f19603f3d011682016040523d82523d6000602084013e61169d565b606091505b5080516116bd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610da5565b6060600d805461077d906124dc565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806117255761172a565b611708565b50819003601f19909101908152919050565b600061100e836001600160a01b03841661198d565b600061175c856115e0565b60008181526020849052604090205490915060ff16156117cd5760405162461bcd60e51b815260206004820152602660248201527f5369676e6174757265436865636b65723a204d65737361676520616c726561646044820152651e481d5cd95960d21b60648201526084016106ed565b6000818152602083905260409020805460ff19166001179055610b00868286866119dc565b600081815260018301602052604081205480156118db5760006118166001836126ce565b855490915060009061182a906001906126ce565b905081811461188f57600086600001828154811061184a5761184a6126e5565b906000526020600020015490508087600001848154811061186d5761186d6126e5565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806118a0576118a06126fb565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106c4565b60009150506106c4565b6118ef8383611a40565b6001600160a01b0383163b15610bb8576000548281035b61191960008683806001019450866115eb565b611936576040516368d2bf6b60e11b815260040160405180910390fd5b81811061190657816000541461194b57600080fd5b5050505050565b600061195e8251611b37565b82604051602001611970929190612711565b604051602081830303815290604052805190602001209050919050565b60008181526001830160205260408120546119d4575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106c4565b5060006106c4565b6119e884848484611c35565b610f135760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b60648201526084016106ed565b60005481611a615760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b1057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611ad8565b5081611b2e57604051622e076360e81b815260040160405180910390fd5b60005550505050565b606081611b5b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b855780611b6f8161276c565b9150611b7e9050600a8361279d565b9150611b5f565b60008167ffffffffffffffff811115611ba057611ba0612206565b6040519080825280601f01601f191660200182016040528015611bca576020820181803683370190505b5090505b8415610da557611bdf6001836126ce565b9150611bec600a866127b1565b611bf790603061257e565b60f81b818381518110611c0c57611c0c6126e5565b60200101906001600160f81b031916908160001a905350611c2e600a8661279d565b9450611bce565b6000611c81611c7a8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c8a92505050565b8690611cae565b95945050505050565b6000806000611c998585611cd0565b91509150611ca681611d40565b509392505050565b6001600160a01b0381166000908152600183016020526040812054151561100e565b600080825160411415611d075760208301516040840151606085015160001a611cfb87828585611efb565b94509450505050611d39565b825160401415611d315760208301516040840151611d26868383611fe8565b935093505050611d39565b506000905060025b9250929050565b6000816004811115611d5457611d546127c5565b1415611d5d5750565b6001816004811115611d7157611d716127c5565b1415611dbf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106ed565b6002816004811115611dd357611dd36127c5565b1415611e215760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106ed565b6003816004811115611e3557611e356127c5565b1415611e8e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106ed565b6004816004811115611ea257611ea26127c5565b1415610b9a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f325750600090506003611fdf565b8460ff16601b14158015611f4a57508460ff16601c14155b15611f5b5750600090506004611fdf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611faf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611fd857600060019250925050611fdf565b9150600090505b94509492505050565b6000806001600160ff1b0383168161200560ff86901c601b61257e565b905061201387828885611efb565b935093505050935093915050565b82805461202d906124dc565b90600052602060002090601f01602090048101928261204f5760008555612095565b82601f1061206857805160ff1916838001178555612095565b82800160010185558215612095579182015b8281111561209557825182559160200191906001019061207a565b506120a19291506120a5565b5090565b5b808211156120a157600081556001016120a6565b6001600160e01b031981168114610b9a57600080fd5b6000602082840312156120e257600080fd5b813561100e816120ba565b60008083601f8401126120ff57600080fd5b50813567ffffffffffffffff81111561211757600080fd5b602083019150836020828501011115611d3957600080fd5b6000806000806060858703121561214557600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561216a57600080fd5b612176878288016120ed565b95989497509550505050565b60005b8381101561219d578181015183820152602001612185565b83811115610f135750506000910152565b600081518084526121c6816020860160208601612182565b601f01601f19169290920160200192915050565b60208152600061100e60208301846121ae565b6000602082840312156121ff57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561223757612237612206565b604051601f8501601f19908116603f0116810190828211818310171561225f5761225f612206565b8160405280935085815286868601111561227857600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156122a457600080fd5b813567ffffffffffffffff8111156122bb57600080fd5b8201601f810184136122cc57600080fd5b610da58482356020840161221c565b80356001600160a01b03811681146122f257600080fd5b919050565b6000806040838503121561230a57600080fd5b612313836122db565b946020939093013593505050565b60006020828403121561233357600080fd5b61100e826122db565b60008060006060848603121561235157600080fd5b61235a846122db565b9250612368602085016122db565b9150604084013590509250925092565b6000806000806060858703121561238e57600080fd5b612397856122db565b935060208501359250604085013567ffffffffffffffff81111561216a57600080fd5b600080604083850312156123cd57600080fd5b6123d6836122db565b9150602083013580151581146123eb57600080fd5b809150509250929050565b6000806000806080858703121561240c57600080fd5b612415856122db565b9350612423602086016122db565b925060408501359150606085013567ffffffffffffffff81111561244657600080fd5b8501601f8101871361245757600080fd5b6124668782356020840161221c565b91505092959194509250565b6000806040838503121561248557600080fd5b61248e836122db565b915061249c602084016122db565b90509250929050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600181811c908216806124f057607f821691505b6020821081141561251157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000825161255e818460208701612182565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561259157612591612568565b500190565b6001600160a01b0386811682528516602082015260806040820181905281018390526000838560a0840137600060a0858401015260a0601f19601f86011683010190508260608301529695505050505050565b600083516125fb818460208801612182565b83519083019061260f818360208801612182565b01949350505050565b600081600019048311821515161561263257612632612568565b500290565b6001600160a01b03858116825284166020820152608060408201819052600090612663908301856121ae565b905082606083015295945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126a7908301846121ae565b9695505050505050565b6000602082840312156126c357600080fd5b815161100e816120ba565b6000828210156126e0576126e0612568565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161274981601a850160208801612182565b83519083019061276081601a840160208801612182565b01601a01949350505050565b600060001982141561278057612780612568565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826127ac576127ac612787565b500490565b6000826127c0576127c0612787565b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c1017c175a4b315f09e49cb0ba8a8fd48e8ef41760691ed01d562dc3a28e1b0764736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.