Overview
ETH Balance
0.02 ETH
Eth Value
$61.91 (@ $3,095.70/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 162 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 19584288 | 299 days ago | IN | 0 ETH | 0.00195344 | ||||
Set Approval For... | 19506336 | 310 days ago | IN | 0 ETH | 0.00096237 | ||||
Transfer From | 17997460 | 522 days ago | IN | 0 ETH | 0.00048233 | ||||
Transfer From | 17997430 | 522 days ago | IN | 0 ETH | 0.00075914 | ||||
Set Approval For... | 17856348 | 542 days ago | IN | 0 ETH | 0.0007716 | ||||
Public Mint | 17836106 | 544 days ago | IN | 0 ETH | 0.00277081 | ||||
Public Mint | 17757276 | 555 days ago | IN | 0 ETH | 0.00303315 | ||||
Public Mint | 17738097 | 558 days ago | IN | 0 ETH | 0.00167984 | ||||
Safe Transfer Fr... | 17590971 | 579 days ago | IN | 0 ETH | 0.00131779 | ||||
Set Approval For... | 17442086 | 600 days ago | IN | 0 ETH | 0.00091078 | ||||
Set Approval For... | 17399978 | 606 days ago | IN | 0 ETH | 0.00087541 | ||||
Public Mint | 17378272 | 609 days ago | IN | 0 ETH | 0.0045537 | ||||
Public Mint | 17378216 | 609 days ago | IN | 0 ETH | 0.00319683 | ||||
Public Mint | 17378151 | 609 days ago | IN | 0 ETH | 0.00331153 | ||||
Public Mint | 17378148 | 609 days ago | IN | 0 ETH | 0.00314113 | ||||
Set Approval For... | 17374994 | 609 days ago | IN | 0 ETH | 0.00150296 | ||||
Public Mint | 17336289 | 615 days ago | IN | 0 ETH | 0.00391095 | ||||
Set Approval For... | 17335202 | 615 days ago | IN | 0 ETH | 0.00133073 | ||||
Public Mint | 17316621 | 617 days ago | IN | 0 ETH | 0.00277499 | ||||
Public Mint | 17316621 | 617 days ago | IN | 0 ETH | 0.00277499 | ||||
Public Mint | 17316621 | 617 days ago | IN | 0 ETH | 0.00277499 | ||||
Public Mint | 17316621 | 617 days ago | IN | 0 ETH | 0.00691105 | ||||
Public Mint | 17295970 | 620 days ago | IN | 0 ETH | 0.00409985 | ||||
Public Mint | 17289172 | 621 days ago | IN | 0 ETH | 0.00435844 | ||||
Set Approval For... | 17286323 | 622 days ago | IN | 0 ETH | 0.00242928 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MetaZeusGenesis
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; import 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; contract MetaZeusGenesis is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; error ContractPaused(); error MaxSupplyReached(); error PublicSaleInactive(); error MaxPerWallet(); error InvalidAmount(); error NotAllowedToMint(); error NotEnoughPass(); error NotEnoughAvailable(); error WrongPassID(); IERC721AQueryable mintPass; address private constant treasury = 0x4F590f2E40B27d06d8d5a7b8BEaf0eaaed66b248; address private constant mintPassAddress = 0x8c2EeE9d6422b6D998667761aC77ba43b05C44d6; uint256 private constant maxSupTotal = 650; string private constant uriPrefix = "https://metazeus.s3.eu-central-1.amazonaws.com/metazeus_genesis/metadata/"; string private constant uriSuffix = ".json"; string private constant hiddenMetadataUri = "https://metazeus.s3.eu-central-1.amazonaws.com/metazeus_genesis/metadata/hidden.json"; struct States { bool paused; bool publicSaleEnabled; bool revealed; } //initialize structs States public state; uint256[3] public usedPass; constructor( States memory _state ) ERC721A("MetaZeusGenesis", "MetaZeusGenesisNFT") { setPaused(_state.paused); setPublicSaleActive(_state.publicSaleEnabled); setRevealed(_state.revealed); mintPass = IERC721AQueryable(mintPassAddress); } modifier mintCompliancePublic( uint256 _mintAmount, uint256[] calldata passIDs ) { if (state.paused) revert ContractPaused(); if (!(_mintAmount == passIDs.length)) revert NotEnoughPass(); if (!hasEnoughAvailableMintpass(_mintAmount, passIDs)) revert NotEnoughAvailable(); if (_totalMinted() + _mintAmount > maxSupTotal) revert MaxSupplyReached(); if (!state.publicSaleEnabled) revert PublicSaleInactive(); _; } receive() external payable {} /** ----MINT FUNCTIONS---- */ // PUBLIC MINT function PublicMint( uint256 _mintAmount, uint256[] calldata passIDs ) public payable mintCompliancePublic(_mintAmount, passIDs) { for (uint16 i = 0; i < _mintAmount; ) { setPassState(passIDs[i]); unchecked { ++i; } } _mint(_msgSender(), _mintAmount); } // ------ HELPERS AND OTHER FUNCTIONS ------ function hasEnoughAvailableMintpass( uint256 _mintAmount, uint256[] calldata passIDs ) public view returns (bool) { bool lastRes = true; bool hasEnough = false; bool currentRes; for (uint16 i = 0; i < _mintAmount; ) { currentRes = isOwnerOf(passIDs[i]) && !getPassState(passIDs[i]); hasEnough = currentRes && lastRes; lastRes = currentRes; unchecked { ++i; } } return hasEnough; } function isOwnerOf(uint256 _id) internal view returns (bool) { return msg.sender == mintPass.ownerOf(_id); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), 'ERC721Metadata: URI query for nonexistent token'); if (state.revealed == false) { return hiddenMetadataUri; } string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix)) : ''; } function _baseURI() internal view virtual override(ERC721A) returns (string memory) { return uriPrefix; } // -----SETTERS----- function setPaused(bool _state) public onlyOwner { state.paused = _state; } function setPublicSaleActive(bool _state) public onlyOwner { state.publicSaleEnabled = _state; } function setRevealed(bool _state) public onlyOwner { state.revealed = _state; } function setPassState(uint256 id) internal { uint256 bitmapIndex; uint256 indexFromRight; if (id <= 256) { bitmapIndex = 0; indexFromRight = id; } else if (id >= 257 && id <= 512) { bitmapIndex = 1; indexFromRight = id - 256; } else if (id >= 513 && id <= 650) { bitmapIndex = 2; indexFromRight = id - 512; } else { revert WrongPassID(); } _setBitData(bitmapIndex, indexFromRight); } function _setBitData(uint256 bitmapIndex, uint256 indexFromRight) internal { uint256 tempuint = usedPass[bitmapIndex] | (1 << indexFromRight); usedPass[bitmapIndex] = tempuint; } function getPassState(uint256 id) public view returns (bool) { uint256 bitmapIndex; uint256 indexFromRight; if (id <= 256) { bitmapIndex = 0; indexFromRight = id; } else if (id >= 257 && id <= 512) { bitmapIndex = 1; indexFromRight = id - 256; } else if (id >= 513 && id <= 650) { bitmapIndex = 2; indexFromRight = id - 512; } else { revert WrongPassID(); } return _readBitData(bitmapIndex, indexFromRight); } function _readBitData( uint256 bitmapIndex, uint256 indexFromRight ) internal view returns (bool) { uint256 bitAtIndex = usedPass[bitmapIndex] & (1 << indexFromRight); return bitAtIndex > 0; } // -----TRANSFERS FUNCTIONS----- function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() public onlyOwner nonReentrant { (bool os, ) = payable(treasury).call{value: address(this).balance}(""); require(os); } }
// 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.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @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, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import '@openzeppelin/contracts/access/Ownable.sol'; import 'erc721a/contracts/IERC721A.sol'; contract AirdropNFTs is Ownable { error Invalid(); address public metazeus; address public vault; constructor(address _metazeus, address _vault ) { vault = _vault; metazeus = _metazeus; // nft vault that holds nfts to airdrop. //Vault must aproveForAll this contract in order to perform the airdrop function } function sendNFTs(address[] calldata receipients, uint[] calldata tokenIDs) external onlyOwner{ if(receipients.length!=tokenIDs.length) revert Invalid(); uint256 length = receipients.length; for (uint256 i; i<length; i++) { IERC721A(metazeus).safeTransferFrom(vault,receipients[i],tokenIDs[i]); } } //uint256 [] memory tokenIDs = IERC721AQueryable(metazeus).tokensOfOwner(vault); // function getTokenIDs() internal view onlyOwner returns (uint256[] memory) { // return IERC721AQueryable(metazeus).tokensOfOwner(vault); // } // ============================================================= // 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. */ }
pragma solidity >=0.8.9 <0.9.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import '@openzeppelin/contracts/access/Ownable.sol'; import 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; contract Test is ERC721, Ownable, DefaultOperatorFilterer { constructor() ERC721("Test", "TST") public { for(uint i = 1; i<=11; i++){ _safeMint(msg.sender, i); } } function baseTokenURI() public view returns (string memory) { return ""; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; contract SendEth { function sendEth(address _to) public payable { address payable addr = payable(address(_to)); selfdestruct(addr); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; import 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; contract MetaZeusMintpassv2 is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; error InvalidPrice(); error ContractPaused(); error MaxSupplyReached(); error AllowSaleInactive(); error PublicSaleInactive(); error MaxPerWallet(); error InvalidAmount(); error NotAllowedToMint(); // set to immutable in prod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! bytes32 private merkleRootAllowList; // set to 0,077 ETH in prod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! uint256 private constant mintPrice=100; uint256 private constant maxSupTotal=5555; uint256 private constant teamAllocation=333; string private constant uriPrefix = ''; string private constant uriSuffix = '.json'; string public hiddenMetadataUri; //struct for state vars is 2nd best next to bitmap struct States { bool paused; bool allowlistMintEnabled; bool publicSaleEnabled; bool revealed; } //initialize structs States public state; constructor( States memory state, string memory _hiddenMetadataUri, bytes32 _merkleRootAllowList ) ERC721A("MetaZeusMintpassv2", "MetaZeusMintpassv2") { setHiddenMetadataUri(_hiddenMetadataUri); setPaused(state.paused); setPublicSaleActive(state.publicSaleEnabled); setWhitelistMintEnabled(state.allowlistMintEnabled); setRevealed(state.revealed); batchMint(msg.sender,teamAllocation); merkleRootAllowList = _merkleRootAllowList; } // checks for allow and public phases modifier mintComplianceAllow(uint256 _mintAmount, bytes32[] calldata _merkleProof) { if(state.paused) revert ContractPaused(); if(_totalMinted()+_mintAmount > maxSupTotal) revert MaxSupplyReached(); if(!state.allowlistMintEnabled) revert AllowSaleInactive(); //if ((_getAux(_msgSender())+_mintAmount)>2) revert NotAllowedToMint(); if(_mintAmount <= 0 || _mintAmount > 2) revert InvalidAmount(); if(msg.value<mintPrice * _mintAmount) revert InvalidPrice(); //bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); //if(!MerkleProof.verifyCalldata(_merkleProof, merkleRootAllowList, leaf)) revert NotAllowedToMint(); _; } modifier mintCompliancePublic(uint256 _mintAmount) { if(state.paused) revert ContractPaused(); if(_totalMinted()+_mintAmount > maxSupTotal) revert MaxSupplyReached(); if(!state.publicSaleEnabled) revert PublicSaleInactive(); //if ((_getAux(_msgSender())+_mintAmount*10)>12) revert NotAllowedToMint(); if(_mintAmount <= 0 || _mintAmount > 1) revert InvalidAmount(); if(msg.value<mintPrice * _mintAmount) revert InvalidPrice(); _; } /** ----MINT FUNCTIONS---- */ //ALLOWLIST function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintComplianceAllow(_mintAmount,_merkleProof) { _setAux(_msgSender(),(_getAux(_msgSender())+uint64(_mintAmount))); _mint(_msgSender(), _mintAmount); } // PUBLIC MINT function pubMint(uint256 _mintAmount) public payable mintCompliancePublic(_mintAmount) { _setAux(_msgSender(),(_getAux(_msgSender())+uint64(_mintAmount*10))); _mint(_msgSender(), _mintAmount); } // Batch Mint function batchMint(address to, uint256 quantity) public payable onlyOwner { _mintERC2309(to,quantity); } // ------ HELPERS AND OTHER FUNCTIONS ------ function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), 'ERC721Metadata: URI query for nonexistent token'); if (state.revealed == false) { return hiddenMetadataUri; } string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix)) : ''; } function _baseURI() internal view virtual override(ERC721A) returns (string memory) { return uriPrefix; } // -----GETTERS----- // All contract states can be read from these 2 methods function getStates() public view returns (States memory) { return state; } // -----SETTERS----- function setRevealed(bool _state) public onlyOwner { state.revealed = _state; } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { hiddenMetadataUri = _hiddenMetadataUri; } function setPaused(bool _state) public onlyOwner { state.paused = _state; } function setWhitelistMintEnabled(bool _state) public onlyOwner { state.allowlistMintEnabled = _state; } function setPublicSaleActive(bool _state) public onlyOwner { state.publicSaleEnabled = _state; } // DELETE THIS FUNCTION FOR PROD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function setMerkleRoot(bytes32 _wlhash) public onlyOwner { merkleRootAllowList=_wlhash; } // -----TRANSFERS FUNCTIONS----- function transferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() public onlyOwner nonReentrant { (bool os, ) = payable(owner()).call{value: address(this).balance}(''); require(os); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; import 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; // Fuzz test resulted in [FAIL. Reason: EvmError: OutOfGas] when trying to mint with ids 1-256 in single go // we may consider limiting the _mintAmount per tx to overcome it or leave it as no one will attempt this anyway //need to test with real mintpass contract //make sure startTokenID of mitntpass are correctly implemented here //check private vs internal, public vs external contract MetaZeusGenesisTest is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; error ContractPaused(); error MaxSupplyReached(); error PublicSaleInactive(); error MaxPerWallet(); error InvalidAmount(); error NotAllowedToMint(); error NotEnoughPass(); error NotEnoughAvailable(); error WrongPassID(); IERC721AQueryable mintPass; address private constant treasury = 0x04dd23a3B1A1C1Fe257f890B37466adFf7240F80; address private immutable mintPassAddress; // change to private constant //mainnet addres: 0x8c2EeE9d6422b6D998667761aC77ba43b05C44d6; uint256 private constant maxSupTotal = 650; // todo: to constant string private uriPrefix = ""; string private uriSuffix = ".json"; string private hiddenMetadataUri = ""; struct States { bool paused; bool publicSaleEnabled; bool revealed; } //initialize structs States public state; uint256[3] public usedPass; constructor( States memory _state, address _add ) ERC721A("MetaZeusGenesis", "MetaZeusGenesisNFT") { setPaused(_state.paused); setPublicSaleActive(_state.publicSaleEnabled); setRevealed(_state.revealed); mintPassAddress = _add; mintPass = IERC721AQueryable(mintPassAddress); } modifier mintCompliancePublic( uint256 _mintAmount, uint256[] calldata passIDs ) { if (state.paused) revert ContractPaused(); if (!(_mintAmount == passIDs.length)) revert NotEnoughPass(); if (!hasEnoughAvailableMintpass(_mintAmount, passIDs)) revert NotEnoughAvailable(); if (_totalMinted() + _mintAmount > maxSupTotal) revert MaxSupplyReached(); if (!state.publicSaleEnabled) revert PublicSaleInactive(); _; } function setHiddenUri(string memory _uri) public onlyOwner { hiddenMetadataUri = _uri; } function setUriPrefix(string memory _uri) public onlyOwner { uriPrefix = _uri; } function setUriSuffix(string memory _uri) public onlyOwner { uriSuffix = _uri; } /** ----MINT FUNCTIONS---- */ // PUBLIC MINT function PublicMint( uint256 _mintAmount, uint256[] calldata passIDs ) public payable mintCompliancePublic(_mintAmount, passIDs) { for (uint16 i = 0; i < _mintAmount; ) { setPassState(passIDs[i]); unchecked { ++i; } } _mint(_msgSender(), _mintAmount); } // ------ HELPERS AND OTHER FUNCTIONS ------ function hasEnoughAvailableMintpass( uint256 _mintAmount, uint256[] calldata passIDs ) public view returns (bool) { bool lastRes = true; bool hasEnough = false; bool currentRes; for (uint16 i = 0; i < _mintAmount; ) { currentRes = isOwnerOf(passIDs[i]) && !getPassState(passIDs[i]); hasEnough = currentRes && lastRes; lastRes = currentRes; unchecked { ++i; } } return hasEnough; } function isOwnerOf(uint256 _id) internal view returns (bool) { return msg.sender == mintPass.ownerOf(_id); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), 'ERC721Metadata: URI query for nonexistent token'); if (state.revealed == false) { return hiddenMetadataUri; } string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix)) : ''; } function _baseURI() internal view virtual override(ERC721A) returns (string memory) { return uriPrefix; } // -----SETTERS----- function setPaused(bool _state) public onlyOwner { state.paused = _state; } function setPublicSaleActive(bool _state) public onlyOwner { state.publicSaleEnabled = _state; } function setRevealed(bool _state) public onlyOwner { state.revealed = _state; } function setPassState(uint256 id) internal { uint256 bitmapIndex; uint256 indexFromRight; if (id <= 256) { bitmapIndex = 0; indexFromRight = id; } else if (id >= 257 && id <= 512) { bitmapIndex = 1; indexFromRight = id - 256; } else if (id >= 513 && id <= 650) { bitmapIndex = 2; indexFromRight = id - 512; } else { revert WrongPassID(); } _setBitData(bitmapIndex, indexFromRight); } function _setBitData(uint256 bitmapIndex, uint256 indexFromRight) internal { uint256 tempuint = usedPass[bitmapIndex] | (1 << indexFromRight); usedPass[bitmapIndex] = tempuint; } event inputError(uint256 _x, uint256 _y); function getPassState(uint256 id) public view returns (bool) { uint256 bitmapIndex; uint256 indexFromRight; if (id <= 256) { bitmapIndex = 0; indexFromRight = id; } else if (id >= 257 && id <= 512) { bitmapIndex = 1; indexFromRight = id - 256; } else if (id >= 513 && id <= 650) { bitmapIndex = 2; indexFromRight = id - 512; } else { revert WrongPassID(); } return _readBitData(bitmapIndex, indexFromRight); } event uinttest(uint256 _x); function _readBitData( uint256 bitmapIndex, uint256 indexFromRight ) internal view returns (bool) { uint256 bitAtIndex = usedPass[bitmapIndex] & (1 << indexFromRight); return bitAtIndex > 0; } // -----TRANSFERS FUNCTIONS----- function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() public onlyOwner nonReentrant { (bool os, ) = payable(treasury).call{value: address(this).balance}(""); require(os); } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; import 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; contract MetaZeusMintpass is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; error InvalidPrice(); error ContractPaused(); error MaxSupplyReached(); error AllowSaleInactive(); error PublicSaleInactive(); error MaxPerWallet(); error InvalidAmount(); error NotAllowedToMint(); bytes32 private immutable merkleRootAllowList; address private constant treasury=0x4F590f2E40B27d06d8d5a7b8BEaf0eaaed66b248; uint256 private constant mintPrice=77000000000000000; uint256 private constant maxSupTotal=5555; uint256 private constant teamAllocation=333; string private constant uriPrefix = 'https://metazeus.s3.eu-central-1.amazonaws.com/metazeus_nft_pass/metadata/'; string private constant uriSuffix = '.json'; //struct for state vars is 2nd best next to bitmap struct States { bool paused; bool allowlistMintEnabled; bool publicSaleEnabled; } //initialize structs States public state; constructor( States memory _state, bytes32 _merkleRootAllowList ) ERC721A("MetaZeusMintpass", "MetaZeusMintpass") { setPaused(_state.paused); setPublicSaleActive(_state.publicSaleEnabled); setWhitelistMintEnabled(_state.allowlistMintEnabled); batchMint(msg.sender, teamAllocation); merkleRootAllowList = _merkleRootAllowList; } // checks for allow and public phases modifier mintComplianceAllow(uint256 _mintAmount, bytes32[] calldata _merkleProof) { if(state.paused) revert ContractPaused(); if(_totalMinted()+_mintAmount > maxSupTotal) revert MaxSupplyReached(); if(!state.allowlistMintEnabled) revert AllowSaleInactive(); if ((_getAux(_msgSender())+_mintAmount)>2) revert NotAllowedToMint(); if(_mintAmount <= 0 || _mintAmount > 2) revert InvalidAmount(); if(msg.value<mintPrice * _mintAmount) revert InvalidPrice(); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); if(!MerkleProof.verifyCalldata(_merkleProof, merkleRootAllowList, leaf)) revert NotAllowedToMint(); _; } modifier mintCompliancePublic(uint256 _mintAmount) { if(state.paused) revert ContractPaused(); if(_totalMinted()+_mintAmount > maxSupTotal) revert MaxSupplyReached(); if(!state.publicSaleEnabled) revert PublicSaleInactive(); if(_mintAmount <= 0 || _mintAmount > 10) revert InvalidAmount(); if(msg.value<mintPrice * _mintAmount) revert InvalidPrice(); _; } /** ----MINT FUNCTIONS---- */ //ALLOWLIST function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintComplianceAllow(_mintAmount,_merkleProof) { _setAux(_msgSender(),(_getAux(_msgSender())+uint64(_mintAmount))); _mint(_msgSender(), _mintAmount); } // PUBLIC MINT function pubMint(uint256 _mintAmount) public payable mintCompliancePublic(_mintAmount) { _mint(_msgSender(), _mintAmount); } // Batch Mint function batchMint(address to, uint256 quantity) public payable onlyOwner { _mintERC2309(to,quantity); } // ------ HELPERS AND OTHER FUNCTIONS ------ function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), 'ERC721Metadata: URI query for nonexistent token'); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix)) : ''; } function _baseURI() internal view virtual override(ERC721A) returns (string memory) { return uriPrefix; } // -----SETTERS----- function setPaused(bool _state) public onlyOwner { state.paused = _state; } function setWhitelistMintEnabled(bool _state) public onlyOwner { state.allowlistMintEnabled = _state; } function setPublicSaleActive(bool _state) public onlyOwner { state.publicSaleEnabled = _state; } // -----TRANSFERS FUNCTIONS----- function transferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() public onlyOwner nonReentrant { (bool os, ) = payable(treasury).call{value: address(this).balance}(''); require(os); } }
// 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"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.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. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); 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)); } } } } 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); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } 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) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bool","name":"publicSaleEnabled","type":"bool"},{"internalType":"bool","name":"revealed","type":"bool"}],"internalType":"struct MetaZeusGenesis.States","name":"_state","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ContractPaused","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MaxPerWallet","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotAllowedToMint","type":"error"},{"inputs":[],"name":"NotEnoughAvailable","type":"error"},{"inputs":[],"name":"NotEnoughPass","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":"PublicSaleInactive","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"WrongPassID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256[]","name":"passIDs","type":"uint256[]"}],"name":"PublicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"id","type":"uint256"}],"name":"getPassState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256[]","name":"passIDs","type":"uint256[]"}],"name":"hasEnoughAvailableMintpass","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPublicSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bool","name":"publicSaleEnabled","type":"bool"},{"internalType":"bool","name":"revealed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_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":"","type":"uint256"}],"name":"usedPass","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200287b3803806200287b8339810160408190526200003491620003bd565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280600f81526020016e4d6574615a65757347656e6573697360881b8152506040518060400160405280601281526020017113595d1856995d5cd1d95b995cda5cd3919560721b8152508160029081620000af9190620004c1565b506003620000be8282620004c1565b5050600160005550620000d13362000277565b60016009556daaeb6d7670e522a718067333cd4e3b156200021b5780156200016957604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200014a57600080fd5b505af11580156200015f573d6000803e3d6000fd5b505050506200021b565b6001600160a01b03821615620001ba5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200012f565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200020157600080fd5b505af115801562000216573d6000803e3d6000fd5b505050505b505080516200022a90620002c9565b60208101516200023a90620002e6565b60408101516200024a906200030a565b50600a80546001600160a01b031916738c2eee9d6422b6d998667761ac77ba43b05c44d61790556200058d565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002d362000330565b600b805460ff1916911515919091179055565b620002f062000330565b600b80549115156101000261ff0019909216919091179055565b6200031462000330565b600b8054911515620100000262ff000019909216919091179055565b6008546001600160a01b031633146200038f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b634e487b7160e01b600052604160045260246000fd5b80518015158114620003b857600080fd5b919050565b600060608284031215620003d057600080fd5b604051606081016001600160401b0381118282101715620003f557620003f562000391565b6040526200040383620003a7565b81526200041360208401620003a7565b60208201526200042660408401620003a7565b60408201529392505050565b600181811c908216806200044757607f821691505b6020821081036200046857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004bc57600081815260208120601f850160051c81016020861015620004975750805b601f850160051c820191505b81811015620004b857828155600101620004a3565b5050505b505050565b81516001600160401b03811115620004dd57620004dd62000391565b620004f581620004ee845462000432565b846200046e565b602080601f8311600181146200052d5760008415620005145750858301515b600019600386901b1c1916600185901b178555620004b8565b600085815260208120601f198616915b828110156200055e578886015182559484019460019091019084016200053d565b50858210156200057d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6122de806200059d6000396000f3fe6080604052600436106101dc5760003560e01c8063715018a611610102578063c23dc68f11610095578063e0a8085311610064578063e0a8085314610571578063e2e06fa314610591578063e985e9c5146105b1578063f2fde38b146105fa57600080fd5b8063c23dc68f146104f1578063c75bbe211461051e578063c87b56dd14610531578063d4629c151461055157600080fd5b806399a2557a116100d157806399a2557a14610452578063a22cb46514610472578063b88d4fde14610492578063c19d93fb146104a557600080fd5b8063715018a6146103dd5780638462151c146103f25780638da5cb5b1461041f57806395d89b411461043d57600080fd5b8063289653d91161017a57806342842e0e1161014957806342842e0e1461035d5780635bbb2177146103705780636352211e1461039d57806370a08231146103bd57600080fd5b8063289653d9146102e65780633ccfd60b146103065780633d86b13a1461031b57806341f434341461033b57600080fd5b8063095ea7b3116101b6578063095ea7b31461027757806316c38b3c1461028c57806318160ddd146102ac57806323b872dd146102d357600080fd5b806301ffc9a7146101e857806306fdde031461021d578063081812fc1461023f57600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611c14565b61061a565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023261066c565b6040516102149190611c81565b34801561024b57600080fd5b5061025f61025a366004611c94565b6106fe565b6040516001600160a01b039091168152602001610214565b61028a610285366004611cc2565b610742565b005b34801561029857600080fd5b5061028a6102a7366004611cfc565b6107e2565b3480156102b857600080fd5b5060015460005403600019015b604051908152602001610214565b61028a6102e1366004611d19565b6107fd565b3480156102f257600080fd5b50610208610301366004611da6565b610828565b34801561031257600080fd5b5061028a6108b9565b34801561032757600080fd5b506102c5610336366004611c94565b61093f565b34801561034757600080fd5b5061025f6daaeb6d7670e522a718067333cd4e81565b61028a61036b366004611d19565b610956565b34801561037c57600080fd5b5061039061038b366004611df2565b61097b565b6040516102149190611e71565b3480156103a957600080fd5b5061025f6103b8366004611c94565b610a47565b3480156103c957600080fd5b506102c56103d8366004611eb3565b610a52565b3480156103e957600080fd5b5061028a610aa1565b3480156103fe57600080fd5b5061041261040d366004611eb3565b610ab3565b6040516102149190611ed0565b34801561042b57600080fd5b506008546001600160a01b031661025f565b34801561044957600080fd5b50610232610bbc565b34801561045e57600080fd5b5061041261046d366004611f08565b610bcb565b34801561047e57600080fd5b5061028a61048d366004611f3d565b610d51565b61028a6104a0366004611f8c565b610dbd565b3480156104b157600080fd5b50600b546104d29060ff808216916101008104821691620100009091041683565b6040805193151584529115156020840152151590820152606001610214565b3480156104fd57600080fd5b5061051161050c366004611c94565b610dea565b604051610214919061206c565b61028a61052c366004611da6565b610e72565b34801561053d57600080fd5b5061023261054c366004611c94565b610f95565b34801561055d57600080fd5b5061020861056c366004611c94565b6110b7565b34801561057d57600080fd5b5061028a61058c366004611cfc565b611154565b34801561059d57600080fd5b5061028a6105ac366004611cfc565b611178565b3480156105bd57600080fd5b506102086105cc36600461207a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561060657600080fd5b5061028a610615366004611eb3565b61119a565b60006301ffc9a760e01b6001600160e01b03198316148061064b57506380ac58cd60e01b6001600160e01b03198316145b806106665750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461067b906120a8565b80601f01602080910402602001604051908101604052809291908181526020018280546106a7906120a8565b80156106f45780601f106106c9576101008083540402835291602001916106f4565b820191906000526020600020905b8154815290600101906020018083116106d757829003601f168201915b5050505050905090565b600061070982611213565b610726576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061074d82610a47565b9050336001600160a01b038216146107865761076981336105cc565b610786576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6107ea611248565b600b805460ff1916911515919091179055565b826001600160a01b038116331461081757610817336112a2565b61082284848461135b565b50505050565b600060018180805b878161ffff1610156108ab5761086187878361ffff16818110610855576108556120e2565b905060200201356114f0565b801561088f575061088d87878361ffff16818110610881576108816120e2565b905060200201356110b7565b155b915081801561089b5750835b9250819350806001019050610830565b5090925050505b9392505050565b6108c1611248565b6108c9611579565b604051600090734f590f2e40b27d06d8d5a7b8beaf0eaaed66b2489047908381818185875af1925050503d806000811461091f576040519150601f19603f3d011682016040523d82523d6000602084013e610924565b606091505b505090508061093257600080fd5b5061093d6001600955565b565b600c816003811061094f57600080fd5b0154905081565b826001600160a01b038116331461097057610970336112a2565b6108228484846115d2565b60608160008167ffffffffffffffff81111561099957610999611f76565b6040519080825280602002602001820160405280156109eb57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816109b75790505b50905060005b828114610a3e57610a19868683818110610a0d57610a0d6120e2565b90506020020135610dea565b828281518110610a2b57610a2b6120e2565b60209081029190910101526001016109f1565b50949350505050565b6000610666826115f2565b60006001600160a01b038216610a7b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610aa9611248565b61093d6000611661565b60606000806000610ac385610a52565b905060008167ffffffffffffffff811115610ae057610ae0611f76565b604051908082528060200260200182016040528015610b09578160200160208202803683370190505b509050610b3660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610bb057610b49816116b3565b91508160400151610ba85781516001600160a01b031615610b6957815194505b876001600160a01b0316856001600160a01b031603610ba85780838780600101985081518110610b9b57610b9b6120e2565b6020026020010181815250505b600101610b39565b50909695505050505050565b60606003805461067b906120a8565b6060818310610bed57604051631960ccad60e11b815260040160405180910390fd5b600080610bf960005490565b90506001851015610c0957600194505b80841115610c15578093505b6000610c2087610a52565b905084861015610c3f5785850381811015610c39578091505b50610c43565b5060005b60008167ffffffffffffffff811115610c5e57610c5e611f76565b604051908082528060200260200182016040528015610c87578160200160208202803683370190505b50905081600003610c9d5793506108b292505050565b6000610ca888610dea565b905060008160400151610cb9575080515b885b888114158015610ccb5750848714155b15610d4057610cd9816116b3565b92508260400151610d385782516001600160a01b031615610cf957825191505b8a6001600160a01b0316826001600160a01b031603610d385780848880600101995081518110610d2b57610d2b6120e2565b6020026020010181815250505b600101610cbb565b505050928352509095945050505050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b836001600160a01b0381163314610dd757610dd7336112a2565b610de3858585856116ef565b5050505050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080610e4357506000548310155b15610e4e5792915050565b610e57836116b3565b9050806040015115610e695792915050565b6108b283611733565b600b5483908390839060ff1615610e9c5760405163ab35696f60e01b815260040160405180910390fd5b828114610ebc576040516370d6ad6360e11b815260040160405180910390fd5b610ec7838383610828565b610ee457604051632b7f942160e01b815260040160405180910390fd5b61028a83610ef56000546000190190565b610eff919061210e565b1115610f1e5760405163d05cb60960e01b815260040160405180910390fd5b600b54610100900460ff16610f4657604051633167946760e21b815260040160405180910390fd5b60005b868161ffff161015610f8257610f7a86868361ffff16818110610f6e57610f6e6120e2565b90506020020135611768565b600101610f49565b50610f8d33876117e2565b505050505050565b6060610fa082611213565b6110095760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b600b5462010000900460ff16151560000361103d5760405180608001604052806054815260200161220c6054913992915050565b60006110476118e0565b9050600081511161106757604051806020016040528060008152506108b2565b8061107184611900565b60405180604001604052806005815260200164173539b7b760d91b8152506040516020016110a193929190612121565b6040516020818303038152906040529392505050565b600080600061010084116110d057506000905082611142565b61010184101580156110e457506102008411155b1561110057600191506110f961010085612164565b9050611142565b6102018410158015611114575061028a8411155b1561112957600291506110f961020085612164565b60405163eb66d7f960e01b815260040160405180910390fd5b61114c8282611993565b949350505050565b61115c611248565b600b8054911515620100000262ff000019909216919091179055565b611180611248565b600b80549115156101000261ff0019909216919091179055565b6111a2611248565b6001600160a01b0381166112075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611000565b61121081611661565b50565b600081600111158015611227575060005482105b8015610666575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b0316331461093d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611000565b6daaeb6d7670e522a718067333cd4e3b1561121057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561130f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113339190612177565b61121057604051633b79c77360e21b81526001600160a01b0382166004820152602401611000565b6000611366826115f2565b9050836001600160a01b0316816001600160a01b0316146113995760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176113e6576113c986336105cc565b6113e657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661140d57604051633a954ecd60e21b815260040160405180910390fd5b801561141857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036114aa576001840160008181526004602052604081205490036114a85760005481146114a85760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610f8d565b600a546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e9190612194565b6001600160a01b0316336001600160a01b0316149050919050565b6002600954036115cb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611000565b6002600955565b6115ed83838360405180602001604052806000815250610dbd565b505050565b60008180600111611648576000548110156116485760008181526004602052604081205490600160e01b82169003611646575b806000036108b2575060001901600081815260046020526040902054611625565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610666906119ba565b6116fa8484846107fd565b6001600160a01b0383163b156108225761171684848484611a02565b610822576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610666611763836115f2565b6119ba565b600080610100831161177f575060009050816117d8565b610101831015801561179357506102008311155b156117af57600191506117a861010084612164565b90506117d8565b61020183101580156117c3575061028a8311155b1561112957600291506117a861020084612164565b6115ed8282611aed565b60008054908290036118075760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146118b657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161187e565b50816000036118d757604051622e076360e81b815260040160405180910390fd5b60005550505050565b606060405180608001604052806049815260200161226060499139905090565b6060600061190d83611b26565b600101905060008167ffffffffffffffff81111561192d5761192d611f76565b6040519080825280601f01601f191660200182016040528015611957576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461196157509392505050565b6000806001831b600c85600381106119ad576119ad6120e2565b0154161515949350505050565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611a379033908990889088906004016121b1565b6020604051808303816000875af1925050508015611a72575060408051601f3d908101601f19168201909252611a6f918101906121ee565b60015b611ad0573d808015611aa0576040519150601f19603f3d011682016040523d82523d6000602084013e611aa5565b606091505b508051600003611ac8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60006001821b600c8460038110611b0657611b066120e2565b015417905080600c8460038110611b1f57611b1f6120e2565b0155505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611b655772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611b91576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611baf57662386f26fc10000830492506010015b6305f5e1008310611bc7576305f5e100830492506008015b6127108310611bdb57612710830492506004015b60648310611bed576064830492506002015b600a83106106665760010192915050565b6001600160e01b03198116811461121057600080fd5b600060208284031215611c2657600080fd5b81356108b281611bfe565b60005b83811015611c4c578181015183820152602001611c34565b50506000910152565b60008151808452611c6d816020860160208601611c31565b601f01601f19169290920160200192915050565b6020815260006108b26020830184611c55565b600060208284031215611ca657600080fd5b5035919050565b6001600160a01b038116811461121057600080fd5b60008060408385031215611cd557600080fd5b8235611ce081611cad565b946020939093013593505050565b801515811461121057600080fd5b600060208284031215611d0e57600080fd5b81356108b281611cee565b600080600060608486031215611d2e57600080fd5b8335611d3981611cad565b92506020840135611d4981611cad565b929592945050506040919091013590565b60008083601f840112611d6c57600080fd5b50813567ffffffffffffffff811115611d8457600080fd5b6020830191508360208260051b8501011115611d9f57600080fd5b9250929050565b600080600060408486031215611dbb57600080fd5b83359250602084013567ffffffffffffffff811115611dd957600080fd5b611de586828701611d5a565b9497909650939450505050565b60008060208385031215611e0557600080fd5b823567ffffffffffffffff811115611e1c57600080fd5b611e2885828601611d5a565b90969095509350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610bb057611ea0838551611e34565b9284019260809290920191600101611e8d565b600060208284031215611ec557600080fd5b81356108b281611cad565b6020808252825182820181905260009190848201906040850190845b81811015610bb057835183529284019291840191600101611eec565b600080600060608486031215611f1d57600080fd5b8335611f2881611cad565b95602085013595506040909401359392505050565b60008060408385031215611f5057600080fd5b8235611f5b81611cad565b91506020830135611f6b81611cee565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611fa257600080fd5b8435611fad81611cad565b93506020850135611fbd81611cad565b925060408501359150606085013567ffffffffffffffff80821115611fe157600080fd5b818701915087601f830112611ff557600080fd5b81358181111561200757612007611f76565b604051601f8201601f19908116603f0116810190838211818310171561202f5761202f611f76565b816040528281528a602084870101111561204857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b608081016106668284611e34565b6000806040838503121561208d57600080fd5b823561209881611cad565b91506020830135611f6b81611cad565b600181811c908216806120bc57607f821691505b6020821081036120dc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610666576106666120f8565b60008451612133818460208901611c31565b845190830190612147818360208901611c31565b845191019061215a818360208801611c31565b0195945050505050565b81810381811115610666576106666120f8565b60006020828403121561218957600080fd5b81516108b281611cee565b6000602082840312156121a657600080fd5b81516108b281611cad565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906121e490830184611c55565b9695505050505050565b60006020828403121561220057600080fd5b81516108b281611bfe56fe68747470733a2f2f6d6574617a6575732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d6574617a6575735f67656e657369732f6d657461646174612f68696464656e2e6a736f6e68747470733a2f2f6d6574617a6575732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d6574617a6575735f67656e657369732f6d657461646174612fa26469706673582212200be22b656004a1b24dc449260c576ce9701c44d27c1c7d5994fb212c1759f75b64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101dc5760003560e01c8063715018a611610102578063c23dc68f11610095578063e0a8085311610064578063e0a8085314610571578063e2e06fa314610591578063e985e9c5146105b1578063f2fde38b146105fa57600080fd5b8063c23dc68f146104f1578063c75bbe211461051e578063c87b56dd14610531578063d4629c151461055157600080fd5b806399a2557a116100d157806399a2557a14610452578063a22cb46514610472578063b88d4fde14610492578063c19d93fb146104a557600080fd5b8063715018a6146103dd5780638462151c146103f25780638da5cb5b1461041f57806395d89b411461043d57600080fd5b8063289653d91161017a57806342842e0e1161014957806342842e0e1461035d5780635bbb2177146103705780636352211e1461039d57806370a08231146103bd57600080fd5b8063289653d9146102e65780633ccfd60b146103065780633d86b13a1461031b57806341f434341461033b57600080fd5b8063095ea7b3116101b6578063095ea7b31461027757806316c38b3c1461028c57806318160ddd146102ac57806323b872dd146102d357600080fd5b806301ffc9a7146101e857806306fdde031461021d578063081812fc1461023f57600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611c14565b61061a565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023261066c565b6040516102149190611c81565b34801561024b57600080fd5b5061025f61025a366004611c94565b6106fe565b6040516001600160a01b039091168152602001610214565b61028a610285366004611cc2565b610742565b005b34801561029857600080fd5b5061028a6102a7366004611cfc565b6107e2565b3480156102b857600080fd5b5060015460005403600019015b604051908152602001610214565b61028a6102e1366004611d19565b6107fd565b3480156102f257600080fd5b50610208610301366004611da6565b610828565b34801561031257600080fd5b5061028a6108b9565b34801561032757600080fd5b506102c5610336366004611c94565b61093f565b34801561034757600080fd5b5061025f6daaeb6d7670e522a718067333cd4e81565b61028a61036b366004611d19565b610956565b34801561037c57600080fd5b5061039061038b366004611df2565b61097b565b6040516102149190611e71565b3480156103a957600080fd5b5061025f6103b8366004611c94565b610a47565b3480156103c957600080fd5b506102c56103d8366004611eb3565b610a52565b3480156103e957600080fd5b5061028a610aa1565b3480156103fe57600080fd5b5061041261040d366004611eb3565b610ab3565b6040516102149190611ed0565b34801561042b57600080fd5b506008546001600160a01b031661025f565b34801561044957600080fd5b50610232610bbc565b34801561045e57600080fd5b5061041261046d366004611f08565b610bcb565b34801561047e57600080fd5b5061028a61048d366004611f3d565b610d51565b61028a6104a0366004611f8c565b610dbd565b3480156104b157600080fd5b50600b546104d29060ff808216916101008104821691620100009091041683565b6040805193151584529115156020840152151590820152606001610214565b3480156104fd57600080fd5b5061051161050c366004611c94565b610dea565b604051610214919061206c565b61028a61052c366004611da6565b610e72565b34801561053d57600080fd5b5061023261054c366004611c94565b610f95565b34801561055d57600080fd5b5061020861056c366004611c94565b6110b7565b34801561057d57600080fd5b5061028a61058c366004611cfc565b611154565b34801561059d57600080fd5b5061028a6105ac366004611cfc565b611178565b3480156105bd57600080fd5b506102086105cc36600461207a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561060657600080fd5b5061028a610615366004611eb3565b61119a565b60006301ffc9a760e01b6001600160e01b03198316148061064b57506380ac58cd60e01b6001600160e01b03198316145b806106665750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461067b906120a8565b80601f01602080910402602001604051908101604052809291908181526020018280546106a7906120a8565b80156106f45780601f106106c9576101008083540402835291602001916106f4565b820191906000526020600020905b8154815290600101906020018083116106d757829003601f168201915b5050505050905090565b600061070982611213565b610726576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061074d82610a47565b9050336001600160a01b038216146107865761076981336105cc565b610786576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6107ea611248565b600b805460ff1916911515919091179055565b826001600160a01b038116331461081757610817336112a2565b61082284848461135b565b50505050565b600060018180805b878161ffff1610156108ab5761086187878361ffff16818110610855576108556120e2565b905060200201356114f0565b801561088f575061088d87878361ffff16818110610881576108816120e2565b905060200201356110b7565b155b915081801561089b5750835b9250819350806001019050610830565b5090925050505b9392505050565b6108c1611248565b6108c9611579565b604051600090734f590f2e40b27d06d8d5a7b8beaf0eaaed66b2489047908381818185875af1925050503d806000811461091f576040519150601f19603f3d011682016040523d82523d6000602084013e610924565b606091505b505090508061093257600080fd5b5061093d6001600955565b565b600c816003811061094f57600080fd5b0154905081565b826001600160a01b038116331461097057610970336112a2565b6108228484846115d2565b60608160008167ffffffffffffffff81111561099957610999611f76565b6040519080825280602002602001820160405280156109eb57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816109b75790505b50905060005b828114610a3e57610a19868683818110610a0d57610a0d6120e2565b90506020020135610dea565b828281518110610a2b57610a2b6120e2565b60209081029190910101526001016109f1565b50949350505050565b6000610666826115f2565b60006001600160a01b038216610a7b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610aa9611248565b61093d6000611661565b60606000806000610ac385610a52565b905060008167ffffffffffffffff811115610ae057610ae0611f76565b604051908082528060200260200182016040528015610b09578160200160208202803683370190505b509050610b3660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610bb057610b49816116b3565b91508160400151610ba85781516001600160a01b031615610b6957815194505b876001600160a01b0316856001600160a01b031603610ba85780838780600101985081518110610b9b57610b9b6120e2565b6020026020010181815250505b600101610b39565b50909695505050505050565b60606003805461067b906120a8565b6060818310610bed57604051631960ccad60e11b815260040160405180910390fd5b600080610bf960005490565b90506001851015610c0957600194505b80841115610c15578093505b6000610c2087610a52565b905084861015610c3f5785850381811015610c39578091505b50610c43565b5060005b60008167ffffffffffffffff811115610c5e57610c5e611f76565b604051908082528060200260200182016040528015610c87578160200160208202803683370190505b50905081600003610c9d5793506108b292505050565b6000610ca888610dea565b905060008160400151610cb9575080515b885b888114158015610ccb5750848714155b15610d4057610cd9816116b3565b92508260400151610d385782516001600160a01b031615610cf957825191505b8a6001600160a01b0316826001600160a01b031603610d385780848880600101995081518110610d2b57610d2b6120e2565b6020026020010181815250505b600101610cbb565b505050928352509095945050505050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b836001600160a01b0381163314610dd757610dd7336112a2565b610de3858585856116ef565b5050505050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805160808101825260008082526020820181905291810182905260608101919091526001831080610e4357506000548310155b15610e4e5792915050565b610e57836116b3565b9050806040015115610e695792915050565b6108b283611733565b600b5483908390839060ff1615610e9c5760405163ab35696f60e01b815260040160405180910390fd5b828114610ebc576040516370d6ad6360e11b815260040160405180910390fd5b610ec7838383610828565b610ee457604051632b7f942160e01b815260040160405180910390fd5b61028a83610ef56000546000190190565b610eff919061210e565b1115610f1e5760405163d05cb60960e01b815260040160405180910390fd5b600b54610100900460ff16610f4657604051633167946760e21b815260040160405180910390fd5b60005b868161ffff161015610f8257610f7a86868361ffff16818110610f6e57610f6e6120e2565b90506020020135611768565b600101610f49565b50610f8d33876117e2565b505050505050565b6060610fa082611213565b6110095760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b600b5462010000900460ff16151560000361103d5760405180608001604052806054815260200161220c6054913992915050565b60006110476118e0565b9050600081511161106757604051806020016040528060008152506108b2565b8061107184611900565b60405180604001604052806005815260200164173539b7b760d91b8152506040516020016110a193929190612121565b6040516020818303038152906040529392505050565b600080600061010084116110d057506000905082611142565b61010184101580156110e457506102008411155b1561110057600191506110f961010085612164565b9050611142565b6102018410158015611114575061028a8411155b1561112957600291506110f961020085612164565b60405163eb66d7f960e01b815260040160405180910390fd5b61114c8282611993565b949350505050565b61115c611248565b600b8054911515620100000262ff000019909216919091179055565b611180611248565b600b80549115156101000261ff0019909216919091179055565b6111a2611248565b6001600160a01b0381166112075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611000565b61121081611661565b50565b600081600111158015611227575060005482105b8015610666575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b0316331461093d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611000565b6daaeb6d7670e522a718067333cd4e3b1561121057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561130f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113339190612177565b61121057604051633b79c77360e21b81526001600160a01b0382166004820152602401611000565b6000611366826115f2565b9050836001600160a01b0316816001600160a01b0316146113995760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176113e6576113c986336105cc565b6113e657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661140d57604051633a954ecd60e21b815260040160405180910390fd5b801561141857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036114aa576001840160008181526004602052604081205490036114a85760005481146114a85760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610f8d565b600a546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e9190612194565b6001600160a01b0316336001600160a01b0316149050919050565b6002600954036115cb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611000565b6002600955565b6115ed83838360405180602001604052806000815250610dbd565b505050565b60008180600111611648576000548110156116485760008181526004602052604081205490600160e01b82169003611646575b806000036108b2575060001901600081815260046020526040902054611625565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610666906119ba565b6116fa8484846107fd565b6001600160a01b0383163b156108225761171684848484611a02565b610822576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610666611763836115f2565b6119ba565b600080610100831161177f575060009050816117d8565b610101831015801561179357506102008311155b156117af57600191506117a861010084612164565b90506117d8565b61020183101580156117c3575061028a8311155b1561112957600291506117a861020084612164565b6115ed8282611aed565b60008054908290036118075760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146118b657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161187e565b50816000036118d757604051622e076360e81b815260040160405180910390fd5b60005550505050565b606060405180608001604052806049815260200161226060499139905090565b6060600061190d83611b26565b600101905060008167ffffffffffffffff81111561192d5761192d611f76565b6040519080825280601f01601f191660200182016040528015611957576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461196157509392505050565b6000806001831b600c85600381106119ad576119ad6120e2565b0154161515949350505050565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611a379033908990889088906004016121b1565b6020604051808303816000875af1925050508015611a72575060408051601f3d908101601f19168201909252611a6f918101906121ee565b60015b611ad0573d808015611aa0576040519150601f19603f3d011682016040523d82523d6000602084013e611aa5565b606091505b508051600003611ac8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60006001821b600c8460038110611b0657611b066120e2565b015417905080600c8460038110611b1f57611b1f6120e2565b0155505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611b655772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611b91576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611baf57662386f26fc10000830492506010015b6305f5e1008310611bc7576305f5e100830492506008015b6127108310611bdb57612710830492506004015b60648310611bed576064830492506002015b600a83106106665760010192915050565b6001600160e01b03198116811461121057600080fd5b600060208284031215611c2657600080fd5b81356108b281611bfe565b60005b83811015611c4c578181015183820152602001611c34565b50506000910152565b60008151808452611c6d816020860160208601611c31565b601f01601f19169290920160200192915050565b6020815260006108b26020830184611c55565b600060208284031215611ca657600080fd5b5035919050565b6001600160a01b038116811461121057600080fd5b60008060408385031215611cd557600080fd5b8235611ce081611cad565b946020939093013593505050565b801515811461121057600080fd5b600060208284031215611d0e57600080fd5b81356108b281611cee565b600080600060608486031215611d2e57600080fd5b8335611d3981611cad565b92506020840135611d4981611cad565b929592945050506040919091013590565b60008083601f840112611d6c57600080fd5b50813567ffffffffffffffff811115611d8457600080fd5b6020830191508360208260051b8501011115611d9f57600080fd5b9250929050565b600080600060408486031215611dbb57600080fd5b83359250602084013567ffffffffffffffff811115611dd957600080fd5b611de586828701611d5a565b9497909650939450505050565b60008060208385031215611e0557600080fd5b823567ffffffffffffffff811115611e1c57600080fd5b611e2885828601611d5a565b90969095509350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610bb057611ea0838551611e34565b9284019260809290920191600101611e8d565b600060208284031215611ec557600080fd5b81356108b281611cad565b6020808252825182820181905260009190848201906040850190845b81811015610bb057835183529284019291840191600101611eec565b600080600060608486031215611f1d57600080fd5b8335611f2881611cad565b95602085013595506040909401359392505050565b60008060408385031215611f5057600080fd5b8235611f5b81611cad565b91506020830135611f6b81611cee565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611fa257600080fd5b8435611fad81611cad565b93506020850135611fbd81611cad565b925060408501359150606085013567ffffffffffffffff80821115611fe157600080fd5b818701915087601f830112611ff557600080fd5b81358181111561200757612007611f76565b604051601f8201601f19908116603f0116810190838211818310171561202f5761202f611f76565b816040528281528a602084870101111561204857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b608081016106668284611e34565b6000806040838503121561208d57600080fd5b823561209881611cad565b91506020830135611f6b81611cad565b600181811c908216806120bc57607f821691505b6020821081036120dc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610666576106666120f8565b60008451612133818460208901611c31565b845190830190612147818360208901611c31565b845191019061215a818360208801611c31565b0195945050505050565b81810381811115610666576106666120f8565b60006020828403121561218957600080fd5b81516108b281611cee565b6000602082840312156121a657600080fd5b81516108b281611cad565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906121e490830184611c55565b9695505050505050565b60006020828403121561220057600080fd5b81516108b281611bfe56fe68747470733a2f2f6d6574617a6575732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d6574617a6575735f67656e657369732f6d657461646174612f68696464656e2e6a736f6e68747470733a2f2f6d6574617a6575732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d6574617a6575735f67656e657369732f6d657461646174612fa26469706673582212200be22b656004a1b24dc449260c576ce9701c44d27c1c7d5994fb212c1759f75b64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _state (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
432:6723:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9155:630:20;;;;;;;;;;-1:-1:-1;9155:630:20;;;;;:::i;:::-;;:::i;:::-;;;565:14:27;;558:22;540:41;;528:2;513:18;9155:630:20;;;;;;;;10039:98;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;16360:214::-;;;;;;;;;;-1:-1:-1;16360:214:20;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1697:32:27;;;1679:51;;1667:2;1652:18;16360:214:20;1533:203:27;15812:398:20;;;;;;:::i;:::-;;:::i;:::-;;4354:87:17;;;;;;;;;;-1:-1:-1;4354:87:17;;;;;:::i;:::-;;:::i;5894:317:20:-;;;;;;;;;;-1:-1:-1;3652:1:17;6164:12:20;5955:7;6148:13;:28;-1:-1:-1;;6148:46:20;5894:317;;;2712:25:27;;;2700:2;2685:18;5894:317:20;2566:177:27;6274:218:17;;;;;;:::i;:::-;;:::i;2910:519::-;;;;;;;;;;-1:-1:-1;2910:519:17;;;;;:::i;:::-;;:::i;6995:158::-;;;;;;;;;;;;;:::i;1537:26::-;;;;;;;;;;-1:-1:-1;1537:26:17;;;;;:::i;:::-;;:::i;737:142:26:-;;;;;;;;;;;;836:42;737:142;;6498:226:17;;;;;;:::i;:::-;;:::i;1641:513:22:-;;;;;;;;;;-1:-1:-1;1641:513:22;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;11391:150:20:-;;;;;;;;;;-1:-1:-1;11391:150:20;;;;;:::i;:::-;;:::i;7045:230::-;;;;;;;;;;-1:-1:-1;7045:230:20;;;;;:::i;:::-;;:::i;1831:101:0:-;;;;;;;;;;;;;:::i;5417:879:22:-;;;;;;;;;;-1:-1:-1;5417:879:22;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1201:85:0:-;;;;;;;;;;-1:-1:-1;1273:6:0;;-1:-1:-1;;;;;1273:6:0;1201:85;;10208:102:20;;;;;;;;;;;;;:::i;2528:2454:22:-;;;;;;;;;;-1:-1:-1;2528:2454:22;;;;;:::i;:::-;;:::i;16901:231:20:-;;;;;;;;;;-1:-1:-1;16901:231:20;;;;;:::i;:::-;;:::i;6730:259:17:-;;;;;;:::i;:::-;;:::i;1511:19::-;;;;;;;;;;-1:-1:-1;1511:19:17;;;;;;;;;;;;;;;;;;;;;;;;;;9132:14:27;;9125:22;9107:41;;9191:14;;9184:22;9179:2;9164:18;;9157:50;9250:14;9243:22;9223:18;;;9216:50;9095:2;9080:18;1511:19:17;8923:349:27;1070:418:22;;;;;;;;;;-1:-1:-1;1070:418:22;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2497:343:17:-;;;;;;:::i;:::-;;:::i;3666:485::-;;;;;;;;;;-1:-1:-1;3666:485:17;;;;;:::i;:::-;;:::i;5404:563::-;;;;;;;;;;-1:-1:-1;5404:563:17;;;;;:::i;:::-;;:::i;4561:91::-;;;;;;;;;;-1:-1:-1;4561:91:17;;;;;:::i;:::-;;:::i;4447:108::-;;;;;;;;;;-1:-1:-1;4447:108:17;;;;;:::i;:::-;;:::i;17282:162:20:-;;;;;;;;;;-1:-1:-1;17282:162:20;;;;;:::i;:::-;-1:-1:-1;;;;;17402:25:20;;;17379:4;17402:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;17282:162;2081:198:0;;;;;;;;;;-1:-1:-1;2081:198:0;;;;;:::i;:::-;;:::i;9155:630:20:-;9240:4;-1:-1:-1;;;;;;;;;9558:25:20;;;;:101;;-1:-1:-1;;;;;;;;;;9634:25:20;;;9558:101;:177;;;-1:-1:-1;;;;;;;;;;9710:25:20;;;9558:177;9539:196;9155:630;-1:-1:-1;;9155:630:20:o;10039:98::-;10093:13;10125:5;10118:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10039:98;:::o;16360:214::-;16436:7;16460:16;16468:7;16460;:16::i;:::-;16455:64;;16485:34;;-1:-1:-1;;;16485:34:20;;;;;;;;;;;16455:64;-1:-1:-1;16537:24:20;;;;:15;:24;;;;;:30;-1:-1:-1;;;;;16537:30:20;;16360:214::o;15812:398::-;15900:13;15916:16;15924:7;15916;:16::i;:::-;15900:32;-1:-1:-1;39523:10:20;-1:-1:-1;;;;;15947:28:20;;;15943:172;;15994:44;16011:5;39523:10;17282:162;:::i;15994:44::-;15989:126;;16065:35;;-1:-1:-1;;;16065:35:20;;;;;;;;;;;15989:126;16125:24;;;;:15;:24;;;;;;:35;;-1:-1:-1;;;;;;16125:35:20;-1:-1:-1;;;;;16125:35:20;;;;;;;;;16175:28;;16125:24;;16175:28;;;;;;;15890:320;15812:398;;:::o;4354:87:17:-;1094:13:0;:11;:13::i;:::-;4413:5:17::1;:21:::0;;-1:-1:-1;;4413:21:17::1;::::0;::::1;;::::0;;;::::1;::::0;;4354:87::o;6274:218::-;6432:4;-1:-1:-1;;;;;2054:18:26;;2062:10;2054:18;2050:81;;2088:32;2109:10;2088:20;:32::i;:::-;6448:37:17::1;6467:4;6473:2;6477:7;6448:18;:37::i;:::-;6274:218:::0;;;;:::o;2910:519::-;3038:4;3069;3038;;;3141:255;3164:11;3160:1;:15;;;3141:255;;;3206:21;3216:7;;3224:1;3216:10;;;;;;;;;:::i;:::-;;;;;;;3206:9;:21::i;:::-;:50;;;;;3232:24;3245:7;;3253:1;3245:10;;;;;;;;;:::i;:::-;;;;;;;3232:12;:24::i;:::-;3231:25;3206:50;3193:63;;3283:10;:21;;;;;3297:7;3283:21;3271:33;;3328:10;3318:20;;3372:3;;;;;3141:255;;;-1:-1:-1;3413:9:17;;-1:-1:-1;;;2910:519:17;;;;;;:::o;6995:158::-;1094:13:0;:11;:13::i;:::-;2261:21:1::1;:19;:21::i;:::-;7069:56:17::2;::::0;7056:7:::2;::::0;892:42:::2;::::0;7099:21:::2;::::0;7056:7;7069:56;7056:7;7069:56;7099:21;892:42;7069:56:::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7055:70;;;7143:2;7135:11;;;::::0;::::2;;7045:108;2303:20:1::1;1716:1:::0;2809:7;:22;2629:209;2303:20:::1;6995:158:17:o:0;1537:26::-;;;;;;;;;;;;;;;-1:-1:-1;1537:26:17;:::o;6498:226::-;6660:4;-1:-1:-1;;;;;2054:18:26;;2062:10;2054:18;2050:81;;2088:32;2109:10;2088:20;:32::i;:::-;6676:41:17::1;6699:4;6705:2;6709:7;6676:22;:41::i;1641:513:22:-:0;1780:23;1868:8;1843:22;1868:8;1934:36;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1934:36:22;;-1:-1:-1;;1934:36:22;;;;;;;;;;;;1897:73;;1989:9;1984:123;2005:14;2000:1;:19;1984:123;;2060:32;2080:8;;2089:1;2080:11;;;;;;;:::i;:::-;;;;;;;2060:19;:32::i;:::-;2044:10;2055:1;2044:13;;;;;;;;:::i;:::-;;;;;;;;;;:48;2021:3;;1984:123;;;-1:-1:-1;2127:10:22;1641:513;-1:-1:-1;;;;1641:513:22:o;11391:150:20:-;11463:7;11505:27;11524:7;11505:18;:27::i;7045:230::-;7117:7;-1:-1:-1;;;;;7140:19:20;;7136:60;;7168:28;;-1:-1:-1;;;7168:28:20;;;;;;;;;;;7136:60;-1:-1:-1;;;;;;7213:25:20;;;;;:18;:25;;;;;;1360:13;7213:55;;7045:230::o;1831:101:0:-;1094:13;:11;:13::i;:::-;1895:30:::1;1922:1;1895:18;:30::i;5417:879:22:-:0;5495:16;5547:19;5580:25;5619:22;5644:16;5654:5;5644:9;:16::i;:::-;5619:41;;5674:25;5716:14;5702:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5702:29:22;;5674:57;;5745:31;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5745:31:22;3652:1:17;5790:461:22;5839:14;5824:11;:29;5790:461;;5890:15;5903:1;5890:12;:15::i;:::-;5878:27;;5927:9;:16;;;5967:8;5923:71;6015:14;;-1:-1:-1;;;;;6015:28:22;;6011:109;;6087:14;;;-1:-1:-1;6011:109:22;6162:5;-1:-1:-1;;;;;6141:26:22;:17;-1:-1:-1;;;;;6141:26:22;;6137:100;;6217:1;6191:8;6200:13;;;;;;6191:23;;;;;;;;:::i;:::-;;;;;;:27;;;;;6137:100;5855:3;;5790:461;;;-1:-1:-1;6271:8:22;;5417:879;-1:-1:-1;;;;;;5417:879:22:o;10208:102:20:-;10264:13;10296:7;10289:14;;;;;:::i;2528:2454:22:-;2667:16;2732:4;2723:5;:13;2719:45;;2745:19;;-1:-1:-1;;;2745:19:22;;;;;;;;;;;2719:45;2778:19;2811:17;2831:14;5645:7:20;5671:13;;5590:101;2831:14:22;2811:34;-1:-1:-1;3652:1:17;2921:5:22;:23;2917:85;;;3652:1:17;2964:23:22;;2917:85;3076:9;3069:4;:16;3065:71;;;3112:9;3105:16;;3065:71;3149:25;3177:16;3187:5;3177:9;:16::i;:::-;3149:44;;3368:4;3360:5;:12;3356:271;;;3414:12;;;3448:31;;;3444:109;;;3523:11;3503:31;;3444:109;3374:193;3356:271;;;-1:-1:-1;3611:1:22;3356:271;3640:25;3682:17;3668:32;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3668:32:22;;3640:60;;3718:17;3739:1;3718:22;3714:76;;3767:8;-1:-1:-1;3760:15:22;;-1:-1:-1;;;3760:15:22;3714:76;3931:31;3965:26;3985:5;3965:19;:26::i;:::-;3931:60;;4005:25;4247:9;:16;;;4242:90;;-1:-1:-1;4303:14:22;;4242:90;4362:5;4345:467;4374:4;4369:1;:9;;:45;;;;;4397:17;4382:11;:32;;4369:45;4345:467;;;4451:15;4464:1;4451:12;:15::i;:::-;4439:27;;4488:9;:16;;;4528:8;4484:71;4576:14;;-1:-1:-1;;;;;4576:28:22;;4572:109;;4648:14;;;-1:-1:-1;4572:109:22;4723:5;-1:-1:-1;;;;;4702:26:22;:17;-1:-1:-1;;;;;4702:26:22;;4698:100;;4778:1;4752:8;4761:13;;;;;;4752:23;;;;;;;;:::i;:::-;;;;;;:27;;;;;4698:100;4416:3;;4345:467;;;-1:-1:-1;;;4894:29:22;;;-1:-1:-1;4894:29:22;;2528:2454;-1:-1:-1;;;;;2528:2454:22:o;16901:231:20:-;39523:10;16995:39;;;;:18;:39;;;;;;;;-1:-1:-1;;;;;16995:49:20;;;;;;;;;;;;:60;;-1:-1:-1;;16995:60:20;;;;;;;;;;17070:55;;540:41:27;;;16995:49:20;;39523:10;17070:55;;513:18:27;17070:55:20;;;;;;;16901:231;;:::o;6730:259:17:-;6919:4;-1:-1:-1;;;;;2054:18:26;;2062:10;2054:18;2050:81;;2088:32;2109:10;2088:20;:32::i;:::-;6935:47:17::1;6958:4;6964:2;6968:7;6977:4;6935:22;:47::i;:::-;6730:259:::0;;;;;:::o;1070:418:22:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3652:1:17;1232:7:22;:25;:54;;;-1:-1:-1;5645:7:20;5671:13;1261:7:22;:25;;1232:54;1228:101;;;1309:9;1070:418;-1:-1:-1;;1070:418:22:o;1228:101::-;1350:21;1363:7;1350:12;:21::i;:::-;1338:33;;1385:9;:16;;;1381:63;;;1424:9;1070:418;-1:-1:-1;;1070:418:22:o;1381:63::-;1460:21;1473:7;1460:12;:21::i;2497:343:17:-;1977:5;:12;2624:11;;2637:7;;;;1977:12;;1973:41;;;1998:16;;-1:-1:-1;;;1998:16:17;;;;;;;;;;;1973:41;2030:29;;;2024:60;;2069:15;;-1:-1:-1;;;2069:15:17;;;;;;;;;;;2024:60;2100:48;2127:11;2140:7;;2100:26;:48::i;:::-;2095:94;;2169:20;;-1:-1:-1;;;2169:20:17;;;;;;;;;;;2095:94;1071:3;2220:11;2203:14;6359:7:20;6546:13;-1:-1:-1;;6546:31:20;;6304:290;2203:14:17;:28;;;;:::i;:::-;:42;2199:85;;;2266:18;;-1:-1:-1;;;2266:18:17;;;;;;;;;;;2199:85;2299:5;:23;;;;;;2294:57;;2331:20;;-1:-1:-1;;;2331:20:17;;;;;;;;;;;2294:57;2661:8:::1;2656:135;2679:11;2675:1;:15;;;2656:135;;;2708:24;2721:7;;2729:1;2721:10;;;;;;;;;:::i;:::-;;;;;;;2708:12;:24::i;:::-;2767:3;;2656:135;;;-1:-1:-1::0;2801:32:17::1;39523:10:20::0;2821:11:17::1;2801:5;:32::i;:::-;2497:343:::0;;;;;;:::o;3666:485::-;3759:13;3792:17;3800:8;3792:7;:17::i;:::-;3784:77;;;;-1:-1:-1;;;3784:77:17;;11134:2:27;3784:77:17;;;11116:21:27;11173:2;11153:18;;;11146:30;11212:34;11192:18;;;11185:62;-1:-1:-1;;;11263:18:27;;;11256:45;11318:19;;3784:77:17;;;;;;;;;3875:5;:14;;;;;;:23;;:14;:23;3871:78;;3921:17;;;;;;;;;;;;;;;;;3914:24;3666:485;-1:-1:-1;;3666:485:17:o;3871:78::-;3958:28;3989:10;:8;:10::i;:::-;3958:41;;4047:1;4022:14;4016:28;:32;:128;;;;;;;;;;;;;;;;;4083:14;4099:19;:8;:17;:19::i;:::-;4120:9;;;;;;;;;;;;;-1:-1:-1;;;4120:9:17;;;4066:64;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4009:135;3666:485;-1:-1:-1;;;3666:485:17:o;5404:563::-;5459:4;5475:19;5504:22;5547:3;5541:2;:9;5537:365;;-1:-1:-1;5580:1:17;;-1:-1:-1;5612:2:17;5537:365;;;5641:3;5635:2;:9;;:22;;;;;5654:3;5648:2;:9;;5635:22;5631:271;;;5687:1;;-1:-1:-1;5719:8:17;5724:3;5719:2;:8;:::i;:::-;5702:25;;5631:271;;;5754:3;5748:2;:9;;:22;;;;;5767:3;5761:2;:9;;5748:22;5744:158;;;5800:1;;-1:-1:-1;5832:8:17;5837:3;5832:2;:8;:::i;5744:158::-;5878:13;;-1:-1:-1;;;5878:13:17;;;;;;;;;;;5744:158;5919:41;5932:11;5945:14;5919:12;:41::i;:::-;5912:48;5404:563;-1:-1:-1;;;;5404:563:17:o;4561:91::-;1094:13:0;:11;:13::i;:::-;4622:5:17::1;:23:::0;;;::::1;;::::0;::::1;-1:-1:-1::0;;4622:23:17;;::::1;::::0;;;::::1;::::0;;4561:91::o;4447:108::-;1094:13:0;:11;:13::i;:::-;4516:5:17::1;:32:::0;;;::::1;;;;-1:-1:-1::0;;4516:32:17;;::::1;::::0;;;::::1;::::0;;4447:108::o;2081:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2169:22:0;::::1;2161:73;;;::::0;-1:-1:-1;;;2161:73:0;;12391:2:27;2161:73:0::1;::::0;::::1;12373:21:27::0;12430:2;12410:18;;;12403:30;12469:34;12449:18;;;12442:62;-1:-1:-1;;;12520:18:27;;;12513:36;12566:19;;2161:73:0::1;12189:402:27::0;2161:73:0::1;2244:28;2263:8;2244:18;:28::i;:::-;2081:198:::0;:::o;17693:277:20:-;17758:4;17812:7;3652:1:17;17793:26:20;;:65;;;;;17845:13;;17835:7;:23;17793:65;:151;;;;-1:-1:-1;;17895:26:20;;;;:17;:26;;;;;;-1:-1:-1;;;17895:44:20;:49;;17693:277::o;1359:130:0:-;1273:6;;-1:-1:-1;;;;;1273:6:0;39523:10:20;1422:23:0;1414:68;;;;-1:-1:-1;;;1414:68:0;;12798:2:27;1414:68:0;;;12780:21:27;;;12817:18;;;12810:30;12876:34;12856:18;;;12849:62;12928:18;;1414:68:0;12596:356:27;2281:412:26;836:42;2470:45;:49;2466:221;;2540:67;;-1:-1:-1;;;2540:67:26;;2591:4;2540:67;;;13169:34:27;-1:-1:-1;;;;;13239:15:27;;13219:18;;;13212:43;836:42:26;;2540;;13104:18:27;;2540:67:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2535:142;;2634:28;;-1:-1:-1;;;2634:28:26;;-1:-1:-1;;;;;1697:32:27;;2634:28:26;;;1679:51:27;1652:18;;2634:28:26;1533:203:27;19903:2764:20;20040:27;20070;20089:7;20070:18;:27::i;:::-;20040:57;;20153:4;-1:-1:-1;;;;;20112:45:20;20128:19;-1:-1:-1;;;;;20112:45:20;;20108:86;;20166:28;;-1:-1:-1;;;20166:28:20;;;;;;;;;;;20108:86;20206:27;19036:24;;;:15;:24;;;;;19260:26;;39523:10;18673:30;;;-1:-1:-1;;;;;18370:28:20;;18651:20;;;18648:56;20389:179;;20481:43;20498:4;39523:10;17282:162;:::i;20481:43::-;20476:92;;20533:35;;-1:-1:-1;;;20533:35:20;;;;;;;;;;;20476:92;-1:-1:-1;;;;;20583:16:20;;20579:52;;20608:23;;-1:-1:-1;;;20608:23:20;;;;;;;;;;;20579:52;20774:15;20771:157;;;20912:1;20891:19;20884:30;20771:157;-1:-1:-1;;;;;21300:24:20;;;;;;;:18;:24;;;;;;21298:26;;-1:-1:-1;;21298:26:20;;;21368:22;;;;;;;;;21366:24;;-1:-1:-1;21366:24:20;;;14703:11;14678:23;14674:41;14661:63;-1:-1:-1;;;14661:63:20;21654:26;;;;:17;:26;;;;;:172;;;;-1:-1:-1;;;21943:47:20;;:52;;21939:617;;22047:1;22037:11;;22015:19;22168:30;;;:17;:30;;;;;;:35;;22164:378;;22304:13;;22289:11;:28;22285:239;;22449:30;;;;:17;:30;;;;;:52;;;22285:239;21997:559;21939:617;22600:7;22596:2;-1:-1:-1;;;;;22581:27:20;22590:4;-1:-1:-1;;;;;22581:27:20;;;;;;;;;;;22618:42;6274:218:17;3435:120;3527:8;;:21;;-1:-1:-1;;;3527:21:17;;;;;2712:25:27;;;3490:4:17;;-1:-1:-1;;;;;3527:8:17;;:16;;2685:18:27;;3527:21:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;3513:35:17;:10;-1:-1:-1;;;;;3513:35:17;;3506:42;;3435:120;;;:::o;2336:287:1:-;1759:1;2468:7;;:19;2460:63;;;;-1:-1:-1;;;2460:63:1;;13974:2:27;2460:63:1;;;13956:21:27;14013:2;13993:18;;;13986:30;14052:33;14032:18;;;14025:61;14103:18;;2460:63:1;13772:355:27;2460:63:1;1759:1;2598:7;:18;2336:287::o;22758:187:20:-;22899:39;22916:4;22922:2;22926:7;22899:39;;;;;;;;;;;;:16;:39::i;:::-;22758:187;;;:::o;12515:1249::-;12582:7;12616;;3652:1:17;12662:23:20;12658:1042;;12714:13;;12707:4;:20;12703:997;;;12751:14;12768:23;;;:17;:23;;;;;;;-1:-1:-1;;;12855:24:20;;:29;;12851:831;;13510:111;13517:6;13527:1;13517:11;13510:111;;-1:-1:-1;;;13587:6:20;13569:25;;;;:17;:25;;;;;;13510:111;;12851:831;12729:971;12703:997;13726:31;;-1:-1:-1;;;13726:31:20;;;;;;;;;;;2433:187:0;2525:6;;;-1:-1:-1;;;;;2541:17:0;;;-1:-1:-1;;;;;;2541:17:0;;;;;;;2573:40;;2525:6;;;2541:17;2525:6;;2573:40;;2506:16;;2573:40;2496:124;2433:187;:::o;11979:159:20:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12106:24:20;;;;:17;:24;;;;;;12087:44;;:18;:44::i;23526:396::-;23695:31;23708:4;23714:2;23718:7;23695:12;:31::i;:::-;-1:-1:-1;;;;;23740:14:20;;;:19;23736:180;;23778:56;23809:4;23815:2;23819:7;23828:5;23778:30;:56::i;:::-;23773:143;;23861:40;;-1:-1:-1;;;23861:40:20;;;;;;;;;;;11724:164;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11834:47:20;11853:27;11872:7;11853:18;:27::i;:::-;11834:18;:47::i;4658:536:17:-;4711:19;4740:22;4783:3;4777:2;:9;4773:365;;-1:-1:-1;4816:1:17;;-1:-1:-1;4848:2:17;4773:365;;;4877:3;4871:2;:9;;:22;;;;;4890:3;4884:2;:9;;4871:22;4867:271;;;4923:1;;-1:-1:-1;4955:8:17;4960:3;4955:2;:8;:::i;:::-;4938:25;;4867:271;;;4990:3;4984:2;:9;;:22;;;;;5003:3;4997:2;:9;;4984:22;4980:158;;;5036:1;;-1:-1:-1;5068:8:17;5073:3;5068:2;:8;:::i;4980:158::-;5147:40;5159:11;5172:14;5147:11;:40::i;27091:2902:20:-;27163:20;27186:13;;;27213;;;27209:44;;27235:18;;-1:-1:-1;;;27235:18:20;;;;;;;;;;;27209:44;-1:-1:-1;;;;;27728:22:20;;;;;;:18;:22;;;;1495:2;27728:22;;;:71;;27766:32;27754:45;;27728:71;;;28035:31;;;:17;:31;;;;;-1:-1:-1;15123:15:20;;15097:24;15093:46;14703:11;14678:23;14674:41;14671:52;14661:63;;28035:170;;28264:23;;;;28035:31;;27728:22;;29016:25;27728:22;;28872:328;29520:1;29506:12;29502:20;29461:339;29560:3;29551:7;29548:16;29461:339;;29774:7;29764:8;29761:1;29734:25;29731:1;29728;29723:59;29612:1;29599:15;29461:339;;;29465:75;29831:8;29843:1;29831:13;29827:45;;29853:19;;-1:-1:-1;;;29853:19:20;;;;;;;;;;;29827:45;29887:13;:19;-1:-1:-1;22758:187:20;;;:::o;4157:141:17:-;4246:13;4282:9;;;;;;;;;;;;;;;;;4275:16;;4157:141;:::o;415:696:8:-;471:13;520:14;537:17;548:5;537:10;:17::i;:::-;557:1;537:21;520:38;;572:20;606:6;595:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;595:18:8;-1:-1:-1;572:41:8;-1:-1:-1;733:28:8;;;749:2;733:28;788:280;-1:-1:-1;;819:5:8;-1:-1:-1;;;953:2:8;942:14;;937:30;819:5;924:44;1012:2;1003:11;;;-1:-1:-1;1032:21:8;788:280;1032:21;-1:-1:-1;1088:6:8;415:696;-1:-1:-1;;;415:696:8:o;5973:233:17:-;6085:4;;6147:1;:19;;6122:8;6131:11;6122:21;;;;;;;:::i;:::-;;;:45;6185:14;;;5973:233;-1:-1:-1;;;;5973:233:17:o;13858:361:20:-;-1:-1:-1;;;;;;;;;;;;;13967:41:20;;;;2004:3;14052:33;;;14018:68;;-1:-1:-1;;;14018:68:20;-1:-1:-1;;;14115:24:20;;:29;;-1:-1:-1;;;14096:48:20;;;;2513:3;14183:28;;;;-1:-1:-1;;;14154:58:20;-1:-1:-1;13858:361:20:o;25948:697::-;26126:88;;-1:-1:-1;;;26126:88:20;;26106:4;;-1:-1:-1;;;;;26126:45:20;;;;;:88;;39523:10;;26193:4;;26199:7;;26208:5;;26126:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26126:88:20;;;;;;;;-1:-1:-1;;26126:88:20;;;;;;;;;;;;:::i;:::-;;;26122:517;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26404:6;:13;26421:1;26404:18;26400:229;;26449:40;;-1:-1:-1;;;26449:40:20;;;;;;;;;;;26400:229;26589:6;26583:13;26574:6;26570:2;26566:15;26559:38;26122:517;-1:-1:-1;;;;;;26282:64:20;-1:-1:-1;;;26282:64:20;;-1:-1:-1;25948:697:20;;;;;;:::o;5200:198:17:-;5285:16;5329:1;:19;;5304:8;5313:11;5304:21;;;;;;;:::i;:::-;;;:45;5285:64;;5383:8;5359;5368:11;5359:21;;;;;;;:::i;:::-;;:32;-1:-1:-1;;;5200:198:17:o;9889:890:12:-;9942:7;;-1:-1:-1;;;10017:15:12;;10013:99;;-1:-1:-1;;;10052:15:12;;;-1:-1:-1;10095:2:12;10085:12;10013:99;10138:6;10129:5;:15;10125:99;;10173:6;10164:15;;;-1:-1:-1;10207:2:12;10197:12;10125:99;10250:6;10241:5;:15;10237:99;;10285:6;10276:15;;;-1:-1:-1;10319:2:12;10309:12;10237:99;10362:5;10353;:14;10349:96;;10396:5;10387:14;;;-1:-1:-1;10429:1:12;10419:11;10349:96;10471:5;10462;:14;10458:96;;10505:5;10496:14;;;-1:-1:-1;10538:1:12;10528:11;10458:96;10580:5;10571;:14;10567:96;;10614:5;10605:14;;;-1:-1:-1;10647:1:12;10637:11;10567:96;10689:5;10680;:14;10676:64;;10724:1;10714:11;10766:6;9889:890;-1:-1:-1;;9889:890:12:o;14:131:27:-;-1:-1:-1;;;;;;88:32:27;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;592:250::-;677:1;687:113;701:6;698:1;695:13;687:113;;;777:11;;;771:18;758:11;;;751:39;723:2;716:10;687:113;;;-1:-1:-1;;834:1:27;816:16;;809:27;592:250::o;847:271::-;889:3;927:5;921:12;954:6;949:3;942:19;970:76;1039:6;1032:4;1027:3;1023:14;1016:4;1009:5;1005:16;970:76;:::i;:::-;1100:2;1079:15;-1:-1:-1;;1075:29:27;1066:39;;;;1107:4;1062:50;;847:271;-1:-1:-1;;847:271:27:o;1123:220::-;1272:2;1261:9;1254:21;1235:4;1292:45;1333:2;1322:9;1318:18;1310:6;1292:45;:::i;1348:180::-;1407:6;1460:2;1448:9;1439:7;1435:23;1431:32;1428:52;;;1476:1;1473;1466:12;1428:52;-1:-1:-1;1499:23:27;;1348:180;-1:-1:-1;1348:180:27:o;1741:131::-;-1:-1:-1;;;;;1816:31:27;;1806:42;;1796:70;;1862:1;1859;1852:12;1877:315;1945:6;1953;2006:2;1994:9;1985:7;1981:23;1977:32;1974:52;;;2022:1;2019;2012:12;1974:52;2061:9;2048:23;2080:31;2105:5;2080:31;:::i;:::-;2130:5;2182:2;2167:18;;;;2154:32;;-1:-1:-1;;;1877:315:27:o;2197:118::-;2283:5;2276:13;2269:21;2262:5;2259:32;2249:60;;2305:1;2302;2295:12;2320:241;2376:6;2429:2;2417:9;2408:7;2404:23;2400:32;2397:52;;;2445:1;2442;2435:12;2397:52;2484:9;2471:23;2503:28;2525:5;2503:28;:::i;2748:456::-;2825:6;2833;2841;2894:2;2882:9;2873:7;2869:23;2865:32;2862:52;;;2910:1;2907;2900:12;2862:52;2949:9;2936:23;2968:31;2993:5;2968:31;:::i;:::-;3018:5;-1:-1:-1;3075:2:27;3060:18;;3047:32;3088:33;3047:32;3088:33;:::i;:::-;2748:456;;3140:7;;-1:-1:-1;;;3194:2:27;3179:18;;;;3166:32;;2748:456::o;3209:367::-;3272:8;3282:6;3336:3;3329:4;3321:6;3317:17;3313:27;3303:55;;3354:1;3351;3344:12;3303:55;-1:-1:-1;3377:20:27;;3420:18;3409:30;;3406:50;;;3452:1;3449;3442:12;3406:50;3489:4;3481:6;3477:17;3465:29;;3549:3;3542:4;3532:6;3529:1;3525:14;3517:6;3513:27;3509:38;3506:47;3503:67;;;3566:1;3563;3556:12;3503:67;3209:367;;;;;:::o;3581:505::-;3676:6;3684;3692;3745:2;3733:9;3724:7;3720:23;3716:32;3713:52;;;3761:1;3758;3751:12;3713:52;3797:9;3784:23;3774:33;;3858:2;3847:9;3843:18;3830:32;3885:18;3877:6;3874:30;3871:50;;;3917:1;3914;3907:12;3871:50;3956:70;4018:7;4009:6;3998:9;3994:22;3956:70;:::i;:::-;3581:505;;4045:8;;-1:-1:-1;3930:96:27;;-1:-1:-1;;;;3581:505:27:o;4331:437::-;4417:6;4425;4478:2;4466:9;4457:7;4453:23;4449:32;4446:52;;;4494:1;4491;4484:12;4446:52;4534:9;4521:23;4567:18;4559:6;4556:30;4553:50;;;4599:1;4596;4589:12;4553:50;4638:70;4700:7;4691:6;4680:9;4676:22;4638:70;:::i;:::-;4727:8;;4612:96;;-1:-1:-1;4331:437:27;-1:-1:-1;;;;4331:437:27:o;4773:349::-;4857:12;;-1:-1:-1;;;;;4853:38:27;4841:51;;4945:4;4934:16;;;4928:23;4953:18;4924:48;4908:14;;;4901:72;5036:4;5025:16;;;5019:23;5012:31;5005:39;4989:14;;;4982:63;5098:4;5087:16;;;5081:23;5106:8;5077:38;5061:14;;5054:62;4773:349::o;5127:724::-;5362:2;5414:21;;;5484:13;;5387:18;;;5506:22;;;5333:4;;5362:2;5585:15;;;;5559:2;5544:18;;;5333:4;5628:197;5642:6;5639:1;5636:13;5628:197;;;5691:52;5739:3;5730:6;5724:13;5691:52;:::i;:::-;5800:15;;;;5772:4;5763:14;;;;;5664:1;5657:9;5628:197;;5856:247;5915:6;5968:2;5956:9;5947:7;5943:23;5939:32;5936:52;;;5984:1;5981;5974:12;5936:52;6023:9;6010:23;6042:31;6067:5;6042:31;:::i;6108:632::-;6279:2;6331:21;;;6401:13;;6304:18;;;6423:22;;;6250:4;;6279:2;6502:15;;;;6476:2;6461:18;;;6250:4;6545:169;6559:6;6556:1;6553:13;6545:169;;;6620:13;;6608:26;;6689:15;;;;6654:12;;;;6581:1;6574:9;6545:169;;6745:383;6822:6;6830;6838;6891:2;6879:9;6870:7;6866:23;6862:32;6859:52;;;6907:1;6904;6897:12;6859:52;6946:9;6933:23;6965:31;6990:5;6965:31;:::i;:::-;7015:5;7067:2;7052:18;;7039:32;;-1:-1:-1;7118:2:27;7103:18;;;7090:32;;6745:383;-1:-1:-1;;;6745:383:27:o;7133:382::-;7198:6;7206;7259:2;7247:9;7238:7;7234:23;7230:32;7227:52;;;7275:1;7272;7265:12;7227:52;7314:9;7301:23;7333:31;7358:5;7333:31;:::i;:::-;7383:5;-1:-1:-1;7440:2:27;7425:18;;7412:32;7453:30;7412:32;7453:30;:::i;:::-;7502:7;7492:17;;;7133:382;;;;;:::o;7520:127::-;7581:10;7576:3;7572:20;7569:1;7562:31;7612:4;7609:1;7602:15;7636:4;7633:1;7626:15;7652:1266;7747:6;7755;7763;7771;7824:3;7812:9;7803:7;7799:23;7795:33;7792:53;;;7841:1;7838;7831:12;7792:53;7880:9;7867:23;7899:31;7924:5;7899:31;:::i;:::-;7949:5;-1:-1:-1;8006:2:27;7991:18;;7978:32;8019:33;7978:32;8019:33;:::i;:::-;8071:7;-1:-1:-1;8125:2:27;8110:18;;8097:32;;-1:-1:-1;8180:2:27;8165:18;;8152:32;8203:18;8233:14;;;8230:34;;;8260:1;8257;8250:12;8230:34;8298:6;8287:9;8283:22;8273:32;;8343:7;8336:4;8332:2;8328:13;8324:27;8314:55;;8365:1;8362;8355:12;8314:55;8401:2;8388:16;8423:2;8419;8416:10;8413:36;;;8429:18;;:::i;:::-;8504:2;8498:9;8472:2;8558:13;;-1:-1:-1;;8554:22:27;;;8578:2;8550:31;8546:40;8534:53;;;8602:18;;;8622:22;;;8599:46;8596:72;;;8648:18;;:::i;:::-;8688:10;8684:2;8677:22;8723:2;8715:6;8708:18;8763:7;8758:2;8753;8749;8745:11;8741:20;8738:33;8735:53;;;8784:1;8781;8774:12;8735:53;8840:2;8835;8831;8827:11;8822:2;8814:6;8810:15;8797:46;8885:1;8880:2;8875;8867:6;8863:15;8859:24;8852:35;8906:6;8896:16;;;;;;;7652:1266;;;;;;;:::o;9277:268::-;9475:3;9460:19;;9488:51;9464:9;9521:6;9488:51;:::i;9550:388::-;9618:6;9626;9679:2;9667:9;9658:7;9654:23;9650:32;9647:52;;;9695:1;9692;9685:12;9647:52;9734:9;9721:23;9753:31;9778:5;9753:31;:::i;:::-;9803:5;-1:-1:-1;9860:2:27;9845:18;;9832:32;9873:33;9832:32;9873:33;:::i;9943:380::-;10022:1;10018:12;;;;10065;;;10086:61;;10140:4;10132:6;10128:17;10118:27;;10086:61;10193:2;10185:6;10182:14;10162:18;10159:38;10156:161;;10239:10;10234:3;10230:20;10227:1;10220:31;10274:4;10271:1;10264:15;10302:4;10299:1;10292:15;10156:161;;9943:380;;;:::o;10328:127::-;10389:10;10384:3;10380:20;10377:1;10370:31;10420:4;10417:1;10410:15;10444:4;10441:1;10434:15;10670:127;10731:10;10726:3;10722:20;10719:1;10712:31;10762:4;10759:1;10752:15;10786:4;10783:1;10776:15;10802:125;10867:9;;;10888:10;;;10885:36;;;10901:18;;:::i;11348:703::-;11575:3;11613:6;11607:13;11629:66;11688:6;11683:3;11676:4;11668:6;11664:17;11629:66;:::i;:::-;11758:13;;11717:16;;;;11780:70;11758:13;11717:16;11827:4;11815:17;;11780:70;:::i;:::-;11917:13;;11872:20;;;11939:70;11917:13;11872:20;11986:4;11974:17;;11939:70;:::i;:::-;12025:20;;11348:703;-1:-1:-1;;;;;11348:703:27:o;12056:128::-;12123:9;;;12144:11;;;12141:37;;;12158:18;;:::i;13266:245::-;13333:6;13386:2;13374:9;13365:7;13361:23;13357:32;13354:52;;;13402:1;13399;13392:12;13354:52;13434:9;13428:16;13453:28;13475:5;13453:28;:::i;13516:251::-;13586:6;13639:2;13627:9;13618:7;13614:23;13610:32;13607:52;;;13655:1;13652;13645:12;13607:52;13687:9;13681:16;13706:31;13731:5;13706:31;:::i;14264:489::-;-1:-1:-1;;;;;14533:15:27;;;14515:34;;14585:15;;14580:2;14565:18;;14558:43;14632:2;14617:18;;14610:34;;;14680:3;14675:2;14660:18;;14653:31;;;14458:4;;14701:46;;14727:19;;14719:6;14701:46;:::i;:::-;14693:54;14264:489;-1:-1:-1;;;;;;14264:489:27:o;14758:249::-;14827:6;14880:2;14868:9;14859:7;14855:23;14851:32;14848:52;;;14896:1;14893;14886:12;14848:52;14928:9;14922:16;14947:30;14971:5;14947:30;:::i
Swarm Source
ipfs://0be22b656004a1b24dc449260c576ce9701c44d27c1c7d5994fb212c1759f75b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,096.27 | 0.02 | $61.93 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.