Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,442 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sacrifice | 16786375 | 653 days ago | IN | 0 ETH | 0.00126359 | ||||
Sacrifice | 16786373 | 653 days ago | IN | 0 ETH | 0.00131574 | ||||
Sacrifice | 16786367 | 653 days ago | IN | 0 ETH | 0.00176069 | ||||
Sacrifice | 16786366 | 653 days ago | IN | 0 ETH | 0.00154287 | ||||
Sacrifice | 16786365 | 653 days ago | IN | 0 ETH | 0.00140478 | ||||
Set Closed | 16786365 | 653 days ago | IN | 0 ETH | 0.00140702 | ||||
Sacrifice | 16786365 | 653 days ago | IN | 0 ETH | 0.00782081 | ||||
Sacrifice | 16786364 | 653 days ago | IN | 0 ETH | 0.00359151 | ||||
Sacrifice | 16786363 | 653 days ago | IN | 0 ETH | 0.0131555 | ||||
Sacrifice | 16786361 | 653 days ago | IN | 0 ETH | 0.00286174 | ||||
Sacrifice | 16786361 | 653 days ago | IN | 0 ETH | 0.00286174 | ||||
Sacrifice | 16786360 | 653 days ago | IN | 0 ETH | 0.00275769 | ||||
Sacrifice | 16786358 | 653 days ago | IN | 0 ETH | 0.00366237 | ||||
Sacrifice | 16786358 | 653 days ago | IN | 0 ETH | 0.00229546 | ||||
Sacrifice | 16786358 | 653 days ago | IN | 0 ETH | 0.00244278 | ||||
Sacrifice | 16786356 | 653 days ago | IN | 0 ETH | 0.00929912 | ||||
Sacrifice | 16786356 | 653 days ago | IN | 0 ETH | 0.00272351 | ||||
Sacrifice | 16786356 | 653 days ago | IN | 0 ETH | 0.01170676 | ||||
Sacrifice | 16786354 | 653 days ago | IN | 0 ETH | 0.01107649 | ||||
Sacrifice | 16786353 | 653 days ago | IN | 0 ETH | 0.00268754 | ||||
Sacrifice | 16786350 | 653 days ago | IN | 0 ETH | 0.01058355 | ||||
Sacrifice | 16786349 | 653 days ago | IN | 0 ETH | 0.00266036 | ||||
Sacrifice | 16786348 | 653 days ago | IN | 0 ETH | 0.00994417 | ||||
Sacrifice | 16786346 | 653 days ago | IN | 0 ETH | 0.00236742 | ||||
Sacrifice | 16786346 | 653 days ago | IN | 0 ETH | 0.00236742 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GGSacrifice
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract GGSacrifice is Ownable { using ECDSA for bytes32; State public state; IERC721 public seekers; address public deadAddress = address(0x000000000000000000000000000000000000dEaD); address private signer; enum State { Closed, Open } event SeekerSacrificed(address indexed from, uint256 indexed amount, bytes encoded); event ClaimOpen(); event ClaimClosed(); event SeekersUpdated(address indexed _address); constructor(IERC721 _seekers, address _signer) { seekers = _seekers; signer = _signer; } /* @dev: Allows no contracts */ modifier noContract() { require(msg.sender == tx.origin, "contract not allowed"); _; } /* @dev: Update the approached Seekers NFT address * @param: _seekers - Seekers address to update to */ function setSeekers(IERC721 _seekers) external onlyOwner { seekers = _seekers; emit SeekersUpdated({_address: address(_seekers)}); } /* @dev: Update the address of the signing wallet to sign message for token * @param: _signer - public address of new signer */ function setSigner(address _signer) external onlyOwner { signer = _signer; } /* @dev: Sets claim to open */ function setOpen() external onlyOwner { state = State.Open; emit ClaimOpen(); } /* @dev: Sets claim to closed */ function setClosed() external onlyOwner { state = State.Closed; emit ClaimClosed(); } function _verify( bytes memory message, bytes calldata signature, address account ) internal pure returns (bool) { return keccak256(message).toEthSignedMessageHash().recover(signature) == account; } // Description // Those Seekers which are pledged are now able to be sacrificed. // Those who sacrifice their Seekers are gifted an amulet in return (to happen later on ROOT) /* @dev: Seekers sacrificed and sent to burn wallet * @param: encoded - bytes of encoded data (wallet, contractAddress, tokenIds[]) * @param: token - signer signature as bytes */ function sacrifice(bytes calldata encoded, bytes calldata token) external noContract { require(state == State.Open, "sacrifice not open"); // get values out of ABI encoded string (address wallet, address contractAddress, uint256[] memory tokenIds) = abi.decode( encoded, (address, address, uint256[]) ); // fail if wallet is not msg.sender require(wallet == msg.sender, "invalid wallet"); // fail if contract does not match that of the token require(contractAddress == address(this), "invalid contract"); // fail if token cannot be verified as signed by signer require(_verify(encoded, token, signer), "invalid token"); // fail if token array is not length 1, 5 or 15 require(tokenIds.length == 1 || tokenIds.length == 5 || tokenIds.length == 15, "invalid tokenId array"); for (uint256 i = 0; i < tokenIds.length; i++) { seekers.safeTransferFrom(msg.sender, deadAddress, tokenIds[i]); } emit SeekerSacrificed({from: msg.sender, amount: tokenIds.length, encoded: encoded}); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: 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; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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. /// @solidity memory-safe-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. /// @solidity memory-safe-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 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // 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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, * including the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at `_startTokenId()` * (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // 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 tokenId of the next token 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 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @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 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 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 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 returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ 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: 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. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view 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 { 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; } /** * 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 ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * 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); } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @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 See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { 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 ''; } /** * @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)) } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, 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 { _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 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 { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); 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 tokenId = startTokenId; uint256 end = startTokenId + quantity; do { emit Transfer(address(0), to, tokenId++); } while (tokenId < end); _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 { 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 Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { // Compute the slot. mstore(0x00, tokenId) mstore(0x20, tokenApprovalsPtr.slot) approvedAddressSlot := keccak256(0x00, 0x40) // Load the slot's value from storage. approvedAddress := sload(approvedAddressSlot) } } /** * @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`. */ function _isOwnerOrApproved( address approvedAddress, address from, address msgSender ) private pure returns (bool result) { assembly { // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from := and(from, BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, BITMASK_ADDRESS) // `msgSender == from || msgSender == approvedAddress`. result := or(eq(msgSender, from), eq(msgSender, approvedAddress)) } } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(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 `_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) = _getApprovedAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(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++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool 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)) } } } } /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal { 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 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; } /** * @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 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 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 returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * 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(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of 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 through `_extraData`. uint24 extraData; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // IERC165 // ============================== /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================== // 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`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must 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 ) external; /** * @dev Transfers `tokenId` token 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; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // 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 standard. See `_mintERC2309` for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721","name":"_seekers","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"ClaimClosed","type":"event"},{"anonymous":false,"inputs":[],"name":"ClaimOpen","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":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"encoded","type":"bytes"}],"name":"SeekerSacrificed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"SeekersUpdated","type":"event"},{"inputs":[],"name":"deadAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encoded","type":"bytes"},{"internalType":"bytes","name":"token","type":"bytes"}],"name":"sacrifice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seekers","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_seekers","type":"address"}],"name":"setSeekers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"enum GGSacrifice.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405261dead600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503480156200005457600080fd5b5060405162001f7838038062001f7883398181016040528101906200007a91906200029f565b6200009a6200008e6200012460201b60201c565b6200012c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620002e6565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200022282620001f5565b9050919050565b6000620002368262000215565b9050919050565b620002488162000229565b81146200025457600080fd5b50565b60008151905062000268816200023d565b92915050565b620002798162000215565b81146200028557600080fd5b50565b60008151905062000299816200026e565b92915050565b60008060408385031215620002b957620002b8620001f0565b5b6000620002c98582860162000257565b9250506020620002dc8582860162000288565b9150509250929050565b611c8280620002f66000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063715018a611610071578063715018a61461012c5780638da5cb5b14610136578063c19d93fb14610154578063da9c38fe14610172578063f2dc6b331461018e578063f2fde38b14610198576100a9565b80632285fcba146100ae57806327c8f835146100cc5780636c19e783146100ea5780637029f53714610106578063712b7b1414610122575b600080fd5b6100b66101b4565b6040516100c39190610f15565b60405180910390f35b6100d46101da565b6040516100e19190610f51565b60405180910390f35b61010460048036038101906100ff9190610fac565b610200565b005b610120600480360381019061011b919061103e565b61024c565b005b61012a61067a565b005b6101346106db565b005b61013e6106ef565b60405161014b9190610f51565b60405180910390f35b61015c610718565b6040516101699190611136565b60405180910390f35b61018c6004803603810190610187919061118f565b61072b565b005b6101966107ba565b005b6101b260048036038101906101ad9190610fac565b61081a565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61020861089d565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102b190611219565b60405180910390fd5b6001808111156102cd576102cc6110bf565b5b600060149054906101000a900460ff1660018111156102ef576102ee6110bf565b5b1461032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032690611285565b60405180910390fd5b600080600086868101906103439190611468565b9250925092503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ae90611523565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041c9061158f565b60405180910390fd5b61049787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661091b565b6104d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cd906115fb565b60405180910390fd5b6001815114806104e7575060058151145b806104f35750600f8151145b610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052990611667565b60405180910390fd5b60005b815181101561061e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e33600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168585815181106105b3576105b2611687565b5b60200260200101516040518463ffffffff1660e01b81526004016105d9939291906116c5565b600060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b5050505080806106169061172b565b915050610535565b5080513373ffffffffffffffffffffffffffffffffffffffff167f63175150af2a12bb32f19b14797060e1849779c9e993135d98ee2fd99866457d89896040516106699291906117c0565b60405180910390a350505050505050565b61068261089d565b6001600060146101000a81548160ff021916908360018111156106a8576106a76110bf565b5b02179055507f0a1c1f14fb576fdcf33dc5fa27868e61fd4447b0e37a37413baac599860ce15160405160405180910390a1565b6106e361089d565b6106ed60006109bb565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060149054906101000a900460ff1681565b61073361089d565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f79c8e5ad2d2b9eaa47de35b718f00ab517ba0c1a74ff66af4b34d7777c351f6360405160405180910390a250565b6107c261089d565b60008060146101000a81548160ff021916908360018111156107e7576107e66110bf565b5b02179055507ff6e850410fa4d8fd9b737c33ca71807e36d58f087814d6f8790078fea8e8b2ad60405160405180910390a1565b61082261089d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088890611856565b60405180910390fd5b61089a816109bb565b50565b6108a5610a7f565b73ffffffffffffffffffffffffffffffffffffffff166108c36106ef565b73ffffffffffffffffffffffffffffffffffffffff1614610919576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610910906118c2565b60405180910390fd5b565b60008173ffffffffffffffffffffffffffffffffffffffff1661099a85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061098c8880519060200120610a87565b610ab790919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16149050949350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600081604051602001610a9a9190611964565b604051602081830303815290604052805190602001209050919050565b6000806000610ac68585610ade565b91509150610ad381610b5f565b819250505092915050565b6000806041835103610b1f5760008060006020860151925060408601519150606086015160001a9050610b1387828585610d2b565b94509450505050610b58565b6040835103610b4f576000806020850151915060408501519050610b44868383610e37565b935093505050610b58565b60006002915091505b9250929050565b60006004811115610b7357610b726110bf565b5b816004811115610b8657610b856110bf565b5b0315610d285760016004811115610ba057610b9f6110bf565b5b816004811115610bb357610bb26110bf565b5b03610bf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bea906119d6565b60405180910390fd5b60026004811115610c0757610c066110bf565b5b816004811115610c1a57610c196110bf565b5b03610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190611a42565b60405180910390fd5b60036004811115610c6e57610c6d6110bf565b5b816004811115610c8157610c806110bf565b5b03610cc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb890611ad4565b60405180910390fd5b600480811115610cd457610cd36110bf565b5b816004811115610ce757610ce66110bf565b5b03610d27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1e90611b66565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115610d66576000600391509150610e2e565b601b8560ff1614158015610d7e5750601c8560ff1614155b15610d90576000600491509150610e2e565b600060018787878760405160008152602001604052604051610db59493929190611bb1565b6020604051602081039080840390855afa158015610dd7573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e2557600060019250925050610e2e565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c610e7a9190611bf6565b9050610e8887828885610d2b565b935093505050935093915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610edb610ed6610ed184610e96565b610eb6565b610e96565b9050919050565b6000610eed82610ec0565b9050919050565b6000610eff82610ee2565b9050919050565b610f0f81610ef4565b82525050565b6000602082019050610f2a6000830184610f06565b92915050565b6000610f3b82610e96565b9050919050565b610f4b81610f30565b82525050565b6000602082019050610f666000830184610f42565b92915050565b6000604051905090565b600080fd5b600080fd5b610f8981610f30565b8114610f9457600080fd5b50565b600081359050610fa681610f80565b92915050565b600060208284031215610fc257610fc1610f76565b5b6000610fd084828501610f97565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610ffe57610ffd610fd9565b5b8235905067ffffffffffffffff81111561101b5761101a610fde565b5b60208301915083600182028301111561103757611036610fe3565b5b9250929050565b6000806000806040858703121561105857611057610f76565b5b600085013567ffffffffffffffff81111561107657611075610f7b565b5b61108287828801610fe8565b9450945050602085013567ffffffffffffffff8111156110a5576110a4610f7b565b5b6110b187828801610fe8565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600281106110ff576110fe6110bf565b5b50565b6000819050611110826110ee565b919050565b600061112082611102565b9050919050565b61113081611115565b82525050565b600060208201905061114b6000830184611127565b92915050565b600061115c82610f30565b9050919050565b61116c81611151565b811461117757600080fd5b50565b60008135905061118981611163565b92915050565b6000602082840312156111a5576111a4610f76565b5b60006111b38482850161117a565b91505092915050565b600082825260208201905092915050565b7f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000600082015250565b60006112036014836111bc565b915061120e826111cd565b602082019050919050565b60006020820190508181036000830152611232816111f6565b9050919050565b7f736163726966696365206e6f74206f70656e0000000000000000000000000000600082015250565b600061126f6012836111bc565b915061127a82611239565b602082019050919050565b6000602082019050818103600083015261129e81611262565b9050919050565b60006112b082610e96565b9050919050565b6112c0816112a5565b81146112cb57600080fd5b50565b6000813590506112dd816112b7565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61132c826112e3565b810181811067ffffffffffffffff8211171561134b5761134a6112f4565b5b80604052505050565b600061135e610f6c565b905061136a8282611323565b919050565b600067ffffffffffffffff82111561138a576113896112f4565b5b602082029050602081019050919050565b6000819050919050565b6113ae8161139b565b81146113b957600080fd5b50565b6000813590506113cb816113a5565b92915050565b60006113e46113df8461136f565b611354565b9050808382526020820190506020840283018581111561140757611406610fe3565b5b835b81811015611430578061141c88826113bc565b845260208401935050602081019050611409565b5050509392505050565b600082601f83011261144f5761144e610fd9565b5b813561145f8482602086016113d1565b91505092915050565b60008060006060848603121561148157611480610f76565b5b600061148f868287016112ce565b93505060206114a0868287016112ce565b925050604084013567ffffffffffffffff8111156114c1576114c0610f7b565b5b6114cd8682870161143a565b9150509250925092565b7f696e76616c69642077616c6c6574000000000000000000000000000000000000600082015250565b600061150d600e836111bc565b9150611518826114d7565b602082019050919050565b6000602082019050818103600083015261153c81611500565b9050919050565b7f696e76616c696420636f6e747261637400000000000000000000000000000000600082015250565b60006115796010836111bc565b915061158482611543565b602082019050919050565b600060208201905081810360008301526115a88161156c565b9050919050565b7f696e76616c696420746f6b656e00000000000000000000000000000000000000600082015250565b60006115e5600d836111bc565b91506115f0826115af565b602082019050919050565b60006020820190508181036000830152611614816115d8565b9050919050565b7f696e76616c696420746f6b656e49642061727261790000000000000000000000600082015250565b60006116516015836111bc565b915061165c8261161b565b602082019050919050565b6000602082019050818103600083015261168081611644565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6116bf8161139b565b82525050565b60006060820190506116da6000830186610f42565b6116e76020830185610f42565b6116f460408301846116b6565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006117368261139b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611768576117676116fc565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b600061179f8385611773565b93506117ac838584611784565b6117b5836112e3565b840190509392505050565b600060208201905081810360008301526117db818486611793565b90509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006118406026836111bc565b915061184b826117e4565b604082019050919050565b6000602082019050818103600083015261186f81611833565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006118ac6020836111bc565b91506118b782611876565b602082019050919050565b600060208201905081810360008301526118db8161189f565b9050919050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000611923601c836118e2565b915061192e826118ed565b601c82019050919050565b6000819050919050565b6000819050919050565b61195e61195982611939565b611943565b82525050565b600061196f82611916565b915061197b828461194d565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006119c06018836111bc565b91506119cb8261198a565b602082019050919050565b600060208201905081810360008301526119ef816119b3565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000611a2c601f836111bc565b9150611a37826119f6565b602082019050919050565b60006020820190508181036000830152611a5b81611a1f565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611abe6022836111bc565b9150611ac982611a62565b604082019050919050565b60006020820190508181036000830152611aed81611ab1565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b506022836111bc565b9150611b5b82611af4565b604082019050919050565b60006020820190508181036000830152611b7f81611b43565b9050919050565b611b8f81611939565b82525050565b600060ff82169050919050565b611bab81611b95565b82525050565b6000608082019050611bc66000830187611b86565b611bd36020830186611ba2565b611be06040830185611b86565b611bed6060830184611b86565b95945050505050565b6000611c018261139b565b9150611c0c8361139b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611c4157611c406116fc565b5b82820190509291505056fea26469706673582212204f448c12f8eb8cba56d129b093702b50e479160b20d4053adbf4a03538fcf4df64736f6c634300080f0033000000000000000000000000aaf03a65cbd8f01b512cd8d530a675b3963de255000000000000000000000000bead558c7ed28278b2113e3bfb7811029647ccaa
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063715018a611610071578063715018a61461012c5780638da5cb5b14610136578063c19d93fb14610154578063da9c38fe14610172578063f2dc6b331461018e578063f2fde38b14610198576100a9565b80632285fcba146100ae57806327c8f835146100cc5780636c19e783146100ea5780637029f53714610106578063712b7b1414610122575b600080fd5b6100b66101b4565b6040516100c39190610f15565b60405180910390f35b6100d46101da565b6040516100e19190610f51565b60405180910390f35b61010460048036038101906100ff9190610fac565b610200565b005b610120600480360381019061011b919061103e565b61024c565b005b61012a61067a565b005b6101346106db565b005b61013e6106ef565b60405161014b9190610f51565b60405180910390f35b61015c610718565b6040516101699190611136565b60405180910390f35b61018c6004803603810190610187919061118f565b61072b565b005b6101966107ba565b005b6101b260048036038101906101ad9190610fac565b61081a565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61020861089d565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102b190611219565b60405180910390fd5b6001808111156102cd576102cc6110bf565b5b600060149054906101000a900460ff1660018111156102ef576102ee6110bf565b5b1461032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032690611285565b60405180910390fd5b600080600086868101906103439190611468565b9250925092503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146103b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ae90611523565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041c9061158f565b60405180910390fd5b61049787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661091b565b6104d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cd906115fb565b60405180910390fd5b6001815114806104e7575060058151145b806104f35750600f8151145b610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052990611667565b60405180910390fd5b60005b815181101561061e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e33600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168585815181106105b3576105b2611687565b5b60200260200101516040518463ffffffff1660e01b81526004016105d9939291906116c5565b600060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b5050505080806106169061172b565b915050610535565b5080513373ffffffffffffffffffffffffffffffffffffffff167f63175150af2a12bb32f19b14797060e1849779c9e993135d98ee2fd99866457d89896040516106699291906117c0565b60405180910390a350505050505050565b61068261089d565b6001600060146101000a81548160ff021916908360018111156106a8576106a76110bf565b5b02179055507f0a1c1f14fb576fdcf33dc5fa27868e61fd4447b0e37a37413baac599860ce15160405160405180910390a1565b6106e361089d565b6106ed60006109bb565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060149054906101000a900460ff1681565b61073361089d565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f79c8e5ad2d2b9eaa47de35b718f00ab517ba0c1a74ff66af4b34d7777c351f6360405160405180910390a250565b6107c261089d565b60008060146101000a81548160ff021916908360018111156107e7576107e66110bf565b5b02179055507ff6e850410fa4d8fd9b737c33ca71807e36d58f087814d6f8790078fea8e8b2ad60405160405180910390a1565b61082261089d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088890611856565b60405180910390fd5b61089a816109bb565b50565b6108a5610a7f565b73ffffffffffffffffffffffffffffffffffffffff166108c36106ef565b73ffffffffffffffffffffffffffffffffffffffff1614610919576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610910906118c2565b60405180910390fd5b565b60008173ffffffffffffffffffffffffffffffffffffffff1661099a85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061098c8880519060200120610a87565b610ab790919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16149050949350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600081604051602001610a9a9190611964565b604051602081830303815290604052805190602001209050919050565b6000806000610ac68585610ade565b91509150610ad381610b5f565b819250505092915050565b6000806041835103610b1f5760008060006020860151925060408601519150606086015160001a9050610b1387828585610d2b565b94509450505050610b58565b6040835103610b4f576000806020850151915060408501519050610b44868383610e37565b935093505050610b58565b60006002915091505b9250929050565b60006004811115610b7357610b726110bf565b5b816004811115610b8657610b856110bf565b5b0315610d285760016004811115610ba057610b9f6110bf565b5b816004811115610bb357610bb26110bf565b5b03610bf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bea906119d6565b60405180910390fd5b60026004811115610c0757610c066110bf565b5b816004811115610c1a57610c196110bf565b5b03610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190611a42565b60405180910390fd5b60036004811115610c6e57610c6d6110bf565b5b816004811115610c8157610c806110bf565b5b03610cc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb890611ad4565b60405180910390fd5b600480811115610cd457610cd36110bf565b5b816004811115610ce757610ce66110bf565b5b03610d27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1e90611b66565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115610d66576000600391509150610e2e565b601b8560ff1614158015610d7e5750601c8560ff1614155b15610d90576000600491509150610e2e565b600060018787878760405160008152602001604052604051610db59493929190611bb1565b6020604051602081039080840390855afa158015610dd7573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e2557600060019250925050610e2e565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c610e7a9190611bf6565b9050610e8887828885610d2b565b935093505050935093915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610edb610ed6610ed184610e96565b610eb6565b610e96565b9050919050565b6000610eed82610ec0565b9050919050565b6000610eff82610ee2565b9050919050565b610f0f81610ef4565b82525050565b6000602082019050610f2a6000830184610f06565b92915050565b6000610f3b82610e96565b9050919050565b610f4b81610f30565b82525050565b6000602082019050610f666000830184610f42565b92915050565b6000604051905090565b600080fd5b600080fd5b610f8981610f30565b8114610f9457600080fd5b50565b600081359050610fa681610f80565b92915050565b600060208284031215610fc257610fc1610f76565b5b6000610fd084828501610f97565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610ffe57610ffd610fd9565b5b8235905067ffffffffffffffff81111561101b5761101a610fde565b5b60208301915083600182028301111561103757611036610fe3565b5b9250929050565b6000806000806040858703121561105857611057610f76565b5b600085013567ffffffffffffffff81111561107657611075610f7b565b5b61108287828801610fe8565b9450945050602085013567ffffffffffffffff8111156110a5576110a4610f7b565b5b6110b187828801610fe8565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600281106110ff576110fe6110bf565b5b50565b6000819050611110826110ee565b919050565b600061112082611102565b9050919050565b61113081611115565b82525050565b600060208201905061114b6000830184611127565b92915050565b600061115c82610f30565b9050919050565b61116c81611151565b811461117757600080fd5b50565b60008135905061118981611163565b92915050565b6000602082840312156111a5576111a4610f76565b5b60006111b38482850161117a565b91505092915050565b600082825260208201905092915050565b7f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000600082015250565b60006112036014836111bc565b915061120e826111cd565b602082019050919050565b60006020820190508181036000830152611232816111f6565b9050919050565b7f736163726966696365206e6f74206f70656e0000000000000000000000000000600082015250565b600061126f6012836111bc565b915061127a82611239565b602082019050919050565b6000602082019050818103600083015261129e81611262565b9050919050565b60006112b082610e96565b9050919050565b6112c0816112a5565b81146112cb57600080fd5b50565b6000813590506112dd816112b7565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61132c826112e3565b810181811067ffffffffffffffff8211171561134b5761134a6112f4565b5b80604052505050565b600061135e610f6c565b905061136a8282611323565b919050565b600067ffffffffffffffff82111561138a576113896112f4565b5b602082029050602081019050919050565b6000819050919050565b6113ae8161139b565b81146113b957600080fd5b50565b6000813590506113cb816113a5565b92915050565b60006113e46113df8461136f565b611354565b9050808382526020820190506020840283018581111561140757611406610fe3565b5b835b81811015611430578061141c88826113bc565b845260208401935050602081019050611409565b5050509392505050565b600082601f83011261144f5761144e610fd9565b5b813561145f8482602086016113d1565b91505092915050565b60008060006060848603121561148157611480610f76565b5b600061148f868287016112ce565b93505060206114a0868287016112ce565b925050604084013567ffffffffffffffff8111156114c1576114c0610f7b565b5b6114cd8682870161143a565b9150509250925092565b7f696e76616c69642077616c6c6574000000000000000000000000000000000000600082015250565b600061150d600e836111bc565b9150611518826114d7565b602082019050919050565b6000602082019050818103600083015261153c81611500565b9050919050565b7f696e76616c696420636f6e747261637400000000000000000000000000000000600082015250565b60006115796010836111bc565b915061158482611543565b602082019050919050565b600060208201905081810360008301526115a88161156c565b9050919050565b7f696e76616c696420746f6b656e00000000000000000000000000000000000000600082015250565b60006115e5600d836111bc565b91506115f0826115af565b602082019050919050565b60006020820190508181036000830152611614816115d8565b9050919050565b7f696e76616c696420746f6b656e49642061727261790000000000000000000000600082015250565b60006116516015836111bc565b915061165c8261161b565b602082019050919050565b6000602082019050818103600083015261168081611644565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6116bf8161139b565b82525050565b60006060820190506116da6000830186610f42565b6116e76020830185610f42565b6116f460408301846116b6565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006117368261139b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611768576117676116fc565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b600061179f8385611773565b93506117ac838584611784565b6117b5836112e3565b840190509392505050565b600060208201905081810360008301526117db818486611793565b90509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006118406026836111bc565b915061184b826117e4565b604082019050919050565b6000602082019050818103600083015261186f81611833565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006118ac6020836111bc565b91506118b782611876565b602082019050919050565b600060208201905081810360008301526118db8161189f565b9050919050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000611923601c836118e2565b915061192e826118ed565b601c82019050919050565b6000819050919050565b6000819050919050565b61195e61195982611939565b611943565b82525050565b600061196f82611916565b915061197b828461194d565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006119c06018836111bc565b91506119cb8261198a565b602082019050919050565b600060208201905081810360008301526119ef816119b3565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000611a2c601f836111bc565b9150611a37826119f6565b602082019050919050565b60006020820190508181036000830152611a5b81611a1f565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611abe6022836111bc565b9150611ac982611a62565b604082019050919050565b60006020820190508181036000830152611aed81611ab1565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b506022836111bc565b9150611b5b82611af4565b604082019050919050565b60006020820190508181036000830152611b7f81611b43565b9050919050565b611b8f81611939565b82525050565b600060ff82169050919050565b611bab81611b95565b82525050565b6000608082019050611bc66000830187611b86565b611bd36020830186611ba2565b611be06040830185611b86565b611bed6060830184611b86565b95945050505050565b6000611c018261139b565b9150611c0c8361139b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611c4157611c406116fc565b5b82820190509291505056fea26469706673582212204f448c12f8eb8cba56d129b093702b50e479160b20d4053adbf4a03538fcf4df64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aaf03a65cbd8f01b512cd8d530a675b3963de255000000000000000000000000bead558c7ed28278b2113e3bfb7811029647ccaa
-----Decoded View---------------
Arg [0] : _seekers (address): 0xaAF03a65CbD8f01b512Cd8d530a675b3963dE255
Arg [1] : _signer (address): 0xbEAD558c7ED28278b2113e3bFb7811029647ccaA
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000aaf03a65cbd8f01b512cd8d530a675b3963de255
Arg [1] : 000000000000000000000000bead558c7ed28278b2113e3bfb7811029647ccaa
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.