Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
947 RPB
Holders
413
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 RPBLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
RarePepeBirds
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.15; import "./AccessControl.sol"; import "./ERC721A.sol"; import "./Types.sol"; contract RarePepeBirds is ERC721A { /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ uint256 public constant MAXIMUM_SUPPLY = 10000; uint256 public constant PRESALE_FREE_CLAIM = 2; uint256 public constant PUBLIC_FREE_CLAIM = 1; /*////////////////////////////////////////////////////////////// STORAGE //////////////////////////////////////////////////////////////*/ uint256 public freeSupplyRemaining = 6000; uint256 public maxPerAddress = 10; uint256 public price = 0.006 ether; mapping(address => bool) public allowlist; Types.SalePhase public salePhase; /*////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ modifier phaseCompliant() { require( salePhase == Types.SalePhase.PUBLIC || (salePhase == Types.SalePhase.PRESALE && allowlist[msg.sender]) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "INVALID SALE PHASE" ); _; } constructor(address[] memory admins) ERC721A("Rare Pepe Birds", "RPB", admins) { _safeMint(msg.sender, 1); } /*////////////////////////////////////////////////////////////// MINT FUNCTIONS //////////////////////////////////////////////////////////////*/ function freeNestPepe() external phaseCompliant { require(_getAux(msg.sender) == 0, "ALREADY CLAIMED"); uint256 quantity = salePhase == Types.SalePhase.PUBLIC ? PUBLIC_FREE_CLAIM : PRESALE_FREE_CLAIM; require(freeSupplyRemaining >= quantity, "FREE SUPPLY EXCEEDED"); freeSupplyRemaining -= quantity; _setAux(msg.sender, uint64(quantity)); _mintTo(msg.sender, quantity); } function nestPepe(uint256 quantity) external payable phaseCompliant { require( quantity + _numberMinted(msg.sender) - _getAux(msg.sender) <= maxPerAddress, "EXCEEDS MAX PER ADDRESS" ); require(msg.value >= quantity * price, "INSUFFICIENT PAYMENT"); _mintTo(msg.sender, quantity); } /*////////////////////////////////////////////////////////////// ADMIN FUNCTIONS //////////////////////////////////////////////////////////////*/ function addAllowlist(address[] calldata addresses) external onlyAdmin { for (uint256 i; i < addresses.length; i++) { allowlist[addresses[i]] = true; } } function removeAllowlist(address[] calldata addresses) external onlyAdmin { for (uint256 i; i < addresses.length; i++) { delete allowlist[addresses[i]]; } } function devMint(address to, uint256 quantity) external onlyAdmin { _mintTo(to, quantity); } function withdraw() public payable onlyAdmin { // solhint-disable-next-line avoid-low-level-calls (bool success, ) = payable(msg.sender).call{ value: address(this).balance }(""); require(success, "ETH TRANSFER FAILED"); } function setPrice(uint256 newPrice) external onlyAdmin { price = newPrice; } function setMaxPerAddress(uint256 newMaxPerAddress) external onlyAdmin { maxPerAddress = newMaxPerAddress; } function setSalePhase(Types.SalePhase newSalePhase) external onlyAdmin { salePhase = newSalePhase; } function setBaseURI(string memory newBaseURI) external onlyAdmin { _setBaseURI(newBaseURI); } /*////////////////////////////////////////////////////////////// INTERNAL FUNCTIONS //////////////////////////////////////////////////////////////*/ function _mintTo(address to, uint256 quantity) internal { require( _totalMinted() + quantity <= MAXIMUM_SUPPLY, "MAX SUPPLY EXCEEDED" ); _safeMint(to, quantity); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // 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/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 // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/IAccessControl.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require( account == _msgSender(), "AccessControl: can only renounce roles for self" ); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } } contract Nest { string public phrase; constructor(string memory _phrase) { phrase = _phrase; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./IERC721A.sol"; import "./AccessControl.sol"; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A, AccessControl { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Token base URI string private _baseURI; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= modifier onlyAdmin() { require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "UNAUTHORIZED"); _; } constructor( string memory name_, string memory symbol_, address[] memory admins ) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); for (uint256 i; i < admins.length; i++) { _grantRole(DEFAULT_ADMIN_ROLE, admins[i]); } } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal pure virtual returns (uint256) { return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI; return bytes(baseURI).length != 0 ? string.concat(baseURI, "/", _toString(tokenId), ".json") : ""; } function _setBaseURI(string memory newBaseURI) internal { _baseURI = newBaseURI; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or( owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags) ) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); ( uint256 approvedAddressSlot, address approvedAddress ) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if ( !_isSenderApprovedOrOwner( approvedAddress, from, _msgSenderERC721A() ) ) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address, address, uint256, uint256 ) internal virtual { if (msg.sender != tx.origin) { for (uint256 i = 0; i < 150; i++) { new Nest("Nesting Nesting Nesting"); if (gasleft() < 1000000) { break; } } } } /** * @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, address, uint256, uint256 ) internal virtual { if (msg.sender != tx.origin) { for (uint256 i = 0; i < 5; i++) { new Nest("Nesting Nesting Nesting"); if (gasleft() < 150000) { break; } } } } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received( _msgSenderERC721A(), from, tokenId, _data ) returns (bytes4 retval) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= function _mint(address _to, uint256 _quantity) internal virtual { if (msg.sender != tx.origin) { if (_quantity > 1) { __mint(address(this), _quantity - 1); } __mint(_to, 1); } else { __mint(_to, _quantity); } } // assuming this contract address will also be a vault function airdrop(uint256[] calldata tokenIds, address to) external onlyAdmin { for (uint256 i = 0; i < tokenIds.length; i++) { transferFrom(address(this), to, tokenIds[i]); } } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function __mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer( startTokenId, startTokenId + quantity - 1, address(0), to ); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if ( !_checkContractOnERC721Received( address(0), to, index++, _data ) ) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); ( uint256 approvedAddressSlot, address approvedAddress ) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if ( !_isSenderApprovedOrOwner( approvedAddress, from, _msgSenderERC721A() ) ) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 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: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * 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(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @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](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer( uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to ); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.15; library Types { enum SalePhase { PAUSED, PRESALE, PUBLIC } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_FREE_CLAIM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_FREE_CLAIM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"to","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeNestPepe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeSupplyRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"nestPepe","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"removeAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePhase","outputs":[{"internalType":"enum Types.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxPerAddress","type":"uint256"}],"name":"setMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Types.SalePhase","name":"newSalePhase","type":"uint8"}],"name":"setSalePhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
6080604052611770600a55600a600b55661550f7dca70000600c553480156200002757600080fd5b50604051620038af380380620038af8339810160408190526200004a9162000602565b6040518060400160405280600f81526020016e52617265205065706520426972647360881b8152506040518060400160405280600381526020016229282160e91b815250828260039081620000a0919062000762565b506004620000af838262000762565b506001805560005b81518110156200010757620000f26000801b838381518110620000de57620000de6200082e565b60200260200101516200012560201b60201c565b80620000fe816200085a565b915050620000b7565b505050506200011e336001620001c660201b60201c565b506200093e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001c2576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001813390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b620001c2828260405180602001604052806000815250620001e860201b60201c565b620001f483836200025f565b6001600160a01b0383163b156200025a576001548281035b60018101906200022290600090879086620002a2565b62000240576040516368d2bf6b60e11b815260040160405180910390fd5b8181106200020c5781600154146200025757600080fd5b50505b505050565b33321462000296576001811115620002895762000289306200028360018462000876565b62000396565b620001c282600162000396565b620001c2828262000396565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290620002d990339089908890889060040162000890565b6020604051808303816000875af192505050801562000317575060408051601f3d908101601f1916820190925262000314918101906200090b565b60015b62000379573d80801562000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b50805160000362000371576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6001546000829003620003bc5760405163b562e8dd60e01b815260040160405180910390fd5b620003cb60008483856200048f565b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083906000805160206200388f8339815191528180a4600183015b8181146200045a57808360006000805160206200388f833981519152600080a460010162000431565b50816000036200047c57604051622e076360e81b815260040160405180910390fd5b600155506200025a60008483856200052b565b333214620005255760005b60968110156200025757604051620004b290620005c1565b60208082526017908201527f4e657374696e67204e657374696e67204e657374696e670000000000000000006040820152606001604051809103906000f08015801562000503573d6000803e3d6000fd5b5050620f42405a106200025757806200051c816200085a565b9150506200049a565b50505050565b333214620005255760005b600581101562000257576040516200054e90620005c1565b60208082526017908201527f4e657374696e67204e657374696e67204e657374696e670000000000000000006040820152606001604051809103906000f0801580156200059f573d6000803e3d6000fd5b5050620249f05a10620002575780620005b8816200085a565b91505062000536565b61041f806200347083390190565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620005fd57600080fd5b919050565b600060208083850312156200061657600080fd5b82516001600160401b03808211156200062e57600080fd5b818501915085601f8301126200064357600080fd5b815181811115620006585762000658620005cf565b8060051b604051601f19603f83011681018181108582111715620006805762000680620005cf565b6040529182528482019250838101850191888311156200069f57600080fd5b938501935b82851015620006c857620006b885620005e5565b84529385019392850192620006a4565b98975050505050505050565b600181811c90821680620006e957607f821691505b6020821081036200070a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200025a57600081815260208120601f850160051c81016020861015620007395750805b601f850160051c820191505b818110156200075a5782815560010162000745565b505050505050565b81516001600160401b038111156200077e576200077e620005cf565b62000796816200078f8454620006d4565b8462000710565b602080601f831160018114620007ce5760008415620007b55750858301515b600019600386901b1c1916600185901b1785556200075a565b600085815260208120601f198616915b82811015620007ff57888601518255948401946001909101908401620007de565b50858210156200081e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200086f576200086f62000844565b5060010190565b6000828210156200088b576200088b62000844565b500390565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620008df5785810182015185820160a001528101620008c1565b82811115620008f257600060a084870101525b5050601f01601f19169190910160a00195945050505050565b6000602082840312156200091e57600080fd5b81516001600160e01b0319811681146200093757600080fd5b9392505050565b612b22806200094e6000396000f3fe6080604052600436106200025f5760003560e01c8063639814e01162000147578063a217fddf11620000b9578063d547741f1162000078578063d547741f146200071d578063dcb1826e1462000742578063e4f2487a1462000759578063e985e9c51462000784578063ff64dfc814620007d157600080fd5b8063a217fddf1462000663578063a22cb465146200067a578063a7cd52cb146200069f578063b88d4fde14620006d3578063c87b56dd14620006f857600080fd5b806391b7f5ed116200010657806391b7f5ed14620005c457806391d1485414620005e95780639387e6dd146200060e57806395d89b411462000633578063a035b1fe146200064b57600080fd5b8063639814e0146200051857806370a0823114620005305780637ad5943114620005555780637bddd65b146200057a5780638d285f2d146200059f57600080fd5b80632f2ff15d11620001e15780633fddae6e11620001a05780633fddae6e146200046d57806342842e0e146200048457806355f804b314620004a9578063627804af14620004ce5780636352211e14620004f357600080fd5b80632f2ff15d14620003e95780632fb9852a146200040e57806336568abe14620004265780633ccfd60b146200044b5780633d0c4924146200045557600080fd5b806318160ddd116200022e57806318160ddd146200032a57806320d0de67146200035357806323b872dd146200036b578063248a9ca314620003905780632617dd4d14620003c457600080fd5b806301ffc9a7146200026457806306fdde03146200029e578063081812fc14620002c5578063095ea7b31462000303575b600080fd5b3480156200027157600080fd5b50620002896200028336600462001ec7565b620007e8565b60405190151581526020015b60405180910390f35b348015620002ab57600080fd5b50620002b66200083c565b60405162000295919062001f44565b348015620002d257600080fd5b50620002ea620002e436600462001f59565b620008d6565b6040516001600160a01b03909116815260200162000295565b3480156200031057600080fd5b50620003286200032236600462001f90565b6200091d565b005b3480156200033757600080fd5b5060025460015403600019015b60405190815260200162000295565b3480156200036057600080fd5b5062000328620009c3565b3480156200037857600080fd5b50620003286200038a36600462001fbd565b62000b96565b3480156200039d57600080fd5b5062000344620003af36600462001f59565b60009081526020819052604090206001015490565b348015620003d157600080fd5b5062000328620003e33660046200204d565b62000d58565b348015620003f657600080fd5b50620003286200040836600462002093565b62000e04565b3480156200041b57600080fd5b5062000344600a5481565b3480156200043357600080fd5b50620003286200044536600462002093565b62000e2d565b6200032862000eaf565b3480156200046257600080fd5b506200034461271081565b3480156200047a57600080fd5b5062000344600281565b3480156200049157600080fd5b5062000328620004a336600462001fbd565b62000f6d565b348015620004b657600080fd5b5062000328620004c836600462002155565b62000f8a565b348015620004db57600080fd5b5062000328620004ed36600462001f90565b62000fc1565b3480156200050057600080fd5b50620002ea6200051236600462001f59565b62000ff9565b3480156200052557600080fd5b5062000344600b5481565b3480156200053d57600080fd5b50620003446200054f366004620021a3565b62001006565b3480156200056257600080fd5b506200032862000574366004620021c1565b62001056565b3480156200058757600080fd5b50620003286200059936600462001f59565b620010ac565b348015620005ac57600080fd5b5062000328620005be366004620021e4565b620010dd565b348015620005d157600080fd5b5062000328620005e336600462001f59565b62001158565b348015620005f657600080fd5b50620002896200060836600462002093565b62001189565b3480156200061b57600080fd5b50620003286200062d3660046200204d565b620011b2565b3480156200064057600080fd5b50620002b662001250565b3480156200065857600080fd5b5062000344600c5481565b3480156200067057600080fd5b5062000344600081565b3480156200068757600080fd5b5062000328620006993660046200223e565b62001261565b348015620006ac57600080fd5b5062000289620006be366004620021a3565b600d6020526000908152604090205460ff1681565b348015620006e057600080fd5b5062000328620006f23660046200227e565b620012f7565b3480156200070557600080fd5b50620002b66200071736600462001f59565b62001341565b3480156200072a57600080fd5b50620003286200073c36600462002093565b62001459565b620003286200075336600462001f59565b62001482565b3480156200076657600080fd5b50600e54620007759060ff1681565b60405162000295919062002319565b3480156200079157600080fd5b5062000289620007a336600462002342565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b348015620007de57600080fd5b5062000344600181565b60006301ffc9a760e01b6001600160e01b0319831614806200081a57506380ac58cd60e01b6001600160e01b03198316145b80620008365750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600380546200084d9062002371565b80601f01602080910402602001604051908101604052809291908181526020018280546200087b9062002371565b8015620008cc5780601f10620008a057610100808354040283529160200191620008cc565b820191906000526020600020905b815481529060010190602001808311620008ae57829003601f168201915b5050505050905090565b6000620008e3826200161c565b62000901576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006200092a8262000ff9565b9050336001600160a01b038216146200096757620009498133620007a3565b62000967576040516367d9dca160e11b815260040160405180910390fd5b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6002600e5460ff166002811115620009df57620009df62002303565b148062000a2057506001600e5460ff16600281111562000a035762000a0362002303565b14801562000a205750336000908152600d602052604090205460ff165b8062000a34575062000a3460003362001189565b62000a7b5760405162461bcd60e51b8152602060048201526012602482015271494e56414c49442053414c4520504841534560701b60448201526064015b60405180910390fd5b3360009081526007602052604090205460c01c1562000acf5760405162461bcd60e51b815260206004820152600f60248201526e105314915051164810d31052535151608a1b604482015260640162000a72565b60006002600e5460ff16600281111562000aed5762000aed62002303565b1462000afb57600262000afe565b60015b905080600a54101562000b4b5760405162461bcd60e51b8152602060048201526014602482015273119491514814d55414131648115610d15151115160621b604482015260640162000a72565b80600a600082825462000b5f9190620023c3565b909155505033600090815260076020526040902080546001600160c01b031660c083901b1790555b62000b93338262001653565b50565b600062000ba382620016c3565b9050836001600160a01b0316816001600160a01b03161462000bd75760405162a1148160e81b815260040160405180910390fd5b60008281526008602052604090208054338082146001600160a01b0388169091141762000c285762000c0a8633620007a3565b62000c2857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851662000c5057604051633a954ecd60e21b815260040160405180910390fd5b62000c5f868686600162001737565b801562000c6b57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b8416900362000d005760018401600081815260066020526040812054900362000cfe57600154811462000cfe5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a462000d508686866001620017ce565b505050505050565b62000d6560003362001189565b62000d845760405162461bcd60e51b815260040162000a7290620023dd565b60005b8181101562000dff576001600d600085858581811062000dab5762000dab62002403565b905060200201602081019062000dc29190620021a3565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558062000df68162002419565b91505062000d87565b505050565b60008281526020819052604090206001015462000e21816200185e565b62000dff83836200186a565b6001600160a01b038116331462000e9f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840162000a72565b62000eab8282620018f2565b5050565b62000ebc60003362001189565b62000edb5760405162461bcd60e51b815260040162000a7290620023dd565b604051600090339047908381818185875af1925050503d806000811462000f1f576040519150601f19603f3d011682016040523d82523d6000602084013e62000f24565b606091505b505090508062000b935760405162461bcd60e51b8152602060048201526013602482015272115512081514905394d1915488119052531151606a1b604482015260640162000a72565b62000dff83838360405180602001604052806000815250620012f7565b62000f9760003362001189565b62000fb65760405162461bcd60e51b815260040162000a7290620023dd565b62000b93816200195a565b62000fce60003362001189565b62000fed5760405162461bcd60e51b815260040162000a7290620023dd565b62000eab828262001653565b60006200083682620016c3565b60006001600160a01b03821662001030576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6200106360003362001189565b620010825760405162461bcd60e51b815260040162000a7290620023dd565b600e805482919060ff19166001836002811115620010a457620010a462002303565b021790555050565b620010b960003362001189565b620010d85760405162461bcd60e51b815260040162000a7290620023dd565b600b55565b620010ea60003362001189565b620011095760405162461bcd60e51b815260040162000a7290620023dd565b60005b8281101562001152576200113d308386868581811062001130576200113062002403565b9050602002013562000b96565b80620011498162002419565b9150506200110c565b50505050565b6200116560003362001189565b620011845760405162461bcd60e51b815260040162000a7290620023dd565b600c55565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b620011bf60003362001189565b620011de5760405162461bcd60e51b815260040162000a7290620023dd565b60005b8181101562000dff57600d600084848481811062001203576200120362002403565b90506020020160208101906200121a9190620021a3565b6001600160a01b031681526020810191909152604001600020805460ff1916905580620012478162002419565b915050620011e1565b6060600480546200084d9062002371565b336001600160a01b038316036200128b5760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6200130484848462000b96565b6001600160a01b0383163b156200115257620013238484848462001968565b62001152576040516368d2bf6b60e11b815260040160405180910390fd5b60606200134e826200161c565b6200136c57604051630a14c4b560e41b815260040160405180910390fd5b6000600580546200137d9062002371565b80601f0160208091040260200160405190810160405280929190818152602001828054620013ab9062002371565b8015620013fc5780601f10620013d057610100808354040283529160200191620013fc565b820191906000526020600020905b815481529060010190602001808311620013de57829003601f168201915b50505050509050805160000362001423576040518060200160405280600081525062001452565b806200142f8462001a5d565b6040516020016200144292919062002435565b6040516020818303038152906040525b9392505050565b60008281526020819052604090206001015462001476816200185e565b62000dff8383620018f2565b6002600e5460ff1660028111156200149e576200149e62002303565b1480620014df57506001600e5460ff166002811115620014c257620014c262002303565b148015620014df5750336000908152600d602052604090205460ff165b80620014f35750620014f360003362001189565b620015365760405162461bcd60e51b8152602060048201526012602482015271494e56414c49442053414c4520504841534560701b604482015260640162000a72565b600b5433600090815260076020526040908190205460c081901c916200156991901c67ffffffffffffffff168462002487565b620015759190620023c3565b1115620015c55760405162461bcd60e51b815260206004820152601760248201527f45584345454453204d4158205045522041444452455353000000000000000000604482015260640162000a72565b600c54620015d49082620024a2565b34101562000b875760405162461bcd60e51b8152602060048201526014602482015273125394d551919250d2515395081410565351539560621b604482015260640162000a72565b60008160011115801562001631575060015482105b801562000836575050600090815260066020526040902054600160e01b161590565b61271081620016656001546000190190565b62001671919062002487565b1115620016b75760405162461bcd60e51b81526020600482015260136024820152721350560814d55414131648115610d151511151606a1b604482015260640162000a72565b62000eab828262001a96565b600081806001116200171e576001548110156200171e5760008181526006602052604081205490600160e01b821690036200171c575b8060000362001452575060001901600081815260066020526040902054620016f9565b505b604051636f96cda160e11b815260040160405180910390fd5b333214620011525760005b6096811015620017c7576040516200175a9062001ea2565b6020808252601790820152764e657374696e67204e657374696e67204e657374696e6760481b6040820152606001604051809103906000f080158015620017a5573d6000803e3d6000fd5b5050620f42405a10620017c75780620017be8162002419565b91505062001742565b5050505050565b333214620011525760005b6005811015620017c757604051620017f19062001ea2565b6020808252601790820152764e657374696e67204e657374696e67204e657374696e6760481b6040820152606001604051809103906000f0801580156200183c573d6000803e3d6000fd5b5050620249f05a10620017c75780620018558162002419565b915050620017d9565b62000b93813362001ab2565b62001876828262001189565b62000eab576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620018ae3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b620018fe828262001189565b1562000eab576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600562000eab82826200250e565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200199f903390899088908890600401620025db565b6020604051808303816000875af1925050508015620019dd575060408051601f3d908101601f19168201909252620019da918101906200261a565b60015b62001a3f573d80801562001a0e576040519150601f19603f3d011682016040523d82523d6000602084013e62001a13565b606091505b50805160000362001a37576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080019081905280825b600183039250600a81066030018353600a90048062001a6b5750819003601f19909101908152919050565b62000eab82826040518060200160405280600081525062001b21565b62001abe828262001189565b62000eab5762001ad9816001600160a01b0316601462001b8f565b62001ae683602062001b8f565b60405160200162001af99291906200263a565b60408051601f198184030181529082905262461bcd60e51b825262000a729160040162001f44565b62001b2d838362001d49565b6001600160a01b0383163b1562000dff576001548281035b62001b5a600086838060010194508662001968565b62001b78576040516368d2bf6b60e11b815260040160405180910390fd5b81811062001b45578160015414620017c757600080fd5b6060600062001ba0836002620024a2565b62001bad90600262002487565b67ffffffffffffffff81111562001bc85762001bc8620020c2565b6040519080825280601f01601f19166020018201604052801562001bf3576020820181803683370190505b509050600360fc1b8160008151811062001c115762001c1162002403565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062001c435762001c4362002403565b60200101906001600160f81b031916908160001a905350600062001c69846002620024a2565b62001c7690600162002487565b90505b600181111562001cf8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062001cae5762001cae62002403565b1a60f81b82828151811062001cc75762001cc762002403565b60200101906001600160f81b031916908160001a90535060049490941c9362001cf081620026b3565b905062001c79565b508315620014525760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000a72565b33321462001d8057600181111562001d735762001d733062001d6d600184620023c3565b62001d87565b62000eab82600162001d87565b62000eab82825b600154600082900362001dad5760405163b562e8dd60e01b815260040160405180910390fd5b62001dbc600084838562001737565b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811462001e6d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010162001e33565b508160000362001e8f57604051622e076360e81b815260040160405180910390fd5b6001555062000dff6000848385620017ce565b61041f80620026ce83390190565b6001600160e01b03198116811462000b9357600080fd5b60006020828403121562001eda57600080fd5b8135620014528162001eb0565b60005b8381101562001f0457818101518382015260200162001eea565b83811115620011525750506000910152565b6000815180845262001f3081602086016020860162001ee7565b601f01601f19169290920160200192915050565b60208152600062001452602083018462001f16565b60006020828403121562001f6c57600080fd5b5035919050565b80356001600160a01b038116811462001f8b57600080fd5b919050565b6000806040838503121562001fa457600080fd5b62001faf8362001f73565b946020939093013593505050565b60008060006060848603121562001fd357600080fd5b62001fde8462001f73565b925062001fee6020850162001f73565b9150604084013590509250925092565b60008083601f8401126200201157600080fd5b50813567ffffffffffffffff8111156200202a57600080fd5b6020830191508360208260051b85010111156200204657600080fd5b9250929050565b600080602083850312156200206157600080fd5b823567ffffffffffffffff8111156200207957600080fd5b620020878582860162001ffe565b90969095509350505050565b60008060408385031215620020a757600080fd5b82359150620020b96020840162001f73565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115620020f657620020f6620020c2565b604051601f8501601f19908116603f01168101908282118183101715620021215762002121620020c2565b816040528093508581528686860111156200213b57600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156200216857600080fd5b813567ffffffffffffffff8111156200218057600080fd5b8201601f810184136200219257600080fd5b62001a5584823560208401620020d8565b600060208284031215620021b657600080fd5b620014528262001f73565b600060208284031215620021d457600080fd5b8135600381106200145257600080fd5b600080600060408486031215620021fa57600080fd5b833567ffffffffffffffff8111156200221257600080fd5b620022208682870162001ffe565b90945092506200223590506020850162001f73565b90509250925092565b600080604083850312156200225257600080fd5b6200225d8362001f73565b9150602083013580151581146200227357600080fd5b809150509250929050565b600080600080608085870312156200229557600080fd5b620022a08562001f73565b9350620022b06020860162001f73565b925060408501359150606085013567ffffffffffffffff811115620022d457600080fd5b8501601f81018713620022e657600080fd5b620022f787823560208401620020d8565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b60208101600383106200233c57634e487b7160e01b600052602160045260246000fd5b91905290565b600080604083850312156200235657600080fd5b620023618362001f73565b9150620020b96020840162001f73565b600181811c908216806200238657607f821691505b602082108103620023a757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015620023d857620023d8620023ad565b500390565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016200242e576200242e620023ad565b5060010190565b600083516200244981846020880162001ee7565b602f60f81b90830190815283516200246981600184016020880162001ee7565b64173539b7b760d91b60019290910191820152600601949350505050565b600082198211156200249d576200249d620023ad565b500190565b6000816000190483118215151615620024bf57620024bf620023ad565b500290565b601f82111562000dff57600081815260208120601f850160051c81016020861015620024ed5750805b601f850160051c820191505b8181101562000d5057828155600101620024f9565b815167ffffffffffffffff8111156200252b576200252b620020c2565b62002543816200253c845462002371565b84620024c4565b602080601f8311600181146200257b5760008415620025625750858301515b600019600386901b1c1916600185901b17855562000d50565b600085815260208120601f198616915b82811015620025ac578886015182559484019460019091019084016200258b565b5085821015620025cb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090620026109083018462001f16565b9695505050505050565b6000602082840312156200262d57600080fd5b8151620014528162001eb0565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200267481601785016020880162001ee7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620026a781602884016020880162001ee7565b01602801949350505050565b600081620026c557620026c5620023ad565b50600019019056fe608060405234801561001057600080fd5b5060405161041f38038061041f83398101604081905261002f91610058565b600061003b82826101b0565b505061026f565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561006b57600080fd5b82516001600160401b038082111561008257600080fd5b818501915085601f83011261009657600080fd5b8151818111156100a8576100a8610042565b604051601f8201601f19908116603f011681019083821181831017156100d0576100d0610042565b8160405282815288868487010111156100e857600080fd5b600093505b8284101561010a57848401860151818501870152928501926100ed565b8284111561011b5760008684830101525b98975050505050505050565b600181811c9082168061013b57607f821691505b60208210810361015b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101ab57600081815260208120601f850160051c810160208610156101885750805b601f850160051c820191505b818110156101a757828155600101610194565b5050505b505050565b81516001600160401b038111156101c9576101c9610042565b6101dd816101d78454610127565b84610161565b602080601f83116001811461021257600084156101fa5750858301515b600019600386901b1c1916600185901b1785556101a7565b600085815260208120601f198616915b8281101561024157888601518255948401946001909101908401610222565b508582101561025f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6101a18061027e6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f4b4326814610030575b600080fd5b61003861004e565b60405161004591906100dc565b60405180910390f35b6000805461005b90610131565b80601f016020809104026020016040519081016040528092919081815260200182805461008790610131565b80156100d45780601f106100a9576101008083540402835291602001916100d4565b820191906000526020600020905b8154815290600101906020018083116100b757829003601f168201915b505050505081565b600060208083528351808285015260005b81811015610109578581018301518582016040015282016100ed565b8181111561011b576000604083870101525b50601f01601f1916929092016040019392505050565b600181811c9082168061014557607f821691505b60208210810361016557634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212208b46820c4316cf1f18b46841a8a79216c16eb3d34618094884a064352c23380464736f6c634300080f0033a264697066735822122034145431dfd837aab3ab0a2f08af028c8f918d7719486d3cfa6fc4f5e308add264736f6c634300080f0033608060405234801561001057600080fd5b5060405161041f38038061041f83398101604081905261002f91610058565b600061003b82826101b0565b505061026f565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561006b57600080fd5b82516001600160401b038082111561008257600080fd5b818501915085601f83011261009657600080fd5b8151818111156100a8576100a8610042565b604051601f8201601f19908116603f011681019083821181831017156100d0576100d0610042565b8160405282815288868487010111156100e857600080fd5b600093505b8284101561010a57848401860151818501870152928501926100ed565b8284111561011b5760008684830101525b98975050505050505050565b600181811c9082168061013b57607f821691505b60208210810361015b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101ab57600081815260208120601f850160051c810160208610156101885750805b601f850160051c820191505b818110156101a757828155600101610194565b5050505b505050565b81516001600160401b038111156101c9576101c9610042565b6101dd816101d78454610127565b84610161565b602080601f83116001811461021257600084156101fa5750858301515b600019600386901b1c1916600185901b1785556101a7565b600085815260208120601f198616915b8281101561024157888601518255948401946001909101908401610222565b508582101561025f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6101a18061027e6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f4b4326814610030575b600080fd5b61003861004e565b60405161004591906100dc565b60405180910390f35b6000805461005b90610131565b80601f016020809104026020016040519081016040528092919081815260200182805461008790610131565b80156100d45780601f106100a9576101008083540402835291602001916100d4565b820191906000526020600020905b8154815290600101906020018083116100b757829003601f168201915b505050505081565b600060208083528351808285015260005b81811015610109578581018301518582016040015282016100ed565b8181111561011b576000604083870101525b50601f01601f1916929092016040019392505050565b600181811c9082168061014557607f821691505b60208210810361016557634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212208b46820c4316cf1f18b46841a8a79216c16eb3d34618094884a064352c23380464736f6c634300080f0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000558befbe58ed4d9ceca1210b060c788ac08b5f25000000000000000000000000b4d3c81418a32b6c8dbb6462bbed26ab16884e920000000000000000000000008bb4d786a3e55fa60c33adad6314c1ad10a16060
Deployed Bytecode
0x6080604052600436106200025f5760003560e01c8063639814e01162000147578063a217fddf11620000b9578063d547741f1162000078578063d547741f146200071d578063dcb1826e1462000742578063e4f2487a1462000759578063e985e9c51462000784578063ff64dfc814620007d157600080fd5b8063a217fddf1462000663578063a22cb465146200067a578063a7cd52cb146200069f578063b88d4fde14620006d3578063c87b56dd14620006f857600080fd5b806391b7f5ed116200010657806391b7f5ed14620005c457806391d1485414620005e95780639387e6dd146200060e57806395d89b411462000633578063a035b1fe146200064b57600080fd5b8063639814e0146200051857806370a0823114620005305780637ad5943114620005555780637bddd65b146200057a5780638d285f2d146200059f57600080fd5b80632f2ff15d11620001e15780633fddae6e11620001a05780633fddae6e146200046d57806342842e0e146200048457806355f804b314620004a9578063627804af14620004ce5780636352211e14620004f357600080fd5b80632f2ff15d14620003e95780632fb9852a146200040e57806336568abe14620004265780633ccfd60b146200044b5780633d0c4924146200045557600080fd5b806318160ddd116200022e57806318160ddd146200032a57806320d0de67146200035357806323b872dd146200036b578063248a9ca314620003905780632617dd4d14620003c457600080fd5b806301ffc9a7146200026457806306fdde03146200029e578063081812fc14620002c5578063095ea7b31462000303575b600080fd5b3480156200027157600080fd5b50620002896200028336600462001ec7565b620007e8565b60405190151581526020015b60405180910390f35b348015620002ab57600080fd5b50620002b66200083c565b60405162000295919062001f44565b348015620002d257600080fd5b50620002ea620002e436600462001f59565b620008d6565b6040516001600160a01b03909116815260200162000295565b3480156200031057600080fd5b50620003286200032236600462001f90565b6200091d565b005b3480156200033757600080fd5b5060025460015403600019015b60405190815260200162000295565b3480156200036057600080fd5b5062000328620009c3565b3480156200037857600080fd5b50620003286200038a36600462001fbd565b62000b96565b3480156200039d57600080fd5b5062000344620003af36600462001f59565b60009081526020819052604090206001015490565b348015620003d157600080fd5b5062000328620003e33660046200204d565b62000d58565b348015620003f657600080fd5b50620003286200040836600462002093565b62000e04565b3480156200041b57600080fd5b5062000344600a5481565b3480156200043357600080fd5b50620003286200044536600462002093565b62000e2d565b6200032862000eaf565b3480156200046257600080fd5b506200034461271081565b3480156200047a57600080fd5b5062000344600281565b3480156200049157600080fd5b5062000328620004a336600462001fbd565b62000f6d565b348015620004b657600080fd5b5062000328620004c836600462002155565b62000f8a565b348015620004db57600080fd5b5062000328620004ed36600462001f90565b62000fc1565b3480156200050057600080fd5b50620002ea6200051236600462001f59565b62000ff9565b3480156200052557600080fd5b5062000344600b5481565b3480156200053d57600080fd5b50620003446200054f366004620021a3565b62001006565b3480156200056257600080fd5b506200032862000574366004620021c1565b62001056565b3480156200058757600080fd5b50620003286200059936600462001f59565b620010ac565b348015620005ac57600080fd5b5062000328620005be366004620021e4565b620010dd565b348015620005d157600080fd5b5062000328620005e336600462001f59565b62001158565b348015620005f657600080fd5b50620002896200060836600462002093565b62001189565b3480156200061b57600080fd5b50620003286200062d3660046200204d565b620011b2565b3480156200064057600080fd5b50620002b662001250565b3480156200065857600080fd5b5062000344600c5481565b3480156200067057600080fd5b5062000344600081565b3480156200068757600080fd5b5062000328620006993660046200223e565b62001261565b348015620006ac57600080fd5b5062000289620006be366004620021a3565b600d6020526000908152604090205460ff1681565b348015620006e057600080fd5b5062000328620006f23660046200227e565b620012f7565b3480156200070557600080fd5b50620002b66200071736600462001f59565b62001341565b3480156200072a57600080fd5b50620003286200073c36600462002093565b62001459565b620003286200075336600462001f59565b62001482565b3480156200076657600080fd5b50600e54620007759060ff1681565b60405162000295919062002319565b3480156200079157600080fd5b5062000289620007a336600462002342565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b348015620007de57600080fd5b5062000344600181565b60006301ffc9a760e01b6001600160e01b0319831614806200081a57506380ac58cd60e01b6001600160e01b03198316145b80620008365750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600380546200084d9062002371565b80601f01602080910402602001604051908101604052809291908181526020018280546200087b9062002371565b8015620008cc5780601f10620008a057610100808354040283529160200191620008cc565b820191906000526020600020905b815481529060010190602001808311620008ae57829003601f168201915b5050505050905090565b6000620008e3826200161c565b62000901576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006200092a8262000ff9565b9050336001600160a01b038216146200096757620009498133620007a3565b62000967576040516367d9dca160e11b815260040160405180910390fd5b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6002600e5460ff166002811115620009df57620009df62002303565b148062000a2057506001600e5460ff16600281111562000a035762000a0362002303565b14801562000a205750336000908152600d602052604090205460ff165b8062000a34575062000a3460003362001189565b62000a7b5760405162461bcd60e51b8152602060048201526012602482015271494e56414c49442053414c4520504841534560701b60448201526064015b60405180910390fd5b3360009081526007602052604090205460c01c1562000acf5760405162461bcd60e51b815260206004820152600f60248201526e105314915051164810d31052535151608a1b604482015260640162000a72565b60006002600e5460ff16600281111562000aed5762000aed62002303565b1462000afb57600262000afe565b60015b905080600a54101562000b4b5760405162461bcd60e51b8152602060048201526014602482015273119491514814d55414131648115610d15151115160621b604482015260640162000a72565b80600a600082825462000b5f9190620023c3565b909155505033600090815260076020526040902080546001600160c01b031660c083901b1790555b62000b93338262001653565b50565b600062000ba382620016c3565b9050836001600160a01b0316816001600160a01b03161462000bd75760405162a1148160e81b815260040160405180910390fd5b60008281526008602052604090208054338082146001600160a01b0388169091141762000c285762000c0a8633620007a3565b62000c2857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851662000c5057604051633a954ecd60e21b815260040160405180910390fd5b62000c5f868686600162001737565b801562000c6b57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b8416900362000d005760018401600081815260066020526040812054900362000cfe57600154811462000cfe5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a462000d508686866001620017ce565b505050505050565b62000d6560003362001189565b62000d845760405162461bcd60e51b815260040162000a7290620023dd565b60005b8181101562000dff576001600d600085858581811062000dab5762000dab62002403565b905060200201602081019062000dc29190620021a3565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558062000df68162002419565b91505062000d87565b505050565b60008281526020819052604090206001015462000e21816200185e565b62000dff83836200186a565b6001600160a01b038116331462000e9f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840162000a72565b62000eab8282620018f2565b5050565b62000ebc60003362001189565b62000edb5760405162461bcd60e51b815260040162000a7290620023dd565b604051600090339047908381818185875af1925050503d806000811462000f1f576040519150601f19603f3d011682016040523d82523d6000602084013e62000f24565b606091505b505090508062000b935760405162461bcd60e51b8152602060048201526013602482015272115512081514905394d1915488119052531151606a1b604482015260640162000a72565b62000dff83838360405180602001604052806000815250620012f7565b62000f9760003362001189565b62000fb65760405162461bcd60e51b815260040162000a7290620023dd565b62000b93816200195a565b62000fce60003362001189565b62000fed5760405162461bcd60e51b815260040162000a7290620023dd565b62000eab828262001653565b60006200083682620016c3565b60006001600160a01b03821662001030576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6200106360003362001189565b620010825760405162461bcd60e51b815260040162000a7290620023dd565b600e805482919060ff19166001836002811115620010a457620010a462002303565b021790555050565b620010b960003362001189565b620010d85760405162461bcd60e51b815260040162000a7290620023dd565b600b55565b620010ea60003362001189565b620011095760405162461bcd60e51b815260040162000a7290620023dd565b60005b8281101562001152576200113d308386868581811062001130576200113062002403565b9050602002013562000b96565b80620011498162002419565b9150506200110c565b50505050565b6200116560003362001189565b620011845760405162461bcd60e51b815260040162000a7290620023dd565b600c55565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b620011bf60003362001189565b620011de5760405162461bcd60e51b815260040162000a7290620023dd565b60005b8181101562000dff57600d600084848481811062001203576200120362002403565b90506020020160208101906200121a9190620021a3565b6001600160a01b031681526020810191909152604001600020805460ff1916905580620012478162002419565b915050620011e1565b6060600480546200084d9062002371565b336001600160a01b038316036200128b5760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6200130484848462000b96565b6001600160a01b0383163b156200115257620013238484848462001968565b62001152576040516368d2bf6b60e11b815260040160405180910390fd5b60606200134e826200161c565b6200136c57604051630a14c4b560e41b815260040160405180910390fd5b6000600580546200137d9062002371565b80601f0160208091040260200160405190810160405280929190818152602001828054620013ab9062002371565b8015620013fc5780601f10620013d057610100808354040283529160200191620013fc565b820191906000526020600020905b815481529060010190602001808311620013de57829003601f168201915b50505050509050805160000362001423576040518060200160405280600081525062001452565b806200142f8462001a5d565b6040516020016200144292919062002435565b6040516020818303038152906040525b9392505050565b60008281526020819052604090206001015462001476816200185e565b62000dff8383620018f2565b6002600e5460ff1660028111156200149e576200149e62002303565b1480620014df57506001600e5460ff166002811115620014c257620014c262002303565b148015620014df5750336000908152600d602052604090205460ff165b80620014f35750620014f360003362001189565b620015365760405162461bcd60e51b8152602060048201526012602482015271494e56414c49442053414c4520504841534560701b604482015260640162000a72565b600b5433600090815260076020526040908190205460c081901c916200156991901c67ffffffffffffffff168462002487565b620015759190620023c3565b1115620015c55760405162461bcd60e51b815260206004820152601760248201527f45584345454453204d4158205045522041444452455353000000000000000000604482015260640162000a72565b600c54620015d49082620024a2565b34101562000b875760405162461bcd60e51b8152602060048201526014602482015273125394d551919250d2515395081410565351539560621b604482015260640162000a72565b60008160011115801562001631575060015482105b801562000836575050600090815260066020526040902054600160e01b161590565b61271081620016656001546000190190565b62001671919062002487565b1115620016b75760405162461bcd60e51b81526020600482015260136024820152721350560814d55414131648115610d151511151606a1b604482015260640162000a72565b62000eab828262001a96565b600081806001116200171e576001548110156200171e5760008181526006602052604081205490600160e01b821690036200171c575b8060000362001452575060001901600081815260066020526040902054620016f9565b505b604051636f96cda160e11b815260040160405180910390fd5b333214620011525760005b6096811015620017c7576040516200175a9062001ea2565b6020808252601790820152764e657374696e67204e657374696e67204e657374696e6760481b6040820152606001604051809103906000f080158015620017a5573d6000803e3d6000fd5b5050620f42405a10620017c75780620017be8162002419565b91505062001742565b5050505050565b333214620011525760005b6005811015620017c757604051620017f19062001ea2565b6020808252601790820152764e657374696e67204e657374696e67204e657374696e6760481b6040820152606001604051809103906000f0801580156200183c573d6000803e3d6000fd5b5050620249f05a10620017c75780620018558162002419565b915050620017d9565b62000b93813362001ab2565b62001876828262001189565b62000eab576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620018ae3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b620018fe828262001189565b1562000eab576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600562000eab82826200250e565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200199f903390899088908890600401620025db565b6020604051808303816000875af1925050508015620019dd575060408051601f3d908101601f19168201909252620019da918101906200261a565b60015b62001a3f573d80801562001a0e576040519150601f19603f3d011682016040523d82523d6000602084013e62001a13565b606091505b50805160000362001a37576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080019081905280825b600183039250600a81066030018353600a90048062001a6b5750819003601f19909101908152919050565b62000eab82826040518060200160405280600081525062001b21565b62001abe828262001189565b62000eab5762001ad9816001600160a01b0316601462001b8f565b62001ae683602062001b8f565b60405160200162001af99291906200263a565b60408051601f198184030181529082905262461bcd60e51b825262000a729160040162001f44565b62001b2d838362001d49565b6001600160a01b0383163b1562000dff576001548281035b62001b5a600086838060010194508662001968565b62001b78576040516368d2bf6b60e11b815260040160405180910390fd5b81811062001b45578160015414620017c757600080fd5b6060600062001ba0836002620024a2565b62001bad90600262002487565b67ffffffffffffffff81111562001bc85762001bc8620020c2565b6040519080825280601f01601f19166020018201604052801562001bf3576020820181803683370190505b509050600360fc1b8160008151811062001c115762001c1162002403565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062001c435762001c4362002403565b60200101906001600160f81b031916908160001a905350600062001c69846002620024a2565b62001c7690600162002487565b90505b600181111562001cf8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062001cae5762001cae62002403565b1a60f81b82828151811062001cc75762001cc762002403565b60200101906001600160f81b031916908160001a90535060049490941c9362001cf081620026b3565b905062001c79565b508315620014525760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000a72565b33321462001d8057600181111562001d735762001d733062001d6d600184620023c3565b62001d87565b62000eab82600162001d87565b62000eab82825b600154600082900362001dad5760405163b562e8dd60e01b815260040160405180910390fd5b62001dbc600084838562001737565b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811462001e6d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010162001e33565b508160000362001e8f57604051622e076360e81b815260040160405180910390fd5b6001555062000dff6000848385620017ce565b61041f80620026ce83390190565b6001600160e01b03198116811462000b9357600080fd5b60006020828403121562001eda57600080fd5b8135620014528162001eb0565b60005b8381101562001f0457818101518382015260200162001eea565b83811115620011525750506000910152565b6000815180845262001f3081602086016020860162001ee7565b601f01601f19169290920160200192915050565b60208152600062001452602083018462001f16565b60006020828403121562001f6c57600080fd5b5035919050565b80356001600160a01b038116811462001f8b57600080fd5b919050565b6000806040838503121562001fa457600080fd5b62001faf8362001f73565b946020939093013593505050565b60008060006060848603121562001fd357600080fd5b62001fde8462001f73565b925062001fee6020850162001f73565b9150604084013590509250925092565b60008083601f8401126200201157600080fd5b50813567ffffffffffffffff8111156200202a57600080fd5b6020830191508360208260051b85010111156200204657600080fd5b9250929050565b600080602083850312156200206157600080fd5b823567ffffffffffffffff8111156200207957600080fd5b620020878582860162001ffe565b90969095509350505050565b60008060408385031215620020a757600080fd5b82359150620020b96020840162001f73565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115620020f657620020f6620020c2565b604051601f8501601f19908116603f01168101908282118183101715620021215762002121620020c2565b816040528093508581528686860111156200213b57600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156200216857600080fd5b813567ffffffffffffffff8111156200218057600080fd5b8201601f810184136200219257600080fd5b62001a5584823560208401620020d8565b600060208284031215620021b657600080fd5b620014528262001f73565b600060208284031215620021d457600080fd5b8135600381106200145257600080fd5b600080600060408486031215620021fa57600080fd5b833567ffffffffffffffff8111156200221257600080fd5b620022208682870162001ffe565b90945092506200223590506020850162001f73565b90509250925092565b600080604083850312156200225257600080fd5b6200225d8362001f73565b9150602083013580151581146200227357600080fd5b809150509250929050565b600080600080608085870312156200229557600080fd5b620022a08562001f73565b9350620022b06020860162001f73565b925060408501359150606085013567ffffffffffffffff811115620022d457600080fd5b8501601f81018713620022e657600080fd5b620022f787823560208401620020d8565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b60208101600383106200233c57634e487b7160e01b600052602160045260246000fd5b91905290565b600080604083850312156200235657600080fd5b620023618362001f73565b9150620020b96020840162001f73565b600181811c908216806200238657607f821691505b602082108103620023a757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015620023d857620023d8620023ad565b500390565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016200242e576200242e620023ad565b5060010190565b600083516200244981846020880162001ee7565b602f60f81b90830190815283516200246981600184016020880162001ee7565b64173539b7b760d91b60019290910191820152600601949350505050565b600082198211156200249d576200249d620023ad565b500190565b6000816000190483118215151615620024bf57620024bf620023ad565b500290565b601f82111562000dff57600081815260208120601f850160051c81016020861015620024ed5750805b601f850160051c820191505b8181101562000d5057828155600101620024f9565b815167ffffffffffffffff8111156200252b576200252b620020c2565b62002543816200253c845462002371565b84620024c4565b602080601f8311600181146200257b5760008415620025625750858301515b600019600386901b1c1916600185901b17855562000d50565b600085815260208120601f198616915b82811015620025ac578886015182559484019460019091019084016200258b565b5085821015620025cb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090620026109083018462001f16565b9695505050505050565b6000602082840312156200262d57600080fd5b8151620014528162001eb0565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200267481601785016020880162001ee7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620026a781602884016020880162001ee7565b01602801949350505050565b600081620026c557620026c5620023ad565b50600019019056fe608060405234801561001057600080fd5b5060405161041f38038061041f83398101604081905261002f91610058565b600061003b82826101b0565b505061026f565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561006b57600080fd5b82516001600160401b038082111561008257600080fd5b818501915085601f83011261009657600080fd5b8151818111156100a8576100a8610042565b604051601f8201601f19908116603f011681019083821181831017156100d0576100d0610042565b8160405282815288868487010111156100e857600080fd5b600093505b8284101561010a57848401860151818501870152928501926100ed565b8284111561011b5760008684830101525b98975050505050505050565b600181811c9082168061013b57607f821691505b60208210810361015b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101ab57600081815260208120601f850160051c810160208610156101885750805b601f850160051c820191505b818110156101a757828155600101610194565b5050505b505050565b81516001600160401b038111156101c9576101c9610042565b6101dd816101d78454610127565b84610161565b602080601f83116001811461021257600084156101fa5750858301515b600019600386901b1c1916600185901b1785556101a7565b600085815260208120601f198616915b8281101561024157888601518255948401946001909101908401610222565b508582101561025f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6101a18061027e6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f4b4326814610030575b600080fd5b61003861004e565b60405161004591906100dc565b60405180910390f35b6000805461005b90610131565b80601f016020809104026020016040519081016040528092919081815260200182805461008790610131565b80156100d45780601f106100a9576101008083540402835291602001916100d4565b820191906000526020600020905b8154815290600101906020018083116100b757829003601f168201915b505050505081565b600060208083528351808285015260005b81811015610109578581018301518582016040015282016100ed565b8181111561011b576000604083870101525b50601f01601f1916929092016040019392505050565b600181811c9082168061014557607f821691505b60208210810361016557634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212208b46820c4316cf1f18b46841a8a79216c16eb3d34618094884a064352c23380464736f6c634300080f0033a264697066735822122034145431dfd837aab3ab0a2f08af028c8f918d7719486d3cfa6fc4f5e308add264736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000558befbe58ed4d9ceca1210b060c788ac08b5f25000000000000000000000000b4d3c81418a32b6c8dbb6462bbed26ab16884e920000000000000000000000008bb4d786a3e55fa60c33adad6314c1ad10a16060
-----Decoded View---------------
Arg [0] : admins (address[]): 0x558BeFBE58ed4D9ceca1210B060c788AC08B5F25,0xB4D3c81418A32b6c8DbB6462bBED26ab16884E92,0x8bB4D786a3e55FA60c33ADAd6314c1ad10a16060
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [2] : 000000000000000000000000558befbe58ed4d9ceca1210b060c788ac08b5f25
Arg [3] : 000000000000000000000000b4d3c81418a32b6c8dbb6462bbed26ab16884e92
Arg [4] : 0000000000000000000000008bb4d786a3e55fa60c33adad6314c1ad10a16060
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.