Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
0 ADIGT
Holders
0
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 ADIGTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
GoldenTicket
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; contract GoldenTicket is ERC721AQueryable, ERC2981, Ownable, Pausable, DefaultOperatorFilterer { string private _name; string private _symbol; string public baseUri; mapping(uint256 => bool) private lockedTokens; mapping(address => bool) public permittedOperators; constructor( string memory __name, string memory __symbol, string memory _baseUri, address recipient, uint96 value ) ERC721A(_name, _symbol) { _name = __name; _symbol = __symbol; baseUri = _baseUri; _setDefaultRoyalty(recipient, value); } /// @notice The name of the ERC721 token. function name() public view override(ERC721A, IERC721A) returns (string memory) { return _name; } /// @notice The symbol of the ERC721 token. function symbol() public view override(ERC721A, IERC721A) returns (string memory) { return _symbol; } /// @notice Sets the name and symbol of the ERC721 token. /// @param newName The new name for the token. /// @param newSymbol The new symbol for the token. function setNameAndSymbol( string calldata newName, string calldata newSymbol ) external onlyOwner { _name = newName; _symbol = newSymbol; } /// @notice The token base URI. function _baseURI() internal view virtual override returns (string memory) { return baseUri; } /// @notice Sets the base URI for the token metadata. /// @param _baseUri The new base URI for the token metadata. function setBaseUri(string calldata _baseUri) public onlyOwner { baseUri = _baseUri; } /// @notice Pauses the contract, preventing token transfers. function pause() public onlyOwner { _pause(); } /// @notice Unpauses the contract, allowing token transfers. function unpause() public onlyOwner { _unpause(); } /// @notice Mints multiple tokens and assigns them to the specified addresses. /// @param to An array of addresses to which tokens will be minted. /// @param value An array of values representing the number of tokens to mint for each address. function mintMany( address[] calldata to, uint256[] calldata value ) external onlyOwner { require(to.length == value.length, "Mismatched lengths"); for (uint256 i = 0; i < to.length; i++) { _mint(to[i], value[i]); } } /// @notice Sets the royalty fee for the specified recipient. /// @param recipient The address of the royalty recipient. /// @param value The value of the royalty fee. function setRoyalties(address recipient, uint96 value) public onlyOwner { _setDefaultRoyalty(recipient, value); } /// @notice Locks the specified tokens, preventing them from being transferred. /// @param tokenIds An array of token IDs to be locked. function lockTokens(uint256[] memory tokenIds) public { require( permittedOperators[msg.sender] || msg.sender == owner(), "Not an allowed operator" ); for (uint256 i = 0; i < tokenIds.length; i++) { require(!lockedTokens[tokenIds[i]], "Token is already locked"); lockedTokens[tokenIds[i]] = true; } } /// @notice Admin function to unlock the specified golden tickets, allowing them to be transferred. /// @param tokenIds An array of token IDs to be unlocked. function unlockTokens(uint256[] memory tokenIds) public { require( permittedOperators[msg.sender] || msg.sender == owner(), "Not an allowed operator" ); for (uint256 i = 0; i < tokenIds.length; i++) { require(lockedTokens[tokenIds[i]], "Token is already unlocked"); lockedTokens[tokenIds[i]] = false; } } /// @notice Admin function to burn and redeem the golden ticket. /// @param tokenIds An array of locked token IDs to be burned. function burnLockedTokens(uint256[] memory tokenIds) public { require( permittedOperators[msg.sender] || msg.sender == owner(), "Not an allowed operator" ); for (uint256 i = 0; i < tokenIds.length; i++) { require( lockedTokens[tokenIds[i]], "Token must be locked before burning" ); _burn(tokenIds[i]); } } /// @notice Adds multiple addresses as permitted operators. /// @param operators An array of addresses to be added as permitted operators. function addPermittedOperators( address[] memory operators ) public onlyOwner { for (uint256 i = 0; i < operators.length; i++) { if (!permittedOperators[operators[i]]) { permittedOperators[operators[i]] = true; } } } /// @notice Removes multiple addresses from the permitted operators list. /// @param operators An array of addresses to be removed from the permitted operators list. function removePermittedOperators( address[] memory operators ) public onlyOwner { for (uint256 i = 0; i < operators.length; i++) { permittedOperators[operators[i]] = false; } } /// @notice Retrieves the lock statuses of the specified tokens. /// @param tokenIds An array of token IDs to check the lock status. /// @return An array of boolean values representing the lock statuses of the tokens. function getTokenLockStatuses( uint256[] memory tokenIds ) public view returns (bool[] memory) { bool[] memory lockStatuses = new bool[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { lockStatuses[i] = lockedTokens[tokenIds[i]]; } return lockStatuses; } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { for (uint256 i = startTokenId; i < startTokenId + quantity; i++) { if ( from != address(0) && from != owner() && !permittedOperators[from] ) { require( !lockedTokens[i], "Token is locked and cannot be transferred" ); } if (lockedTokens[i]) { require( msg.sender == owner() || permittedOperators[msg.sender], "Not an allowed operator" ); } } super._beforeTokenTransfers(from, to, startTokenId, quantity); } function setApprovalForAll( address operator, bool approved ) public override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) whenNotPaused { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) whenNotPaused { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) whenNotPaused { super.safeTransferFrom(from, to, tokenId, data); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, IERC721A, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"__name","type":"string"},{"internalType":"string","name":"__symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"addPermittedOperators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burnLockedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getTokenLockStatuses","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"lockTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"value","type":"uint256[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"permittedOperators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"removePermittedOperators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newName","type":"string"},{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setNameAndSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"name":"setRoyalties","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unlockTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040908082523462000ada57600062003acd803803809162000024828662000adf565b843982019060a08383031262000ad75782516001600160401b03811162000ad357826200005391850162000b03565b60208401519091906001600160401b03811162000ad357836200007891860162000b03565b848601519093906001600160401b03811162000acf57906200009c91860162000b03565b60608501516001600160a01b038116959192919086900362000ad35760800151936001600160601b0385169384860362000acf578751600b548185620000e28362000b7a565b808352926001811690811562000aae575060011462000a5d575b6200010a9250038262000adf565b8851908482600c54916200011e8362000b7a565b808352926001811690811562000a3c5750600114620009eb575b620001469250038362000adf565b8051906001600160401b038211620009d75781906200016760025462000b7a565b601f811162000975575b50602090601f8311600114620008f9578792620008ed575b50508160011b916000199060031b1c1916176002555b8051906001600160401b038211620008d9578190620001c060035462000b7a565b601f811162000866575b50602090601f8311600114620007d9578692620007cd575b50508160011b916000199060031b1c1916176003555b828055600a54336001600160a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08680a36001600160a81b0319163360ff60a01b191617600a556daaeb6d7670e522a718067333cd4e803b62000757575b508051906001600160401b038211620007435781906200027c600b5462000b7a565b601f8111620006e1575b50602090601f83116001146200066a5785926200065e575b50508160011b916000199060031b1c191617600b555b8051906001600160401b0382116200064a578190620002d5600c5462000b7a565b601f8111620005e8575b50602090601f83116001146200057157849262000565575b50508160011b916000199060031b1c191617600c555b8151916001600160401b03831162000551579082916200032f600d5462000b7a565b601f8111620004ed575b50602091601f84116001146200047657926200046a575b50508160011b916000199060031b1c191617600d555b612710811162000413578215620003cf578351808501906001600160401b03821181831017620003b9579085528381526020015260a01b6001600160a01b0319161760085551612e95908162000bb88239f35b634e487b7160e01b600052604160045260246000fd5b835162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b835162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b01519050388062000350565b600d815260008051602062003a8d8339815191529350601f198516905b818110620004d45750908460019594939210620004ba575b505050811b01600d5562000366565b015160001960f88460031b161c19169055388080620004ab565b9293602060018192878601518155019501930162000493565b600d83529192509060008051602062003a8d833981519152601f850160051c8101916020861062000546575b90601f86959493920160051c01905b81811062000537575062000339565b83815585945060010162000528565b909150819062000519565b634e487b7160e01b82526041600452602482fd5b015190503880620002f7565b600c855260008051602062003a6d8339815191529250601f198416855b818110620005cf5750908460019594939210620005b5575b505050811b01600c556200030d565b015160001960f88460031b161c19169055388080620005a6565b929360206001819287860151815501950193016200058e565b600c855290915060008051602062003a6d833981519152601f840160051c810191602085106200063f575b90601f859493920160051c01905b818110620006305750620002df565b85815584935060010162000621565b909150819062000613565b634e487b7160e01b83526041600452602483fd5b0151905038806200029e565b600b865260008051602062003aad8339815191529250601f198416865b818110620006c85750908460019594939210620006ae575b505050811b01600b55620002b4565b015160001960f88460031b161c191690553880806200069f565b9293602060018192878601518155019501930162000687565b600b865290915060008051602062003aad833981519152601f840160051c8101916020851062000738575b90601f859493920160051c01905b81811062000729575062000286565b8681558493506001016200071a565b90915081906200070c565b634e487b7160e01b84526041600452602484fd5b803b15620007c95783809160448b5180948193633e9f1edf60e11b8352306004840152733cc6cdda760b79bafa08df41ecfa224f810dceb660248401525af18015620007bf57156200025a579092906001600160401b0381116200055157885291386200025a565b89513d86823e3d90fd5b8380fd5b015190503880620001e2565b600387528693507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b91905b601f19841685106200084a576001945083601f1981161062000830575b505050811b01600355620001f8565b015160001960f88460031b161c1916905538808062000821565b8181015183556020948501946001909301929091019062000804565b600387529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c81019160208510620008ce575b90601f859493920160051c01905b818110620008bf5750620001ca565b878155849350600101620008b0565b9091508190620008a2565b634e487b7160e01b85526041600452602485fd5b01519050388062000189565b6002885287935060008051602062003a4d83398151915291905b601f198416851062000959576001945083601f198116106200093f575b505050811b016002556200019f565b015160001960f88460031b161c1916905538808062000930565b8181015183556020948501946001909301929091019062000913565b6002885290915060008051602062003a4d833981519152601f840160051c81019160208510620009cc575b90601f859493920160051c01905b818110620009bd575062000171565b888155849350600101620009ae565b9091508190620009a0565b634e487b7160e01b86526041600452602486fd5b50600c875290869060008051602062003a6d8339815191525b81831062000a1f575050906020620001469282010162000138565b602091935080600191548385890101520191019091849262000a04565b602092506200014694915060ff191682840152151560051b82010162000138565b50600b865290859060008051602062003aad8339815191525b81831062000a915750509060206200010a92820101620000fc565b602091935080600191548385880101520191019091839262000a76565b602092506200010a94915060ff191682840152151560051b820101620000fc565b8280fd5b5080fd5b80fd5b600080fd5b601f909101601f19168101906001600160401b03821190821017620003b957604052565b919080601f8401121562000ada578251906001600160401b038211620003b9576040519160209162000b3f601f8301601f191684018562000adf565b81845282828701011162000ada5760005b81811062000b6657508260009394955001015290565b858101830151848201840152820162000b50565b90600182811c9216801562000bac575b602083101462000b9657565b634e487b7160e01b600052602260045260246000fd5b91607f169162000b8a56fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461027757806306fdde0314610272578063081812fc1461026d578063084b731a14610268578063095ea7b31461026357806317eb66c71461025e57806318160ddd1461025957806323b872dd146102545780632a55205a1461024f5780633f4ba83a1461024a5780634029a3ce1461024557806341f434341461024057806342842e0e1461023b5780635a446215146102365780635bbb2177146102315780635c5fd91c1461022c5780635c975abb146102275780636352211e1461022257806370a082311461021d578063715018a6146102185780638456cb59146102135780638462151c1461020e5780638da5cb5b1461020957806395d89b411461020457806399a2557a146101ff5780639abc8320146101fa5780639fefb43a146101f5578063a0bcfc7f146101f0578063a22cb465146101eb578063b835c92f146101e6578063b88d4fde146101e1578063c21b471b146101dc578063c23dc68f146101d7578063c87b56dd146101d2578063cbd5d403146101cd578063e985e9c5146101c8578063f15f32cb146101c35763f2fde38b146101be57600080fd5b611e78565b611e1f565b611db7565b611d1d565b611c50565b611bed565b611ae5565b611a5a565b6119ae565b6118d3565b6117af565b61171c565b6116ec565b6115ba565b611513565b6114ea565b61142c565b61138f565b611331565b611302565b6112d3565b6112ad565b61121b565b6110cd565b610f18565b610cdc565b610cb3565b610b14565b610a48565b6109b4565b6107cc565b61077d565b61073b565b610677565b610594565b61042a565b610345565b610293565b6001600160e01b031981160361028e57565b600080fd5b3461028e57602036600319011261028e5760206004356102b28161027c565b63ffffffff60e01b1663152a902d60e11b81149081156102d8575b506040519015158152f35b6301ffc9a760e01b149050386102cd565b60005b8381106102fc5750506000910152565b81810151838201526020016102ec565b90602091610325815180928185528580860191016102e9565b601f01601f1916010190565b90602061034292818152019061030c565b90565b3461028e57600080600319360112610427576040519080600b54610368816115f6565b808552916001918083169081156103fd57506001146103a2575b61039e85610392818703826104cf565b60405191829182610331565b0390f35b9250600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db95b8284106103e55750505081016020016103928261039e610382565b805460208587018101919091529093019281016103ca565b86955061039e9693506020925061039294915060ff191682840152151560051b8201019293610382565b80fd5b3461028e57602036600319011261028e57600435610447816126cf565b1561046c576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176104af57604052565b61047e565b602081019081106001600160401b038211176104af57604052565b90601f801991011681019081106001600160401b038211176104af57604052565b604051906104fd82610494565b565b6001600160401b0381116104af5760051b60200190565b60208060031983011261028e57600435916001600160401b03831161028e578060238401121561028e57826004013561054e816104ff565b9361055c60405195866104cf565b81855260248486019260051b82010192831161028e57602401905b828210610585575050505090565b81358152908301908301610577565b3461028e576105a236610516565b33600052600f6020526105bb604060002060ff90541690565b801561063b575b6105cb906122f6565b60005b8151811015610639578061061261060d6106096106026105f16106349688612342565b51600052600e602052604060002090565b5460ff1690565b1590565b612356565b61062f6106226105f18386612342565b805460ff19166001179055565b612270565b6105ce565b005b50600a546105cb9061065d906001600160a01b03165b6001600160a01b031690565b331490506105c2565b6001600160a01b0381160361028e57565b604036600319011261028e5760043561068f81610666565b60243561069b82612d89565b6001600160a01b03806106ad83612661565b1690813303610708575b600083815260066020526040812080546001600160a01b0319166001600160a01b0387161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b600082815260076020908152604080832033845290915290205460ff166106b7576040516367d9dca160e11b8152600490fd5b3461028e57602036600319011261028e5760043561075881610666565b60018060a01b0316600052600f602052602060ff604060002054166040519015158152f35b3461028e57600036600319011261028e5760206000546001549003604051908152f35b606090600319011261028e576004356107b881610666565b906024356107c581610666565b9060443590565b6107d5366107a0565b91906001600160a01b0380831691903383036109a6575b6107f4612229565b6107fd85612661565b918382841603610995576000868152600660205260409020805490926108326001600160a01b03881633908114908414171590565b610941575b821695861561092f5761089493610872926108528a84612764565b610925575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b8517176108bc866000526004602052604060002090565b558116156108db575b50600080516020612e40833981519152600080a4005b600184016108f3816000526004602052604060002090565b5415610900575b506108c5565b60005481146108fa5761091d906000526004602052604060002090565b5538806108fa565b6000905538610857565b604051633a954ecd60e21b8152600490fd5b61097e610609610602336109678b60018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b1561083757604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b6109af33612d89565b6107ec565b3461028e57604036600319011261028e5760243560043560005260096020526109e06040600020611fbe565b80519091906001600160a01b031615610a38575b6001600160601b0360208301511690818102918183041490151715610a33579051604080516001600160a01b0390921682526127109092046020820152f35b611fe3565b9050610a42611f98565b906109f4565b3461028e57600036600319011261028e57610a61611f40565b600a5460ff8160a01c1615610aa85760ff60a01b1916600a556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b9181601f8401121561028e578235916001600160401b03831161028e576020808501948460051b01011161028e57565b3461028e5760408060031936011261028e576004906001600160401b0390823582811161028e57610b489036908501610ae4565b91909260243590811161028e57610b629036908601610ae4565b9092610b6c611f40565b818103610c7b5790934260a01b919060005b828110610b8757005b610b92818484612295565b35610b9c81610666565b610ba7828989612295565b35600054918115610c6b57610bbc8284612887565b6001600160a01b0381166000908152600560205260409020805468010000000000000001840201905560008381526004602052604090206001600160a01b039091169160019182821460e11b89178417905583019281600080516020612e408339815191529180856000858180a4015b848103610c5b5750505015610c4c57600055610c4790612270565b610b7e565b8551622e076360e81b81528990fd5b808391856000858180a401610c2c565b875163b562e8dd60e01b81528b90fd5b825162461bcd60e51b815260208188015260126024820152714d69736d617463686564206c656e6774687360701b6044820152606490fd5b3461028e57600036600319011261028e5760206040516daaeb6d7670e522a718067333cd4e8152f35b610ce5366107a0565b336001600160a01b038085169182141594929085610edd575b610d06612229565b60405192610d13846104b4565b60009680888652610ecf575b610d27612229565b610ec1575b610d34612229565b610d3d83612661565b90808383160361099557600084815260066020526040902080549093909290610d756001600160a01b03891633908114908614171590565b610e84575b881692831561092f5785948a91610d91878b612764565b610e7c575b50506001600160a01b0387811660009081526005602090815260408083208054600019019055928b168252828220805460010190558682526004905220600160e11b904260a01b851782179055811615610e33575b50600080516020612e408339815191528880a4833b610e08578480f35b610e159361060993612987565b610e2157388080808480f35b6040516368d2bf6b60e11b8152600490fd5b60018401610e4b816000526004602052604060002090565b5415610e58575b50610deb565b89548114610e5257610e74906000526004602052604060002090565b553880610e52565b558838610d96565b610eaa610609610602336109678c60018060a01b03166000526007602052604060002090565b15610d7a57604051632ce44b5f60e11b8152600490fd5b610eca33612d89565b610d2c565b610ed833612d89565b610d1f565b610ee633612d89565b610cfe565b9181601f8401121561028e578235916001600160401b03831161028e576020838186019501011161028e57565b3461028e57604036600319011261028e576001600160401b0360043581811161028e57610f49903690600401610eeb565b9160243581811161028e57610f62903690600401610eeb565b929091610f6d611f40565b84116104af57610f8784610f82600b546115f6565b611ff9565b600090601f8511600114610fc857610639949160009183610fbd575b50508160011b916000199060031b1c191617600b5561214c565b013590503880610fa3565b600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991601f198616815b818110611037575091600193918761063998941061101d575b505050811b01600b5561214c565b0135600019600384901b60f8161c1916905538808061100f565b91936020600181928787013581550195019201610ff6565b6020908160408183019282815285518094520193019160005b828110611076575050505090565b90919293826080826110c1600194895162ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611068565b3461028e5760208060031936011261028e576004356001600160401b03811161028e576110fe903690600401610ae4565b611107816104ff565b9261111560405194856104cf565b818452601f19611124836104ff565b0160005b81811061117d5750505060005b81810361114a576040518061039e868261104f565b8061116161115b6001938587612295565b35612b63565b61116b8287612342565b526111768186612342565b5001611135565b8290611187612b2e565b82828901015201611128565b60208060031983011261028e57600435916001600160401b03831161028e578060238401121561028e5782600401356111cb816104ff565b936111d960405195866104cf565b81855260248486019260051b82010192831161028e57602401905b828210611202575050505090565b838091833561121081610666565b8152019101906111f4565b3461028e5761122936611193565b611231611f40565b60005b81518110156106395761127b906001600160a01b03806112548386612342565b5116600052600f60209080825260409160ff83600020541615611280575b50505050612270565b611234565b6112a49361128e8689612342565b511660005252600020600160ff19825416179055565b38808080611272565b3461028e57600036600319011261028e57602060ff600a5460a01c166040519015158152f35b3461028e57602036600319011261028e5760206001600160a01b036112f9600435612661565b16604051908152f35b3461028e57602036600319011261028e57602061132960043561132481610666565b61260f565b604051908152f35b3461028e576000806003193601126104275761134b611f40565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b3461028e57600036600319011261028e576113a8611f40565b6113b0612229565b600a805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b6020908160408183019282815285518094520193019160005b828110611418575050505090565b83518552938101939281019260010161140a565b3461028e57602036600319011261028e5760043561144981610666565b6000806114558361260f565b9161145f83612c0f565b93611468612b2e565b506001600160a01b0390811691835b85850361148c576040518061039e89826113f1565b61149581612bb1565b60408101516114e157516001600160a01b03168381166114d8575b5060019084848416146114c4575b01611477565b806114d2838801978a612342565b526114be565b915060016114b0565b506001906114be565b3461028e57600036600319011261028e57600a546040516001600160a01b039091168152602090f35b3461028e57600080600319360112610427576040519080600c54611536816115f6565b808552916001918083169081156103fd575060011461155f5761039e85610392818703826104cf565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b8284106115a25750505081016020016103928261039e610382565b80546020858701810191909152909301928101611587565b3461028e57606036600319011261028e5761039e6115ea6004356115dd81610666565b6044359060243590612c41565b604051918291826113f1565b90600182811c92168015611626575b602083101461161057565b634e487b7160e01b600052602260045260246000fd5b91607f1691611605565b60405190600082600d5491611644836115f6565b808352926001908181169081156116ca575060011461166b575b506104fd925003836104cf565b600d600090815291507fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8483106116af57506104fd93505081016020013861165e565b81935090816020925483858a01015201910190918592611696565b9050602092506104fd94915060ff191682840152151560051b8201013861165e565b3461028e57600036600319011261028e5761039e611708611630565b60405191829160208352602083019061030c565b3461028e5761172a36610516565b33600052600f60205260ff60406000205416801561178c575b61174c906122f6565b60005b8151811015610639578061177461176f6106026105f16117879587612342565b6123ee565b61062f6117818285612342565b51612a30565b61174f565b50600a5461174c906117a6906001600160a01b0316610651565b33149050611743565b3461028e5760208060031936011261028e576001600160401b0360043581811161028e576117e1903690600401610eeb565b916117ea611f40565b82116104af57611804826117ff600d546115f6565b61206a565b600092601f83116001146118425750918192600092611837575b5050600019600383901b1c191660019190911b17600d55005b01359050388061181e565b90601f19831693611875600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590565b9281905b8682106118b15750508360019510611897575b505050811b01600d55005b0135600019600384901b60f8161c1916905538808061188c565b80600184968294958701358155019501920190611879565b8015150361028e57565b3461028e57604036600319011261028e576004356118f081610666565b602435906118fd826118c9565b61190681612d89565b3360009081526007602090815260408083206001600160a01b038516845290915290209115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b6020908160408183019282815285518094520193019160005b828110611998575050505090565b835115158552938101939281019260010161198a565b3461028e576119bc36610516565b8051906119c8826104ff565b6040926119d7845192836104cf565b8082526119e6601f19916104ff565b016020903682840137600090815b8451811015611a325780611a0b611a2d9287612342565b518452600e835260ff8785205416611a238287612342565b9015159052612270565b6119f4565b85518061039e8682611971565b6001600160401b0381116104af57601f01601f191660200190565b608036600319011261028e57600435611a7281610666565b602435611a7e81610666565b606435916001600160401b03831161028e573660238401121561028e57826004013591611aaa83611a3f565b92611ab860405194856104cf565b808452366024828701011161028e5760208160009260246106399801838801378501015260443591612446565b3461028e57604036600319011261028e57600435611b0281610666565b602435906001600160601b03821680830361028e5761271090611b23611f40565b11611b955761063991611b6e90611b446001600160a01b03841615156122aa565b611b5e611b4f6104f0565b6001600160a01b039094168452565b6001600160601b03166020830152565b805160209091015160a01b6001600160a01b0319166001600160a01b039190911617600855565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b3461028e57602036600319011261028e576080611c0b600435612b63565b611c4e604051809262ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b3461028e57602036600319011261028e57600435611c6d816126cf565b15611d0b57611c7a611630565b805160009015611cf1575060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283611c9a5761039e9350611cdf92611ce5610392936080601f19948581019203018152604051958693602085019061264a565b9061264a565b039081018352826104cf565b60405161039e93509150611d04826104b4565b8152610392565b604051630a14c4b560e41b8152600490fd5b3461028e57611d2b36610516565b33600052600f60205260ff604060002054168015611d94575b611d4d906122f6565b60005b81518110156106395780611d75611d706106026105f1611d8f9587612342565b6123a2565b61062f611d856105f18386612342565b805460ff19169055565b611d50565b50600a54611d4d90611dae906001600160a01b0316610651565b33149050611d44565b3461028e57604036600319011261028e57602060ff611e13600435611ddb81610666565b60243590611de882610666565b60018060a01b03166000526007845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b3461028e57611e2d36611193565b611e35611f40565b60005b815181101561063957611e73906001600160a01b03611e578285612342565b5116600052600f602052604060002060ff198154169055612270565b611e38565b3461028e57602036600319011261028e57600435611e9581610666565b611e9d611f40565b6001600160a01b03908116908115611eec57600a54826001600160601b0360a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b600a546001600160a01b03163303611f5457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60405190611fa582610494565b6008546001600160a01b038116835260a01c6020830152565b90604051611fcb81610494565b91546001600160a01b038116835260a01c6020830152565b634e487b7160e01b600052601160045260246000fd5b601f8111612005575050565b600090600b82527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906020601f850160051c83019410612060575b601f0160051c01915b82811061205557505050565b818155600101612049565b9092508290612040565b601f8111612076575050565b600090600d82527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5906020601f850160051c830194106120d1575b601f0160051c01915b8281106120c657505050565b8181556001016120ba565b90925082906120b1565b601f81116120e7575050565b600090600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7906020601f850160051c83019410612142575b601f0160051c01915b82811061213757505050565b81815560010161212b565b9092508290612122565b91906001600160401b0381116104af576121708161216b600c546115f6565b6120db565b6000601f82116001146121aa5781929360009261219f575b50508160011b916000199060031b1c191617600c55565b013590503880612188565b600c600052601f198216937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c791805b86811061221157508360019596106121f7575b505050811b01600c55565b0135600019600384901b60f8161c191690553880806121ec565b909260206001819286860135815501940191016121d9565b60ff600a5460a01c1661223857565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b6000198114610a335760010190565b634e487b7160e01b600052603260045260246000fd5b91908110156122a55760051b0190565b61227f565b156122b157565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b156122fd57565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420616e20616c6c6f776564206f70657261746f720000000000000000006044820152606490fd5b80518210156122a55760209160051b010190565b1561235d57565b60405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479206c6f636b65640000000000000000006044820152606490fd5b156123a957565b60405162461bcd60e51b815260206004820152601960248201527f546f6b656e20697320616c726561647920756e6c6f636b6564000000000000006044820152606490fd5b156123f557565b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e206d757374206265206c6f636b6564206265666f7265206275726e604482015262696e6760e81b6064820152608490fd5b909290916001600160a01b03808416903382141580612601575b612468612229565b6125f3575b612475612229565b61247e83612661565b91808284160361099557600084815260066020526040902080549390926124b46001600160a01b03891633908114908714171590565b6125b6575b881692831561092f5785946124ce868a612764565b6125ac575b506001600160a01b0387811660009081526005602090815260408083208054600019019055928b168252828220805460010190558682526004905220600160e11b904260a01b851782179055811615612562575b50600080516020612e40833981519152600080a4833b612548575b50505050565b6125559361060993612987565b610e215738808080612542565b6001840161257a816000526004602052604060002090565b5415612587575b50612527565b6000548114612581576125a4906000526004602052604060002090565b553880612581565b60009055386124d3565b6125dc610609610602336109678c60018060a01b03166000526007602052604060002090565b156124b957604051632ce44b5f60e11b8152600490fd5b6125fc33612d89565b61246d565b61260a33612d89565b612460565b6001600160a01b031680156126385760005260056020526001600160401b036040600020541690565b6040516323d3ad8160e21b8152600490fd5b9061265d602092828151948592016102e9565b0190565b6000818154811061267f575b604051636f96cda160e11b8152600490fd5b81526004906020918083526040928383205494600160e01b8616156126a65750505061266d565b93929190935b85156126ba57505050505090565b600019018083528185528383205495506126ac565b600054811090816126de575090565b90506000526004602052600160e01b604060002054161590565b9060018201809211610a3357565b1561270d57565b60405162461bcd60e51b815260206004820152602960248201527f546f6b656e206973206c6f636b656420616e642063616e6e6f74206265207472604482015268185b9cd9995c9c995960ba1b6064820152608490fd5b815b61276f836126f8565b8110156128825761276f906127be906001600160a01b0384168015159081612862575b5080612837575b612810575b6127b561060282600052600e602052604060002090565b6127c557612270565b9050612766565b600a546127da906001600160a01b0316610651565b331480156127ec575b61062f906122f6565b50336000908152600f6020526040902061062f9061280990610602565b90506127e3565b61283261282d61060961060284600052600e602052604060002090565b612706565b61279e565b506001600160a01b0384166000908152600f6020526040902061285d9061060990610602565b612799565b600a5490915061287a906001600160a01b0316610651565b141538612792565b505050565b805b828201808311610a3357811015612882576128c29060ff806128b583600052600e602052604060002090565b54166128c7575b50612270565b612889565b6128e69060018060a01b03600a541633149081156128ec575b506122f6565b386128bc565b336000908152600f6020526040902054169050386128e0565b9081602091031261028e57516103428161027c565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526103429291019061030c565b6040513d6000823e3d90fd5b3d15612982573d9061296882611a3f565b9161297660405193846104cf565b82523d6000602084013e565b606090565b926020916129b0936000604051809681958294630a85bd0160e11b9a8b8552336004860161291a565b03926001600160a01b03165af160009181612a00575b506129f2576129d3612957565b805190816129ed576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b612a2291925060203d8111612a29575b612a1a81836104cf565b810190612905565b90386129c6565b503d612a10565b6000612a3b82612661565b600083815260066020526040902080546001600160a01b038316929190612a628685612764565b612b25575b506001600160a01b038216600090815260056020526040902080546fffffffffffffffffffffffffffffffff01905560008481526004602052604090204260a01b8317600360e01b179055600160e11b811615612adc575b50600080516020612e408339815191528280a46001805401600155565b60018401612af4816000526004602052604060002090565b5415612b01575b50612abf565b83548114612afb57612b1d906000526004602052604060002090565b553880612afb565b83905538612a67565b60405190608082018281106001600160401b038211176104af5760405260006060838281528260208201528260408201520152565b612b6b612b2e565b50612b74612b2e565b600054821015612bac5750612b8881612bb1565b6040810151612bac5750612ba761034291612ba1612b2e565b50612661565b612bcc565b905090565b612bb9612b2e565b5060005260046020526103426040600020545b90612bd5612b2e565b6001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b83161515604082015260e89290921c6060830152565b90612c19826104ff565b612c2660405191826104cf565b8281528092612c37601f19916104ff565b0190602036910137565b9082811015612d62576000918254808511612d5a575b50612c618161260f565b84831015612d5357828503818110612d4b575b505b612c7f81612c0f565b958115612d4357612c8f84612b63565b918594604093612ca461060986830151151590565b612d31575b505b8781141580612d27575b15612d1a57612cc381612bb1565b80850151612d1157516001600160a01b0390811680612d08575b509081600192871690881614612cf4575b01612cab565b80612d02838a01998c612342565b52612cee565b96506001612cdd565b50600190612cee565b5050959450505050815290565b5081871415612cb5565b516001600160a01b0316955038612ca9565b945050505050565b905038612c74565b5082612c76565b935038612c57565b604051631960ccad60e11b8152600490fd5b9081602091031261028e5751610342816118c9565b6daaeb6d7670e522a718067333cd4e803b612da2575050565b604051633185c44d60e21b81523060048201526001600160a01b038316602482015290602090829060449082905afa908115612e3a57600091612e0c575b5015612de95750565b604051633b79c77360e21b81526001600160a01b03919091166004820152602490fd5b612e2d915060203d8111612e33575b612e2581836104cf565b810190612d74565b38612de0565b503d612e1b565b61294b56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ba72a52321f69962a3f9ff8a0752e5e79eb99407db84ae95c4358cf2465f44d664736f6c63430008130033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acedf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c8900000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000001461646964617320476f6c64656e205469636b6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000541444947540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f626166796265696262727478646d6d77677a727a6364697171727a76796a7677726b6f356537707a7371746f35736a68776871666137647437636d2f0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461027757806306fdde0314610272578063081812fc1461026d578063084b731a14610268578063095ea7b31461026357806317eb66c71461025e57806318160ddd1461025957806323b872dd146102545780632a55205a1461024f5780633f4ba83a1461024a5780634029a3ce1461024557806341f434341461024057806342842e0e1461023b5780635a446215146102365780635bbb2177146102315780635c5fd91c1461022c5780635c975abb146102275780636352211e1461022257806370a082311461021d578063715018a6146102185780638456cb59146102135780638462151c1461020e5780638da5cb5b1461020957806395d89b411461020457806399a2557a146101ff5780639abc8320146101fa5780639fefb43a146101f5578063a0bcfc7f146101f0578063a22cb465146101eb578063b835c92f146101e6578063b88d4fde146101e1578063c21b471b146101dc578063c23dc68f146101d7578063c87b56dd146101d2578063cbd5d403146101cd578063e985e9c5146101c8578063f15f32cb146101c35763f2fde38b146101be57600080fd5b611e78565b611e1f565b611db7565b611d1d565b611c50565b611bed565b611ae5565b611a5a565b6119ae565b6118d3565b6117af565b61171c565b6116ec565b6115ba565b611513565b6114ea565b61142c565b61138f565b611331565b611302565b6112d3565b6112ad565b61121b565b6110cd565b610f18565b610cdc565b610cb3565b610b14565b610a48565b6109b4565b6107cc565b61077d565b61073b565b610677565b610594565b61042a565b610345565b610293565b6001600160e01b031981160361028e57565b600080fd5b3461028e57602036600319011261028e5760206004356102b28161027c565b63ffffffff60e01b1663152a902d60e11b81149081156102d8575b506040519015158152f35b6301ffc9a760e01b149050386102cd565b60005b8381106102fc5750506000910152565b81810151838201526020016102ec565b90602091610325815180928185528580860191016102e9565b601f01601f1916010190565b90602061034292818152019061030c565b90565b3461028e57600080600319360112610427576040519080600b54610368816115f6565b808552916001918083169081156103fd57506001146103a2575b61039e85610392818703826104cf565b60405191829182610331565b0390f35b9250600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db95b8284106103e55750505081016020016103928261039e610382565b805460208587018101919091529093019281016103ca565b86955061039e9693506020925061039294915060ff191682840152151560051b8201019293610382565b80fd5b3461028e57602036600319011261028e57600435610447816126cf565b1561046c576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176104af57604052565b61047e565b602081019081106001600160401b038211176104af57604052565b90601f801991011681019081106001600160401b038211176104af57604052565b604051906104fd82610494565b565b6001600160401b0381116104af5760051b60200190565b60208060031983011261028e57600435916001600160401b03831161028e578060238401121561028e57826004013561054e816104ff565b9361055c60405195866104cf565b81855260248486019260051b82010192831161028e57602401905b828210610585575050505090565b81358152908301908301610577565b3461028e576105a236610516565b33600052600f6020526105bb604060002060ff90541690565b801561063b575b6105cb906122f6565b60005b8151811015610639578061061261060d6106096106026105f16106349688612342565b51600052600e602052604060002090565b5460ff1690565b1590565b612356565b61062f6106226105f18386612342565b805460ff19166001179055565b612270565b6105ce565b005b50600a546105cb9061065d906001600160a01b03165b6001600160a01b031690565b331490506105c2565b6001600160a01b0381160361028e57565b604036600319011261028e5760043561068f81610666565b60243561069b82612d89565b6001600160a01b03806106ad83612661565b1690813303610708575b600083815260066020526040812080546001600160a01b0319166001600160a01b0387161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b600082815260076020908152604080832033845290915290205460ff166106b7576040516367d9dca160e11b8152600490fd5b3461028e57602036600319011261028e5760043561075881610666565b60018060a01b0316600052600f602052602060ff604060002054166040519015158152f35b3461028e57600036600319011261028e5760206000546001549003604051908152f35b606090600319011261028e576004356107b881610666565b906024356107c581610666565b9060443590565b6107d5366107a0565b91906001600160a01b0380831691903383036109a6575b6107f4612229565b6107fd85612661565b918382841603610995576000868152600660205260409020805490926108326001600160a01b03881633908114908414171590565b610941575b821695861561092f5761089493610872926108528a84612764565b610925575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b8517176108bc866000526004602052604060002090565b558116156108db575b50600080516020612e40833981519152600080a4005b600184016108f3816000526004602052604060002090565b5415610900575b506108c5565b60005481146108fa5761091d906000526004602052604060002090565b5538806108fa565b6000905538610857565b604051633a954ecd60e21b8152600490fd5b61097e610609610602336109678b60018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b1561083757604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b6109af33612d89565b6107ec565b3461028e57604036600319011261028e5760243560043560005260096020526109e06040600020611fbe565b80519091906001600160a01b031615610a38575b6001600160601b0360208301511690818102918183041490151715610a33579051604080516001600160a01b0390921682526127109092046020820152f35b611fe3565b9050610a42611f98565b906109f4565b3461028e57600036600319011261028e57610a61611f40565b600a5460ff8160a01c1615610aa85760ff60a01b1916600a556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b9181601f8401121561028e578235916001600160401b03831161028e576020808501948460051b01011161028e57565b3461028e5760408060031936011261028e576004906001600160401b0390823582811161028e57610b489036908501610ae4565b91909260243590811161028e57610b629036908601610ae4565b9092610b6c611f40565b818103610c7b5790934260a01b919060005b828110610b8757005b610b92818484612295565b35610b9c81610666565b610ba7828989612295565b35600054918115610c6b57610bbc8284612887565b6001600160a01b0381166000908152600560205260409020805468010000000000000001840201905560008381526004602052604090206001600160a01b039091169160019182821460e11b89178417905583019281600080516020612e408339815191529180856000858180a4015b848103610c5b5750505015610c4c57600055610c4790612270565b610b7e565b8551622e076360e81b81528990fd5b808391856000858180a401610c2c565b875163b562e8dd60e01b81528b90fd5b825162461bcd60e51b815260208188015260126024820152714d69736d617463686564206c656e6774687360701b6044820152606490fd5b3461028e57600036600319011261028e5760206040516daaeb6d7670e522a718067333cd4e8152f35b610ce5366107a0565b336001600160a01b038085169182141594929085610edd575b610d06612229565b60405192610d13846104b4565b60009680888652610ecf575b610d27612229565b610ec1575b610d34612229565b610d3d83612661565b90808383160361099557600084815260066020526040902080549093909290610d756001600160a01b03891633908114908614171590565b610e84575b881692831561092f5785948a91610d91878b612764565b610e7c575b50506001600160a01b0387811660009081526005602090815260408083208054600019019055928b168252828220805460010190558682526004905220600160e11b904260a01b851782179055811615610e33575b50600080516020612e408339815191528880a4833b610e08578480f35b610e159361060993612987565b610e2157388080808480f35b6040516368d2bf6b60e11b8152600490fd5b60018401610e4b816000526004602052604060002090565b5415610e58575b50610deb565b89548114610e5257610e74906000526004602052604060002090565b553880610e52565b558838610d96565b610eaa610609610602336109678c60018060a01b03166000526007602052604060002090565b15610d7a57604051632ce44b5f60e11b8152600490fd5b610eca33612d89565b610d2c565b610ed833612d89565b610d1f565b610ee633612d89565b610cfe565b9181601f8401121561028e578235916001600160401b03831161028e576020838186019501011161028e57565b3461028e57604036600319011261028e576001600160401b0360043581811161028e57610f49903690600401610eeb565b9160243581811161028e57610f62903690600401610eeb565b929091610f6d611f40565b84116104af57610f8784610f82600b546115f6565b611ff9565b600090601f8511600114610fc857610639949160009183610fbd575b50508160011b916000199060031b1c191617600b5561214c565b013590503880610fa3565b600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991601f198616815b818110611037575091600193918761063998941061101d575b505050811b01600b5561214c565b0135600019600384901b60f8161c1916905538808061100f565b91936020600181928787013581550195019201610ff6565b6020908160408183019282815285518094520193019160005b828110611076575050505090565b90919293826080826110c1600194895162ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611068565b3461028e5760208060031936011261028e576004356001600160401b03811161028e576110fe903690600401610ae4565b611107816104ff565b9261111560405194856104cf565b818452601f19611124836104ff565b0160005b81811061117d5750505060005b81810361114a576040518061039e868261104f565b8061116161115b6001938587612295565b35612b63565b61116b8287612342565b526111768186612342565b5001611135565b8290611187612b2e565b82828901015201611128565b60208060031983011261028e57600435916001600160401b03831161028e578060238401121561028e5782600401356111cb816104ff565b936111d960405195866104cf565b81855260248486019260051b82010192831161028e57602401905b828210611202575050505090565b838091833561121081610666565b8152019101906111f4565b3461028e5761122936611193565b611231611f40565b60005b81518110156106395761127b906001600160a01b03806112548386612342565b5116600052600f60209080825260409160ff83600020541615611280575b50505050612270565b611234565b6112a49361128e8689612342565b511660005252600020600160ff19825416179055565b38808080611272565b3461028e57600036600319011261028e57602060ff600a5460a01c166040519015158152f35b3461028e57602036600319011261028e5760206001600160a01b036112f9600435612661565b16604051908152f35b3461028e57602036600319011261028e57602061132960043561132481610666565b61260f565b604051908152f35b3461028e576000806003193601126104275761134b611f40565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b3461028e57600036600319011261028e576113a8611f40565b6113b0612229565b600a805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b6020908160408183019282815285518094520193019160005b828110611418575050505090565b83518552938101939281019260010161140a565b3461028e57602036600319011261028e5760043561144981610666565b6000806114558361260f565b9161145f83612c0f565b93611468612b2e565b506001600160a01b0390811691835b85850361148c576040518061039e89826113f1565b61149581612bb1565b60408101516114e157516001600160a01b03168381166114d8575b5060019084848416146114c4575b01611477565b806114d2838801978a612342565b526114be565b915060016114b0565b506001906114be565b3461028e57600036600319011261028e57600a546040516001600160a01b039091168152602090f35b3461028e57600080600319360112610427576040519080600c54611536816115f6565b808552916001918083169081156103fd575060011461155f5761039e85610392818703826104cf565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b8284106115a25750505081016020016103928261039e610382565b80546020858701810191909152909301928101611587565b3461028e57606036600319011261028e5761039e6115ea6004356115dd81610666565b6044359060243590612c41565b604051918291826113f1565b90600182811c92168015611626575b602083101461161057565b634e487b7160e01b600052602260045260246000fd5b91607f1691611605565b60405190600082600d5491611644836115f6565b808352926001908181169081156116ca575060011461166b575b506104fd925003836104cf565b600d600090815291507fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8483106116af57506104fd93505081016020013861165e565b81935090816020925483858a01015201910190918592611696565b9050602092506104fd94915060ff191682840152151560051b8201013861165e565b3461028e57600036600319011261028e5761039e611708611630565b60405191829160208352602083019061030c565b3461028e5761172a36610516565b33600052600f60205260ff60406000205416801561178c575b61174c906122f6565b60005b8151811015610639578061177461176f6106026105f16117879587612342565b6123ee565b61062f6117818285612342565b51612a30565b61174f565b50600a5461174c906117a6906001600160a01b0316610651565b33149050611743565b3461028e5760208060031936011261028e576001600160401b0360043581811161028e576117e1903690600401610eeb565b916117ea611f40565b82116104af57611804826117ff600d546115f6565b61206a565b600092601f83116001146118425750918192600092611837575b5050600019600383901b1c191660019190911b17600d55005b01359050388061181e565b90601f19831693611875600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590565b9281905b8682106118b15750508360019510611897575b505050811b01600d55005b0135600019600384901b60f8161c1916905538808061188c565b80600184968294958701358155019501920190611879565b8015150361028e57565b3461028e57604036600319011261028e576004356118f081610666565b602435906118fd826118c9565b61190681612d89565b3360009081526007602090815260408083206001600160a01b038516845290915290209115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b6020908160408183019282815285518094520193019160005b828110611998575050505090565b835115158552938101939281019260010161198a565b3461028e576119bc36610516565b8051906119c8826104ff565b6040926119d7845192836104cf565b8082526119e6601f19916104ff565b016020903682840137600090815b8451811015611a325780611a0b611a2d9287612342565b518452600e835260ff8785205416611a238287612342565b9015159052612270565b6119f4565b85518061039e8682611971565b6001600160401b0381116104af57601f01601f191660200190565b608036600319011261028e57600435611a7281610666565b602435611a7e81610666565b606435916001600160401b03831161028e573660238401121561028e57826004013591611aaa83611a3f565b92611ab860405194856104cf565b808452366024828701011161028e5760208160009260246106399801838801378501015260443591612446565b3461028e57604036600319011261028e57600435611b0281610666565b602435906001600160601b03821680830361028e5761271090611b23611f40565b11611b955761063991611b6e90611b446001600160a01b03841615156122aa565b611b5e611b4f6104f0565b6001600160a01b039094168452565b6001600160601b03166020830152565b805160209091015160a01b6001600160a01b0319166001600160a01b039190911617600855565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b3461028e57602036600319011261028e576080611c0b600435612b63565b611c4e604051809262ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b3461028e57602036600319011261028e57600435611c6d816126cf565b15611d0b57611c7a611630565b805160009015611cf1575060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283611c9a5761039e9350611cdf92611ce5610392936080601f19948581019203018152604051958693602085019061264a565b9061264a565b039081018352826104cf565b60405161039e93509150611d04826104b4565b8152610392565b604051630a14c4b560e41b8152600490fd5b3461028e57611d2b36610516565b33600052600f60205260ff604060002054168015611d94575b611d4d906122f6565b60005b81518110156106395780611d75611d706106026105f1611d8f9587612342565b6123a2565b61062f611d856105f18386612342565b805460ff19169055565b611d50565b50600a54611d4d90611dae906001600160a01b0316610651565b33149050611d44565b3461028e57604036600319011261028e57602060ff611e13600435611ddb81610666565b60243590611de882610666565b60018060a01b03166000526007845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b3461028e57611e2d36611193565b611e35611f40565b60005b815181101561063957611e73906001600160a01b03611e578285612342565b5116600052600f602052604060002060ff198154169055612270565b611e38565b3461028e57602036600319011261028e57600435611e9581610666565b611e9d611f40565b6001600160a01b03908116908115611eec57600a54826001600160601b0360a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b600a546001600160a01b03163303611f5457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60405190611fa582610494565b6008546001600160a01b038116835260a01c6020830152565b90604051611fcb81610494565b91546001600160a01b038116835260a01c6020830152565b634e487b7160e01b600052601160045260246000fd5b601f8111612005575050565b600090600b82527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906020601f850160051c83019410612060575b601f0160051c01915b82811061205557505050565b818155600101612049565b9092508290612040565b601f8111612076575050565b600090600d82527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5906020601f850160051c830194106120d1575b601f0160051c01915b8281106120c657505050565b8181556001016120ba565b90925082906120b1565b601f81116120e7575050565b600090600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7906020601f850160051c83019410612142575b601f0160051c01915b82811061213757505050565b81815560010161212b565b9092508290612122565b91906001600160401b0381116104af576121708161216b600c546115f6565b6120db565b6000601f82116001146121aa5781929360009261219f575b50508160011b916000199060031b1c191617600c55565b013590503880612188565b600c600052601f198216937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c791805b86811061221157508360019596106121f7575b505050811b01600c55565b0135600019600384901b60f8161c191690553880806121ec565b909260206001819286860135815501940191016121d9565b60ff600a5460a01c1661223857565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b6000198114610a335760010190565b634e487b7160e01b600052603260045260246000fd5b91908110156122a55760051b0190565b61227f565b156122b157565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b156122fd57565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420616e20616c6c6f776564206f70657261746f720000000000000000006044820152606490fd5b80518210156122a55760209160051b010190565b1561235d57565b60405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479206c6f636b65640000000000000000006044820152606490fd5b156123a957565b60405162461bcd60e51b815260206004820152601960248201527f546f6b656e20697320616c726561647920756e6c6f636b6564000000000000006044820152606490fd5b156123f557565b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e206d757374206265206c6f636b6564206265666f7265206275726e604482015262696e6760e81b6064820152608490fd5b909290916001600160a01b03808416903382141580612601575b612468612229565b6125f3575b612475612229565b61247e83612661565b91808284160361099557600084815260066020526040902080549390926124b46001600160a01b03891633908114908714171590565b6125b6575b881692831561092f5785946124ce868a612764565b6125ac575b506001600160a01b0387811660009081526005602090815260408083208054600019019055928b168252828220805460010190558682526004905220600160e11b904260a01b851782179055811615612562575b50600080516020612e40833981519152600080a4833b612548575b50505050565b6125559361060993612987565b610e215738808080612542565b6001840161257a816000526004602052604060002090565b5415612587575b50612527565b6000548114612581576125a4906000526004602052604060002090565b553880612581565b60009055386124d3565b6125dc610609610602336109678c60018060a01b03166000526007602052604060002090565b156124b957604051632ce44b5f60e11b8152600490fd5b6125fc33612d89565b61246d565b61260a33612d89565b612460565b6001600160a01b031680156126385760005260056020526001600160401b036040600020541690565b6040516323d3ad8160e21b8152600490fd5b9061265d602092828151948592016102e9565b0190565b6000818154811061267f575b604051636f96cda160e11b8152600490fd5b81526004906020918083526040928383205494600160e01b8616156126a65750505061266d565b93929190935b85156126ba57505050505090565b600019018083528185528383205495506126ac565b600054811090816126de575090565b90506000526004602052600160e01b604060002054161590565b9060018201809211610a3357565b1561270d57565b60405162461bcd60e51b815260206004820152602960248201527f546f6b656e206973206c6f636b656420616e642063616e6e6f74206265207472604482015268185b9cd9995c9c995960ba1b6064820152608490fd5b815b61276f836126f8565b8110156128825761276f906127be906001600160a01b0384168015159081612862575b5080612837575b612810575b6127b561060282600052600e602052604060002090565b6127c557612270565b9050612766565b600a546127da906001600160a01b0316610651565b331480156127ec575b61062f906122f6565b50336000908152600f6020526040902061062f9061280990610602565b90506127e3565b61283261282d61060961060284600052600e602052604060002090565b612706565b61279e565b506001600160a01b0384166000908152600f6020526040902061285d9061060990610602565b612799565b600a5490915061287a906001600160a01b0316610651565b141538612792565b505050565b805b828201808311610a3357811015612882576128c29060ff806128b583600052600e602052604060002090565b54166128c7575b50612270565b612889565b6128e69060018060a01b03600a541633149081156128ec575b506122f6565b386128bc565b336000908152600f6020526040902054169050386128e0565b9081602091031261028e57516103428161027c565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526103429291019061030c565b6040513d6000823e3d90fd5b3d15612982573d9061296882611a3f565b9161297660405193846104cf565b82523d6000602084013e565b606090565b926020916129b0936000604051809681958294630a85bd0160e11b9a8b8552336004860161291a565b03926001600160a01b03165af160009181612a00575b506129f2576129d3612957565b805190816129ed576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b612a2291925060203d8111612a29575b612a1a81836104cf565b810190612905565b90386129c6565b503d612a10565b6000612a3b82612661565b600083815260066020526040902080546001600160a01b038316929190612a628685612764565b612b25575b506001600160a01b038216600090815260056020526040902080546fffffffffffffffffffffffffffffffff01905560008481526004602052604090204260a01b8317600360e01b179055600160e11b811615612adc575b50600080516020612e408339815191528280a46001805401600155565b60018401612af4816000526004602052604060002090565b5415612b01575b50612abf565b83548114612afb57612b1d906000526004602052604060002090565b553880612afb565b83905538612a67565b60405190608082018281106001600160401b038211176104af5760405260006060838281528260208201528260408201520152565b612b6b612b2e565b50612b74612b2e565b600054821015612bac5750612b8881612bb1565b6040810151612bac5750612ba761034291612ba1612b2e565b50612661565b612bcc565b905090565b612bb9612b2e565b5060005260046020526103426040600020545b90612bd5612b2e565b6001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b83161515604082015260e89290921c6060830152565b90612c19826104ff565b612c2660405191826104cf565b8281528092612c37601f19916104ff565b0190602036910137565b9082811015612d62576000918254808511612d5a575b50612c618161260f565b84831015612d5357828503818110612d4b575b505b612c7f81612c0f565b958115612d4357612c8f84612b63565b918594604093612ca461060986830151151590565b612d31575b505b8781141580612d27575b15612d1a57612cc381612bb1565b80850151612d1157516001600160a01b0390811680612d08575b509081600192871690881614612cf4575b01612cab565b80612d02838a01998c612342565b52612cee565b96506001612cdd565b50600190612cee565b5050959450505050815290565b5081871415612cb5565b516001600160a01b0316955038612ca9565b945050505050565b905038612c74565b5082612c76565b935038612c57565b604051631960ccad60e11b8152600490fd5b9081602091031261028e5751610342816118c9565b6daaeb6d7670e522a718067333cd4e803b612da2575050565b604051633185c44d60e21b81523060048201526001600160a01b038316602482015290602090829060449082905afa908115612e3a57600091612e0c575b5015612de95750565b604051633b79c77360e21b81526001600160a01b03919091166004820152602490fd5b612e2d915060203d8111612e33575b612e2581836104cf565b810190612d74565b38612de0565b503d612e1b565b61294b56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ba72a52321f69962a3f9ff8a0752e5e79eb99407db84ae95c4358cf2465f44d664736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c8900000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000001461646964617320476f6c64656e205469636b6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000541444947540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f626166796265696262727478646d6d77677a727a6364697171727a76796a7677726b6f356537707a7371746f35736a68776871666137647437636d2f0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : __name (string): adidas Golden Ticket
Arg [1] : __symbol (string): ADIGT
Arg [2] : _baseUri (string): ipfs://bafybeibbrtxdmmwgzrzcdiqqrzvyjvwrko5e7pzsqto5sjhwhqfa7dt7cm/
Arg [3] : recipient (address): 0x0d86bdD298DEfC36d562eFFD56115Cf6c59c4c89
Arg [4] : value (uint96): 1000
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 0000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c89
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [6] : 61646964617320476f6c64656e205469636b6574000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 4144494754000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [10] : 697066733a2f2f626166796265696262727478646d6d77677a727a6364697171
Arg [11] : 727a76796a7677726b6f356537707a7371746f35736a68776871666137647437
Arg [12] : 636d2f0000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ 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.