Source Code
Overview
APE Balance
More Info
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16374861 | 19 hrs ago | 0 APE |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Yureis
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; import {BitMaps} from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import {OperatorFilterer} from "closedsea/src/OperatorFilterer.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; error MaxSupplyExceeded(); error PublicSaleClosed(); error TransfersLocked(); error NotAllowedByRegistry(); error RegistryNotSet(); error WrongWeiSent(); error MaxFeeExceeded(); error InputLengthsMismatch(); error InvalidMerkleProof(); error InvalidLaunchpadFee(); error InvalidLaunchpadFeeAddress(); error TransferFailed(); interface IRegistry { function isAllowedOperator(address operator) external view returns (bool); } contract Yureis is Ownable, OperatorFilterer, ERC2981, ERC721A { // Launchpad Fee uint256 public launchpadFee = 1818634823583328952; uint256 public launchpadCutBps = 500; address public launchpadFeeAddress = 0x2DCC7c4Ab800bF67380e2553BE1E6891A36F18E7; event LaunchpadFeeSent(address indexed feeAddress, uint256 feeAmount); using BitMaps for BitMaps.BitMap; uint256 public maxSupply = 666; bool public operatorFilteringEnabled = true; bool public initialTransferLockOn = true; bool public isRegistryActive; address public registryAddress; string private _baseTokenURI = ""; string private _placeHolderTokenURI = "https://mintify-launchpad.nyc3.cdn.digitaloceanspaces.com/b58dd745-4170-45cf-bf93-9f9676d09880.gif"; // Phase 1 variables uint256 public startTimePhase1 = 1741140000; uint256 public endTimePhase1 = 1741143600; uint256 public maxSupplyPhase1 = 0; uint256 public totalSupplyPhase1; uint256 public pricePhase1 = 33000000000000000000; uint256 public maxPerWalletPhase1 = 1; bytes32 public merkleRootPhase1 = 0x57f8e1adaf0331a4cc642469d1bbb7538e8f18c306fdb67469a7e460f67e31ad; mapping(address => uint256) public walletMintsPhase1; // Phase 2 variables uint256 public startTimePhase2 = 1741143600; uint256 public endTimePhase2 = 1741147200; uint256 public maxSupplyPhase2 = 0; uint256 public totalSupplyPhase2; uint256 public pricePhase2 = 33000000000000000000; uint256 public maxPerWalletPhase2 = 1; bytes32 public merkleRootPhase2 = 0x176c6449f2276177f0b9bb295ac01c1d0f5bbabdd48c04bc87d80b175f8b0ee8; mapping(address => uint256) public walletMintsPhase2; // Phase 3 variables uint256 public startTimePhase3 = 1741147200; uint256 public endTimePhase3 = 1741190400; uint256 public maxSupplyPhase3 = 0; uint256 public totalSupplyPhase3; uint256 public pricePhase3 = 33000000000000000000; uint256 public maxPerWalletPhase3 = 3; bytes32 public merkleRootPhase3 = 0x0; mapping(address => uint256) public walletMintsPhase3; constructor() ERC721A("Yureis", "YRIE") Ownable(msg.sender) { // Register operator filtering _registerForOperatorFiltering(); // Set initial royalty _setDefaultRoyalty(0x2b5173fd283768aFE36c7D666fF077A016e67930, 666); } // Phase 1 Mint function mintPhase1(bytes32[] calldata merkleProof, uint256 quantity) external payable { // Check if mint has started if (startTimePhase1 != 0 && block.timestamp < startTimePhase1) { revert PublicSaleClosed(); } // Check if mint has ended if (endTimePhase1 != 0 && block.timestamp > endTimePhase1) { revert PublicSaleClosed(); } // Check if the mint will exceed total max supply, if set. if (maxSupply != 0 && totalSupply() + quantity > maxSupply) { revert MaxSupplyExceeded(); } // If phase max supply is set, check if it's exceeded if (maxSupplyPhase1 != 0 && totalSupplyPhase1 + quantity > maxSupplyPhase1) { revert MaxSupplyExceeded(); } // Check if the price is correct if (msg.value != (pricePhase1 + launchpadFee) * quantity) { revert WrongWeiSent(); } // Check if the proof is set, and if it is valid if (merkleRootPhase1 != bytes32(0)) { // Using Merkle Tree bytes32 node = keccak256(abi.encodePacked(msg.sender)); if (!MerkleProof.verify(merkleProof, merkleRootPhase1, node)) { revert InvalidMerkleProof(); } } // Check if we have exceeded phase max per wallet if set. if (maxPerWalletPhase1 != 0 && walletMintsPhase1[msg.sender] + quantity > maxPerWalletPhase1) { revert MaxSupplyExceeded(); } uint256 flatFees = 0; // Get the Launchpad Flat Fee if set if (launchpadFee != 0 && launchpadFeeAddress != address(0)) { flatFees = launchpadFee * quantity; } // Get the Launchpad Percentage Fee if set uint256 percentageFees = 0; if (launchpadCutBps != 0 && launchpadFeeAddress != address(0)) { percentageFees = (launchpadCutBps * (msg.value - flatFees)) / 10000; } // Send the fees uint256 totalFees = flatFees + percentageFees; if (totalFees != 0) { _sendLaunchpadFee(totalFees); } // Mint the tokens walletMintsPhase1[msg.sender] += quantity; totalSupplyPhase1 += quantity; _mint(msg.sender, quantity); } // Phase 2 Mint function mintPhase2(bytes32[] calldata merkleProof, uint256 quantity) external payable { // Check if mint has started if (startTimePhase2 != 0 && block.timestamp < startTimePhase2) { revert PublicSaleClosed(); } // Check if mint has ended if (endTimePhase2 != 0 && block.timestamp > endTimePhase2) { revert PublicSaleClosed(); } // Check if the mint will exceed total max supply, if set. if (maxSupply != 0 && totalSupply() + quantity > maxSupply) { revert MaxSupplyExceeded(); } // If phase max supply is set, check if it's exceeded if (maxSupplyPhase2 != 0 && totalSupplyPhase2 + quantity > maxSupplyPhase2) { revert MaxSupplyExceeded(); } // Check if the price is correct if (msg.value != (pricePhase2 + launchpadFee) * quantity) { revert WrongWeiSent(); } // Check if the proof is set, and if it is valid if (merkleRootPhase2 != bytes32(0)) { // Using Merkle Tree bytes32 node = keccak256(abi.encodePacked(msg.sender)); if (!MerkleProof.verify(merkleProof, merkleRootPhase2, node)) { revert InvalidMerkleProof(); } } // Check if we have exceeded phase max per wallet if set. if (maxPerWalletPhase2 != 0 && walletMintsPhase2[msg.sender] + quantity > maxPerWalletPhase2) { revert MaxSupplyExceeded(); } uint256 flatFees = 0; // Get the Launchpad Flat Fee if set if (launchpadFee != 0 && launchpadFeeAddress != address(0)) { flatFees = launchpadFee * quantity; } // Get the Launchpad Percentage Fee if set uint256 percentageFees = 0; if (launchpadCutBps != 0 && launchpadFeeAddress != address(0)) { percentageFees = (launchpadCutBps * (msg.value - flatFees)) / 10000; } // Send the fees uint256 totalFees = flatFees + percentageFees; if (totalFees != 0) { _sendLaunchpadFee(totalFees); } // Mint the tokens walletMintsPhase2[msg.sender] += quantity; totalSupplyPhase2 += quantity; _mint(msg.sender, quantity); } // Phase 3 Mint function mintPhase3(uint256 quantity) external payable { // Check if mint has started if (startTimePhase3 != 0 && block.timestamp < startTimePhase3) { revert PublicSaleClosed(); } // Check if mint has ended if (endTimePhase3 != 0 && block.timestamp > endTimePhase3) { revert PublicSaleClosed(); } // Check if the mint will exceed total max supply, if set. if (maxSupply != 0 && totalSupply() + quantity > maxSupply) { revert MaxSupplyExceeded(); } // If phase max supply is set, check if it's exceeded if (maxSupplyPhase3 != 0 && totalSupplyPhase3 + quantity > maxSupplyPhase3) { revert MaxSupplyExceeded(); } // Check if the price is correct if (msg.value != (pricePhase3 + launchpadFee) * quantity) { revert WrongWeiSent(); } // Check if we have exceeded phase max per wallet if set. if (maxPerWalletPhase3 != 0 && walletMintsPhase3[msg.sender] + quantity > maxPerWalletPhase3) { revert MaxSupplyExceeded(); } uint256 flatFees = 0; // Get the Launchpad Flat Fee if set if (launchpadFee != 0 && launchpadFeeAddress != address(0)) { flatFees = launchpadFee * quantity; } // Get the Launchpad Percentage Fee if set uint256 percentageFees = 0; if (launchpadCutBps != 0 && launchpadFeeAddress != address(0)) { percentageFees = (launchpadCutBps * (msg.value - flatFees)) / 10000; } // Send the fees uint256 totalFees = flatFees + percentageFees; if (totalFees != 0) { _sendLaunchpadFee(totalFees); } // Mint the tokens walletMintsPhase3[msg.sender] += quantity; totalSupplyPhase3 += quantity; _mint(msg.sender, quantity); } // ========================================================================= // Owner Only Functions // ========================================================================= // Owner airdrop function airDrop(address[] memory users, uint256[] memory amounts) external onlyOwner { // iterate over users and amounts if (users.length != amounts.length) { revert InputLengthsMismatch(); } for (uint256 i; i < users.length;) { if (maxSupply != 0 && totalSupply() + amounts[i] > maxSupply) { revert MaxSupplyExceeded(); } _mint(users[i], amounts[i]); unchecked { ++i; } } } // Owner unrestricted mint function ownerMint(address to, uint256 quantity) external onlyOwner { if (maxSupply != 0 && totalSupply() + quantity > maxSupply) { revert MaxSupplyExceeded(); } _mint(to, quantity); } // Set max supply function setMaxSupply(uint256 newMaxSupply) external onlyOwner { maxSupply = newMaxSupply; } // Withdraw Balance to owner function withdraw() public onlyOwner { (bool success, ) = payable(owner()).call{value: address(this).balance}(""); if (!success) { revert TransferFailed(); } } // Withdraw Balance to Address function withdrawTo(address payable _to) public onlyOwner { (bool success, ) = payable(_to).call{value: address(this).balance}(""); if (!success) { revert TransferFailed(); } } // Send Launchpad Flat Fee function _sendLaunchpadFee(uint256 feeAmount) private { if (feeAmount == 0) { revert InvalidLaunchpadFee(); } if (launchpadFeeAddress == address(0)) { revert InvalidLaunchpadFeeAddress(); } (bool success, ) = payable(launchpadFeeAddress).call{value: feeAmount}(""); if (!success) { revert TransferFailed(); } emit LaunchpadFeeSent(launchpadFeeAddress, feeAmount); } // Break Transfer Lock function breakLock() external onlyOwner { initialTransferLockOn = false; } // Set the start time for the phase function setStartTimePhase1(uint256 newStartTime) external onlyOwner { startTimePhase1 = newStartTime; } // Set the end time for the phase function setEndTimePhase1(uint256 newEndTime) external onlyOwner { endTimePhase1 = newEndTime; } // Set the max supply for the phase function setMaxSupplyPhase1(uint256 newMaxSupply) external onlyOwner { maxSupplyPhase1 = newMaxSupply; } // Set max per wallet for the phase function setMaxPerWalletPhase1(uint256 newMaxPerWallet) external onlyOwner { maxPerWalletPhase1 = newMaxPerWallet; } // Set the price for the phase function setPricePhase1(uint256 newPrice) external onlyOwner { pricePhase1 = newPrice; } // Set the merkle root for the phase function setMerkleRootPhase1(bytes32 newMerkleRoot) external onlyOwner { merkleRootPhase1 = newMerkleRoot; }// Set the start time for the phase function setStartTimePhase2(uint256 newStartTime) external onlyOwner { startTimePhase2 = newStartTime; } // Set the end time for the phase function setEndTimePhase2(uint256 newEndTime) external onlyOwner { endTimePhase2 = newEndTime; } // Set the max supply for the phase function setMaxSupplyPhase2(uint256 newMaxSupply) external onlyOwner { maxSupplyPhase2 = newMaxSupply; } // Set max per wallet for the phase function setMaxPerWalletPhase2(uint256 newMaxPerWallet) external onlyOwner { maxPerWalletPhase2 = newMaxPerWallet; } // Set the price for the phase function setPricePhase2(uint256 newPrice) external onlyOwner { pricePhase2 = newPrice; } // Set the merkle root for the phase function setMerkleRootPhase2(bytes32 newMerkleRoot) external onlyOwner { merkleRootPhase2 = newMerkleRoot; }// Set the start time for the phase function setStartTimePhase3(uint256 newStartTime) external onlyOwner { startTimePhase3 = newStartTime; } // Set the end time for the phase function setEndTimePhase3(uint256 newEndTime) external onlyOwner { endTimePhase3 = newEndTime; } // Set the max supply for the phase function setMaxSupplyPhase3(uint256 newMaxSupply) external onlyOwner { maxSupplyPhase3 = newMaxSupply; } // Set max per wallet for the phase function setMaxPerWalletPhase3(uint256 newMaxPerWallet) external onlyOwner { maxPerWalletPhase3 = newMaxPerWallet; } // Set the price for the phase function setPricePhase3(uint256 newPrice) external onlyOwner { pricePhase3 = newPrice; } // Set the merkle root for the phase function setMerkleRootPhase3(bytes32 newMerkleRoot) external onlyOwner { merkleRootPhase3 = newMerkleRoot; } // ========================================================================= // ERC721A Misc // ========================================================================= function _startTokenId() internal pure override returns (uint256) { return 1; } // ========================================================================= // Operator filtering // ========================================================================= function setApprovalForAll(address operator, bool approved) public override (ERC721A) onlyAllowedOperatorApproval(operator) { if (initialTransferLockOn) { revert TransfersLocked(); } super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public payable override (ERC721A) onlyAllowedOperatorApproval(operator) { if (initialTransferLockOn) { revert TransfersLocked(); } super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public payable override (ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override (ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override (ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function setOperatorFilteringEnabled(bool value) public onlyOwner { operatorFilteringEnabled = value; } function _operatorFilteringEnabled() internal view override returns (bool) { return operatorFilteringEnabled; } // ========================================================================= // Registry Check // ========================================================================= function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { if (initialTransferLockOn && from != address(0) && to != address(0)) { revert TransfersLocked(); } if (_isValidAgainstRegistry(msg.sender)) { super._beforeTokenTransfers(from, to, startTokenId, quantity); } else { revert NotAllowedByRegistry(); } } function _isValidAgainstRegistry(address operator) internal view returns (bool) { if (isRegistryActive) { IRegistry registry = IRegistry(registryAddress); return registry.isAllowedOperator(operator); } return true; } function setIsRegistryActive(bool _isRegistryActive) external onlyOwner { if (registryAddress == address(0)) revert RegistryNotSet(); isRegistryActive = _isRegistryActive; } function setRegistryAddress(address _registryAddress) external onlyOwner { registryAddress = _registryAddress; } // ========================================================================= // ERC165 // ========================================================================= function supportsInterface(bytes4 interfaceId) public view override (ERC721A, ERC2981) returns (bool) { // Supports the following interfaceIds: // - IERC165: 0x01ffc9a7 // - IERC721: 0x80ac58cd // - IERC721Metadata: 0x5b5e139f // - IERC2981: 0x2a55205a return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } // ========================================================================= // ERC2891 // ========================================================================= function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { if (feeNumerator > 1000) { revert MaxFeeExceeded(); } _setDefaultRoyalty(receiver, feeNumerator); } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { if (feeNumerator > 1000) { revert MaxFeeExceeded(); } _setTokenRoyalty(tokenId, receiver, feeNumerator); } // ========================================================================= // Metadata // ========================================================================= function setBaseURI(string calldata baseURI) external onlyOwner { _baseTokenURI = baseURI; } function setPlaceholderBaseURI(string calldata placeholderURI) external onlyOwner { _placeHolderTokenURI = placeholderURI; } function _baseURI() internal view override returns (string memory) { return _baseTokenURI; } function _placeHolderURI() internal view returns (string memory) { return _placeHolderTokenURI; } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); string memory placeHolderURI = _placeHolderURI(); if (bytes(baseURI).length != 0) { return string(abi.encodePacked(baseURI, "/", _toString(tokenId), ".json")); } if (bytes(placeHolderURI).length != 0) { return placeHolderURI; } return ""; } }
// 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 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) revert OwnerQueryForNonexistentToken(); // 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, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; return packed; } } // Otherwise, the data exists and is not burned. We can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. 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. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @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, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @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: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck) if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 v5.1.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; import {IERC2981} from "../../interfaces/IERC2981.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator); /** * @dev The default royalty receiver is invalid. */ error ERC2981InvalidDefaultRoyaltyReceiver(address receiver); /** * @dev The royalty set for a specific `tokenId` is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator); /** * @dev The royalty receiver for `tokenId` is invalid. */ error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) public view virtual returns (address receiver, uint256 amount) { RoyaltyInfo storage _royaltyInfo = _tokenRoyaltyInfo[tokenId]; address royaltyReceiver = _royaltyInfo.receiver; uint96 royaltyFraction = _royaltyInfo.royaltyFraction; if (royaltyReceiver == address(0)) { royaltyReceiver = _defaultRoyaltyInfo.receiver; royaltyFraction = _defaultRoyaltyInfo.royaltyFraction; } uint256 royaltyAmount = (salePrice * royaltyFraction) / _feeDenominator(); return (royaltyReceiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidDefaultRoyaltyReceiver(address(0)); } _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0)); } _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/BitMaps.sol) pragma solidity ^0.8.20; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, provided the keys are sequential. * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. * * BitMaps pack 256 booleans across each bit of a single 256-bit slot of `uint256` type. * Hence booleans corresponding to 256 _sequential_ indices would only consume a single slot, * unlike the regular `bool` which would consume an entire slot for a single value. * * This results in gas savings in two ways: * * - Setting a zero value to non-zero only once every 256 times * - Accessing the same warm slot for every 256 _sequential_ indices */ library BitMaps { struct BitMap { mapping(uint256 bucket => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo(BitMap storage bitmap, uint256 index, bool value) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Optimized and flexible operator filterer to abide to OpenSea's /// mandatory on-chain royalty enforcement in order for new collections to /// receive royalties. /// For more information, see: /// See: https://github.com/ProjectOpenSea/operator-filter-registry abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) { // If the function selector has not been overwritten, // it is an out-of-gas error. if eq(shr(224, mload(0x00)), functionSelector) { // To prevent gas under-estimation. revert(0, 0) } } // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/MerkleProof.sol) // This file was procedurally generated from scripts/generate/templates/MerkleProof.js. pragma solidity ^0.8.20; import {Hashes} from "./Hashes.sol"; /** * @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. * * IMPORTANT: Consider memory side-effects when using custom hashing functions * that access memory in an unsafe way. * * NOTE: This library supports proof verification for merkle trees built using * custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving * leaf inclusion in trees built using non-commutative hashing functions requires * additional logic that is not supported by this library. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @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. * * This version handles proofs in memory with the default hashing function. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(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 leaves & pre-images are assumed to be sorted. * * This version handles proofs in memory with the default hashing function. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]); } return computedHash; } /** * @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. * * This version handles proofs in memory with a custom hashing function. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bool) { return processProof(proof, leaf, hasher) == 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 leaves & pre-images are assumed to be sorted. * * This version handles proofs in memory with a custom hashing function. */ function processProof( bytes32[] memory proof, bytes32 leaf, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = hasher(computedHash, proof[i]); } return computedHash; } /** * @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. * * This version handles proofs in calldata with the default hashing function. */ 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 leaves & pre-images are assumed to be sorted. * * This version handles proofs in calldata with the default hashing function. */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]); } return computedHash; } /** * @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. * * This version handles proofs in calldata with a custom hashing function. */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bool) { return processProofCalldata(proof, leaf, hasher) == 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 leaves & pre-images are assumed to be sorted. * * This version handles proofs in calldata with a custom hashing function. */ function processProofCalldata( bytes32[] calldata proof, bytes32 leaf, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = hasher(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}. * * This version handles multiproofs in memory with the default hashing function. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. * * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. * The `leaves` must be validated independently. See {processMultiProof}. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(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. * * This version handles multiproofs in memory with the default hashing function. * * 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). * * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not * validating the leaves elsewhere. */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofFlagsLen = proofFlags.length; // Check proof validity. if (leavesLen + proof.length != proofFlagsLen + 1) { revert MerkleProofInvalidMultiproof(); } // 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[](proofFlagsLen); 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 from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < proofFlagsLen; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = Hashes.commutativeKeccak256(a, b); } if (proofFlagsLen > 0) { if (proofPos != proof.length) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[proofFlagsLen - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @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}. * * This version handles multiproofs in memory with a custom hashing function. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. * * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. * The `leaves` must be validated independently. See {processMultiProof}. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bool) { return processMultiProof(proof, proofFlags, leaves, hasher) == 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. * * This version handles multiproofs in memory with a custom hashing function. * * 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). * * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not * validating the leaves elsewhere. */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bytes32 merkleRoot) { // This function rebuilds 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 proofFlagsLen = proofFlags.length; // Check proof validity. if (leavesLen + proof.length != proofFlagsLen + 1) { revert MerkleProofInvalidMultiproof(); } // 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[](proofFlagsLen); 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 from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < proofFlagsLen; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = hasher(a, b); } if (proofFlagsLen > 0) { if (proofPos != proof.length) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[proofFlagsLen - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @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}. * * This version handles multiproofs in calldata with the default hashing function. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. * * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. * The `leaves` must be validated independently. See {processMultiProofCalldata}. */ 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. * * This version handles multiproofs in calldata with the default hashing function. * * 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). * * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not * validating the leaves elsewhere. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofFlagsLen = proofFlags.length; // Check proof validity. if (leavesLen + proof.length != proofFlagsLen + 1) { revert MerkleProofInvalidMultiproof(); } // 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[](proofFlagsLen); 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 from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < proofFlagsLen; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = Hashes.commutativeKeccak256(a, b); } if (proofFlagsLen > 0) { if (proofPos != proof.length) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[proofFlagsLen - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @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}. * * This version handles multiproofs in calldata with a custom hashing function. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. * * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. * The `leaves` must be validated independently. See {processMultiProofCalldata}. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves, hasher) == 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. * * This version handles multiproofs in calldata with a custom hashing function. * * 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). * * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not * validating the leaves elsewhere. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves, function(bytes32, bytes32) view returns (bytes32) hasher ) internal view returns (bytes32 merkleRoot) { // This function rebuilds 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 proofFlagsLen = proofFlags.length; // Check proof validity. if (leavesLen + proof.length != proofFlagsLen + 1) { revert MerkleProofInvalidMultiproof(); } // 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[](proofFlagsLen); 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 from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < proofFlagsLen; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = hasher(a, b); } if (proofFlagsLen > 0) { if (proofPos != proof.length) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[proofFlagsLen - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. * * NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case all the price would be sent to the * royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/Hashes.sol) pragma solidity ^0.8.20; /** * @dev Library of standard hash functions. * * _Available since v5.1._ */ library Hashes { /** * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs. * * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. */ function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) { return a < b ? efficientKeccak256(a, b) : efficientKeccak256(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32 value) { assembly ("memory-safe") { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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); }
{ "remappings": [ "@rari-capital/solmate/=lib/solmate/", "ds-test/=lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "murky/=lib/murky/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "solarray/=lib/solarray/src/", "solady/=lib/solady/", "seaport-sol/=lib/seaport-sol/", "seaport-types/=lib/seaport-types/", "seaport-core/=lib/seaport-core/", "seaport/=contracts/", "closedsea/=lib/closedsea/", "erc721a/=lib/closedsea/lib/erc721a/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "erc721a-upgradeable/=lib/closedsea/lib/erc721a-upgradeable/contracts/", "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/closedsea/lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "operator-filter-registry/=lib/closedsea/lib/operator-filter-registry/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 1000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"InputLengthsMismatch","type":"error"},{"inputs":[],"name":"InvalidLaunchpadFee","type":"error"},{"inputs":[],"name":"InvalidLaunchpadFeeAddress","type":"error"},{"inputs":[],"name":"InvalidMerkleProof","type":"error"},{"inputs":[],"name":"MaxFeeExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotAllowedByRegistry","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PublicSaleClosed","type":"error"},{"inputs":[],"name":"RegistryNotSet","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"TransfersLocked","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"WrongWeiSent","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":"feeAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"LaunchpadFeeSent","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":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"breakLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTimePhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTimePhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTimePhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialTransferLockOn","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":"isRegistryActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchpadCutBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchpadFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchpadFeeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWalletPhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWalletPhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWalletPhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyPhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyPhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyPhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootPhase1","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootPhase2","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootPhase3","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPhase1","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPhase2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPhase3","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEndTime","type":"uint256"}],"name":"setEndTimePhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEndTime","type":"uint256"}],"name":"setEndTimePhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEndTime","type":"uint256"}],"name":"setEndTimePhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isRegistryActive","type":"bool"}],"name":"setIsRegistryActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxPerWallet","type":"uint256"}],"name":"setMaxPerWalletPhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxPerWallet","type":"uint256"}],"name":"setMaxPerWalletPhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxPerWallet","type":"uint256"}],"name":"setMaxPerWalletPhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupplyPhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupplyPhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupplyPhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMerkleRootPhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMerkleRootPhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMerkleRootPhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"placeholderURI","type":"string"}],"name":"setPlaceholderBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPricePhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPricePhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPricePhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_registryAddress","type":"address"}],"name":"setRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setStartTimePhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setStartTimePhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setStartTimePhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimePhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimePhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimePhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyPhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyPhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyPhase3","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":"address","name":"","type":"address"}],"name":"walletMintsPhase1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletMintsPhase2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletMintsPhase3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
67193d16bc8bd6eab8600b556101f4600c55600d80546001600160a01b031916732dcc7c4ab800bf67380e2553be1e6891a36f18e717905561029a600e55600f805461010161ffff1990911617905560a06040525f6080908152601090610066908261042e565b506040518060a0016040528060628152602001613b0d6062913960119061008d908261042e565b506367c7b0206012556367c7be306013555f6014556801c9f78d2893e4000060165560016017557f57f8e1adaf0331a4cc642469d1bbb7538e8f18c306fdb67469a7e460f67e31ad5f1b6018556367c7be30601a556367c7cc40601b555f601c556801c9f78d2893e40000601e556001601f557f176c6449f2276177f0b9bb295ac01c1d0f5bbabdd48c04bc87d80b175f8b0ee85f1b6020556367c7cc406022556367c875006023555f6024556801c9f78d2893e4000060265560036027555f5f1b60285534801561015d575f5ffd5b50604080518082018252600681526559757265697360d01b602080830191909152825180840190935260048352635952494560e01b908301529033806101bd57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101c681610215565b5060056101d3838261042e565b5060066101e0828261042e565b50506001600355506101f0610264565b610210732b5173fd283768afe36c7d666ff077a016e6793061029a610285565b6104e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610283733cc6cdda760b79bafa08df41ecfa224f810dceb66001610327565b565b6127106001600160601b0382168110156102c457604051636f483d0960e01b81526001600160601b0383166004820152602481018290526044016101b4565b6001600160a01b0383166102ed57604051635b6cc80560e11b81525f60048201526024016101b4565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600155565b6001600160a01b0390911690637d3e3dbe81610354578261034d5750634420e486610354565b5063a0af29035b8060e01b5f52306004528260245260045f60445f5f6daaeb6d7670e522a718067333cd4e5af161038d57805f5160e01c0361038d575f5ffd5b505f6024525050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806103be57607f821691505b6020821081036103dc57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561042957805f5260205f20601f840160051c810160208510156104075750805b601f840160051c820191505b81811015610426575f8155600101610413565b50505b505050565b81516001600160401b0381111561044757610447610396565b61045b8161045584546103aa565b846103e2565b6020601f82116001811461048d575f83156104765750848201515b5f19600385901b1c1916600184901b178455610426565b5f84815260208120601f198516915b828110156104bc578785015182556020948501946001909201910161049c565b50848210156104d957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b613618806104f55f395ff3fe60806040526004361061057f575f3560e01c80636f8b44b0116102cf578063aa60bdd01161017b578063d2762b46116100dc578063e5e2a0f611610092578063f2fde38b1161006d578063f2fde38b14610e95578063f3f119f114610eb4578063fb796e6c14610ec9575f5ffd5b8063e5e2a0f614610e13578063e985e9c514610e28578063ed9aab5114610e6f575f5ffd5b8063e079e461116100c2578063e079e46114610dc0578063e1136b3d14610ddf578063e56e9ac014610dfe575f5ffd5b8063d2762b4614610d96578063d5abeb0114610dab575f5ffd5b8063b88d4fde11610131578063c87b56dd11610117578063c87b56dd14610d4d578063cafd705f14610d6c578063d1c026c914610d81575f5ffd5b8063b88d4fde14610d1b578063c3d923a614610d2e575f5ffd5b8063abd017ea11610161578063abd017ea14610cbe578063ac19701b14610cdd578063b7c0b8e814610cfc575f5ffd5b8063aa60bdd014610c80578063ab7b499314610c9f575f5ffd5b8063871215d41161023057806396db3e89116101e6578063a42c05ba116101c1578063a42c05ba14610c42578063a70138c114610c57578063aa0678ff14610c6b575f5ffd5b806396db3e8914610be55780639e5f94a714610c04578063a22cb46514610c23575f5ffd5b80638e9a85f3116102165780638e9a85f314610ba957806395d89b4114610bbe57806396ce3bfa14610bd2575f5ffd5b8063871215d414610b785780638da5cb5b14610b8d575f5ffd5b806376ee0153116102855780637d4b5a211161026b5780637d4b5a2114610b315780637f371aa014610b44578063858633f214610b59575f5ffd5b806376ee015314610afd57806379544c8614610b1c575f5ffd5b8063715018a6116102b5578063715018a614610aab57806371be5e1414610abf57806372b0d90c14610ade575f5ffd5b80636f8b44b014610a6d57806370a0823114610a8c575f5ffd5b806341d94c981161042e578063545b70b21161038f5780635c1afecb1161034557806364f52a1f1161032057806364f52a1f14610a1a57806365216a4114610a2f578063691ce97014610a4e575f5ffd5b80635c1afecb146109d15780635d99a0cf146109e65780636352211e146109fb575f5ffd5b806355f804b31161037557806355f804b31461097e5780635944c7531461099d57806359a2f3bd146109bc575f5ffd5b8063545b70b21461094a57806355f5f0661461095f575f5ffd5b8063484b973c116103e45780634ed69eaf116103ca5780634ed69eaf146109015780634f115db1146109205780635438943714610935575f5ffd5b8063484b973c146108c35780634b21839e146108e2575f5ffd5b806342b5e15c1161041457806342b5e15c14610872578063462fed141461088557806346fff98d146108a4575f5ffd5b806341d94c981461084a57806342842e0e1461085f575f5ffd5b806318160ddd116104e357806330a08965116104995780633c6d5762116104745780633c6d5762146107f65780633ccfd60b14610821578063406466a714610835575f5ffd5b806330a08965146107a357806330db1d5b146107c25780633bf30394146107e1575f5ffd5b806323b872dd116104c957806323b872dd14610733578063251c21ec146107465780632a55205a14610765575f5ffd5b806318160ddd146106f957806321b8acd714610714575f5ffd5b8063081812fc116105385780630c92b6311161051e5780630c92b631146106915780630d4c1828146106b057806312b36510146106db575f5ffd5b8063081812fc14610647578063095ea7b31461067e575f5ffd5b806304634d8d1161056857806304634d8d146105f057806306fdde03146106115780630759f2d814610632575f5ffd5b80630141a4491461058357806301ffc9a7146105c1575b5f5ffd5b34801561058e575f5ffd5b506105ae61059d366004612db7565b60296020525f908152604090205481565b6040519081526020015b60405180910390f35b3480156105cc575f5ffd5b506105e06105db366004612de7565b610ee2565b60405190151581526020016105b8565b3480156105fb575f5ffd5b5061060f61060a366004612e1d565b610f01565b005b34801561061c575f5ffd5b50610625610f48565b6040516105b89190612e7e565b34801561063d575f5ffd5b506105ae60145481565b348015610652575f5ffd5b50610666610661366004612e90565b610fd8565b6040516001600160a01b0390911681526020016105b8565b61060f61068c366004612ea7565b611033565b34801561069c575f5ffd5b5061060f6106ab366004612e90565b611080565b3480156106bb575f5ffd5b506105ae6106ca366004612db7565b60216020525f908152604090205481565b3480156106e6575f5ffd5b50600f546105e090610100900460ff1681565b348015610704575f5ffd5b50600454600354035f19016105ae565b34801561071f575f5ffd5b5061060f61072e366004612e90565b61108d565b61060f610741366004612ed1565b61109a565b348015610751575f5ffd5b5061060f610760366004612e90565b6110d0565b348015610770575f5ffd5b5061078461077f366004612f0f565b6110dd565b604080516001600160a01b0390931683526020830191909152016105b8565b3480156107ae575f5ffd5b50600d54610666906001600160a01b031681565b3480156107cd575f5ffd5b5061060f6107dc366004612e90565b61116f565b3480156107ec575f5ffd5b506105ae601c5481565b348015610801575f5ffd5b506105ae610810366004612db7565b60196020525f908152604090205481565b34801561082c575f5ffd5b5061060f61117c565b348015610840575f5ffd5b506105ae60265481565b348015610855575f5ffd5b506105ae60135481565b61060f61086d366004612ed1565b6111f8565b61060f610880366004612e90565b611228565b348015610890575f5ffd5b5061060f61089f366004612e90565b61146c565b3480156108af575f5ffd5b5061060f6108be366004612f3c565b611479565b3480156108ce575f5ffd5b5061060f6108dd366004612ea7565b6114e6565b3480156108ed575f5ffd5b5061060f6108fc366004612e90565b61153e565b34801561090c575f5ffd5b5061060f61091b366004612f57565b61154b565b34801561092b575f5ffd5b506105ae601a5481565b348015610940575f5ffd5b506105ae60225481565b348015610955575f5ffd5b506105ae60155481565b34801561096a575f5ffd5b5061060f610979366004612e90565b611560565b348015610989575f5ffd5b5061060f610998366004612f57565b61156d565b3480156109a8575f5ffd5b5061060f6109b7366004612fc5565b611582565b3480156109c7575f5ffd5b506105ae601f5481565b3480156109dc575f5ffd5b506105ae601d5481565b3480156109f1575f5ffd5b506105ae601e5481565b348015610a06575f5ffd5b50610666610a15366004612e90565b6115c6565b348015610a25575f5ffd5b506105ae60185481565b348015610a3a575f5ffd5b5061060f610a493660046130d2565b6115d0565b348015610a59575f5ffd5b5061060f610a68366004612e90565b6116c7565b348015610a78575f5ffd5b5061060f610a87366004612e90565b6116d4565b348015610a97575f5ffd5b506105ae610aa6366004612db7565b6116e1565b348015610ab6575f5ffd5b5061060f611747565b348015610aca575f5ffd5b5061060f610ad9366004612e90565b61175a565b348015610ae9575f5ffd5b5061060f610af8366004612db7565b611767565b348015610b08575f5ffd5b5061060f610b17366004612e90565b6117df565b348015610b27575f5ffd5b506105ae601b5481565b61060f610b3f366004613197565b6117ec565b348015610b4f575f5ffd5b506105ae60245481565b348015610b64575f5ffd5b5061060f610b73366004612e90565b611ad7565b348015610b83575f5ffd5b506105ae600b5481565b348015610b98575f5ffd5b505f546001600160a01b0316610666565b348015610bb4575f5ffd5b506105ae60255481565b348015610bc9575f5ffd5b50610625611ae4565b61060f610be0366004613197565b611af3565b348015610bf0575f5ffd5b5061060f610bff366004612e90565b611dc6565b348015610c0f575f5ffd5b5061060f610c1e366004612e90565b611dd3565b348015610c2e575f5ffd5b5061060f610c3d36600461320c565b611de0565b348015610c4d575f5ffd5b506105ae60285481565b348015610c62575f5ffd5b5061060f611e28565b348015610c76575f5ffd5b506105ae60125481565b348015610c8b575f5ffd5b5061060f610c9a366004612e90565b611e3d565b348015610caa575f5ffd5b5061060f610cb9366004612db7565b611e4a565b348015610cc9575f5ffd5b50600f546105e09062010000900460ff1681565b348015610ce8575f5ffd5b5061060f610cf7366004612e90565b611e93565b348015610d07575f5ffd5b5061060f610d16366004612f3c565b611ea0565b61060f610d29366004613243565b611ebb565b348015610d39575f5ffd5b5061060f610d48366004612e90565b611ef3565b348015610d58575f5ffd5b50610625610d67366004612e90565b611f00565b348015610d77575f5ffd5b506105ae60275481565b348015610d8c575f5ffd5b506105ae60235481565b348015610da1575f5ffd5b506105ae600c5481565b348015610db6575f5ffd5b506105ae600e5481565b348015610dcb575f5ffd5b5061060f610dda366004612e90565b611fb6565b348015610dea575f5ffd5b5061060f610df9366004612e90565b611fc3565b348015610e09575f5ffd5b506105ae60175481565b348015610e1e575f5ffd5b506105ae60165481565b348015610e33575f5ffd5b506105e0610e42366004613305565b6001600160a01b039182165f908152600a6020908152604080832093909416825291909152205460ff1690565b348015610e7a575f5ffd5b50600f5461066690630100000090046001600160a01b031681565b348015610ea0575f5ffd5b5061060f610eaf366004612db7565b611fd0565b348015610ebf575f5ffd5b506105ae60205481565b348015610ed4575f5ffd5b50600f546105e09060ff1681565b5f610eec82612028565b80610efb5750610efb826120a7565b92915050565b610f096120f4565b6103e8816bffffffffffffffffffffffff161115610f3a5760405163f4df6ae560e01b815260040160405180910390fd5b610f448282612139565b5050565b606060058054610f5790613331565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613331565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b5050505050905090565b5f610fe28261221c565b611018576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505f908152600960205260409020546001600160a01b031690565b81600f5460ff1615611048576110488161224f565b600f54610100900460ff1615611071576040516336e278fd60e21b815260040160405180910390fd5b61107b838361228e565b505050565b6110886120f4565b602455565b6110956120f4565b602255565b826001600160a01b03811633146110bf57600f5460ff16156110bf576110bf3361224f565b6110ca84848461229a565b50505050565b6110d86120f4565b601255565b5f82815260026020526040812080548291906001600160a01b03811690600160a01b90046bffffffffffffffffffffffff168161113a5750506001546001600160a01b03811690600160a01b90046bffffffffffffffffffffffff165b5f6127106111566bffffffffffffffffffffffff84168961337d565b6111609190613394565b92989297509195505050505050565b6111776120f4565b601e55565b6111846120f4565b5f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146111ce576040519150601f19603f3d011682016040523d82523d5f602084013e6111d3565b606091505b50509050806111f5576040516312171d8360e31b815260040160405180910390fd5b50565b826001600160a01b038116331461121d57600f5460ff161561121d5761121d3361224f565b6110ca84848461249c565b6022541580159061123a575060225442105b1561125857604051636ea7008360e11b815260040160405180910390fd5b6023541580159061126a575060235442115b1561128857604051636ea7008360e11b815260040160405180910390fd5b600e54158015906112b05750600e54600454600354839190035f19016112ae91906133b3565b115b156112ce57604051638a164f6360e01b815260040160405180910390fd5b602454158015906112ed5750602454816025546112eb91906133b3565b115b1561130b57604051638a164f6360e01b815260040160405180910390fd5b80600b5460265461131c91906133b3565b611326919061337d565b34146113455760405163193e352b60e11b815260040160405180910390fd5b602754158015906113705750602754335f9081526029602052604090205461136e9083906133b3565b115b1561138e57604051638a164f6360e01b815260040160405180910390fd5b600b545f90158015906113ab5750600d546001600160a01b031615155b156113c15781600b546113be919061337d565b90505b600c545f90158015906113de5750600d546001600160a01b031615155b1561140a576127106113f083346133c6565b600c546113fd919061337d565b6114079190613394565b90505b5f61141582846133b3565b9050801561142657611426816124b6565b335f90815260296020526040812080548692906114449084906133b3565b925050819055508360255f82825461145c91906133b3565b909155506110ca905033856125e8565b6114746120f4565b601f55565b6114816120f4565b600f54630100000090046001600160a01b03166114ca576040517fe048e71000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054911515620100000262ff000019909216919091179055565b6114ee6120f4565b600e54158015906115165750600e54600454600354839190035f190161151491906133b3565b115b1561153457604051638a164f6360e01b815260040160405180910390fd5b610f4482826125e8565b6115466120f4565b601755565b6115536120f4565b601161107b82848361341d565b6115686120f4565b601855565b6115756120f4565b601061107b82848361341d565b61158a6120f4565b6103e8816bffffffffffffffffffffffff1611156115bb5760405163f4df6ae560e01b815260040160405180910390fd5b61107b838383612720565b5f610efb82612821565b6115d86120f4565b8051825114611613576040517ffc4c603600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b825181101561107b57600e54158015906116655750600e5482828151811061163f5761163f6134d7565b60200260200101516116596004546003545f199190030190565b61166391906133b3565b115b1561168357604051638a164f6360e01b815260040160405180910390fd5b6116bf838281518110611698576116986134d7565b60200260200101518383815181106116b2576116b26134d7565b60200260200101516125e8565b600101611615565b6116cf6120f4565b602355565b6116dc6120f4565b600e55565b5f6001600160a01b038216611722576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b03165f9081526008602052604090205467ffffffffffffffff1690565b61174f6120f4565b6117585f6128a8565b565b6117626120f4565b602655565b61176f6120f4565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146117b8576040519150601f19603f3d011682016040523d82523d5f602084013e6117bd565b606091505b5050905080610f44576040516312171d8360e31b815260040160405180910390fd5b6117e76120f4565b602755565b601254158015906117fe575060125442105b1561181c57604051636ea7008360e11b815260040160405180910390fd5b6013541580159061182e575060135442115b1561184c57604051636ea7008360e11b815260040160405180910390fd5b600e54158015906118745750600e54600454600354839190035f190161187291906133b3565b115b1561189257604051638a164f6360e01b815260040160405180910390fd5b601454158015906118b15750601454816015546118af91906133b3565b115b156118cf57604051638a164f6360e01b815260040160405180910390fd5b80600b546016546118e091906133b3565b6118ea919061337d565b34146119095760405163193e352b60e11b815260040160405180910390fd5b601854156119a8576040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506119898484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506018549150849050612904565b6119a65760405163582f497d60e11b815260040160405180910390fd5b505b601754158015906119d35750601754335f908152601960205260409020546119d19083906133b3565b115b156119f157604051638a164f6360e01b815260040160405180910390fd5b600b545f9015801590611a0e5750600d546001600160a01b031615155b15611a245781600b54611a21919061337d565b90505b600c545f9015801590611a415750600d546001600160a01b031615155b15611a6d57612710611a5383346133c6565b600c54611a60919061337d565b611a6a9190613394565b90505b5f611a7882846133b3565b90508015611a8957611a89816124b6565b335f9081526019602052604081208054869290611aa79084906133b3565b925050819055508360155f828254611abf91906133b3565b90915550611acf905033856125e8565b505050505050565b611adf6120f4565b601455565b606060068054610f5790613331565b601a5415801590611b055750601a5442105b15611b2357604051636ea7008360e11b815260040160405180910390fd5b601b5415801590611b355750601b5442115b15611b5357604051636ea7008360e11b815260040160405180910390fd5b600e5415801590611b7b5750600e54600454600354839190035f1901611b7991906133b3565b115b15611b9957604051638a164f6360e01b815260040160405180910390fd5b601c5415801590611bb85750601c5481601d54611bb691906133b3565b115b15611bd657604051638a164f6360e01b815260040160405180910390fd5b80600b54601e54611be791906133b3565b611bf1919061337d565b3414611c105760405163193e352b60e11b815260040160405180910390fd5b60205415611caf576040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050611c908484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506020549150849050612904565b611cad5760405163582f497d60e11b815260040160405180910390fd5b505b601f5415801590611cda5750601f54335f90815260216020526040902054611cd89083906133b3565b115b15611cf857604051638a164f6360e01b815260040160405180910390fd5b600b545f9015801590611d155750600d546001600160a01b031615155b15611d2b5781600b54611d28919061337d565b90505b600c545f9015801590611d485750600d546001600160a01b031615155b15611d7457612710611d5a83346133c6565b600c54611d67919061337d565b611d719190613394565b90505b5f611d7f82846133b3565b90508015611d9057611d90816124b6565b335f9081526021602052604081208054869290611dae9084906133b3565b9250508190555083601d5f828254611abf91906133b3565b611dce6120f4565b602055565b611ddb6120f4565b602855565b81600f5460ff1615611df557611df58161224f565b600f54610100900460ff1615611e1e576040516336e278fd60e21b815260040160405180910390fd5b61107b8383612919565b611e306120f4565b600f805461ff0019169055565b611e456120f4565b601a55565b611e526120f4565b600f80546001600160a01b039092166301000000027fffffffffffffffffff0000000000000000000000000000000000000000ffffff909216919091179055565b611e9b6120f4565b601355565b611ea86120f4565b600f805460ff1916911515919091179055565b836001600160a01b0381163314611ee057600f5460ff1615611ee057611ee03361224f565b611eec85858585612984565b5050505050565b611efb6120f4565b601c55565b6060611f0b8261221c565b611f41576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611f4a6129c8565b90505f611f556129d7565b905081515f14611f925781611f69856129e6565b604051602001611f7a929190613502565b60405160208183030381529060405292505050919050565b805115611fa0579392505050565b505060408051602081019091525f815292915050565b611fbe6120f4565b601b55565b611fcb6120f4565b601655565b611fd86120f4565b6001600160a01b03811661201f576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6111f5816128a8565b5f6301ffc9a760e01b6001600160e01b03198316148061207157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610efb5750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b5f6001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610efb57506301ffc9a760e01b6001600160e01b0319831614610efb565b5f546001600160a01b03163314611758576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401612016565b6127106bffffffffffffffffffffffff821681101561219b576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8316600482015260248101829052604401612016565b6001600160a01b0383166121dd576040517fb6d9900a0000000000000000000000000000000000000000000000000000000081525f6004820152602401612016565b50604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600155565b5f8160011115801561222f575060035482105b8015610efb5750505f90815260076020526040902054600160e01b161590565b69c61711340011223344555f5230601a5280603a525f5f604460166daaeb6d7670e522a718067333cd4e5afa612287573d5f5f3e3d5ffd5b5f603a5250565b610f4482826001612a29565b5f6122a482612821565b9050836001600160a01b0316816001600160a01b0316146122f1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8281526009602052604090208054338082146001600160a01b03881690911417612372576001600160a01b0386165f908152600a6020908152604080832033845290915290205460ff16612372576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166123b2576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123bf8686866001612b10565b80156123c9575f82555b6001600160a01b038681165f9081526008602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260076020526040812091909155600160e11b8416900361245657600184015f818152600760205260408120549003612454576003548114612454575f8181526007602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611acf565b61107b83838360405180602001604052805f815250611ebb565b805f036124ef576040517f5e2a89dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d546001600160a01b0316612531576040517fcd0081c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d546040515f916001600160a01b03169083908381818185875af1925050503d805f811461257b576040519150601f19603f3d011682016040523d82523d5f602084013e612580565b606091505b50509050806125a2576040516312171d8360e31b815260040160405180910390fd5b600d546040518381526001600160a01b03909116907f2b5dffd9914ddb43acdb6963bacf053a87bf9354300844f6339f17741e25145a9060200160405180910390a25050565b6003545f829003612625576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126315f848385612b10565b6001600160a01b0383165f8181526008602090815260408083208054680100000000000000018802019055848352600790915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146126dd5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f5fa46001016126a7565b50815f03612717576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035550505050565b6127106bffffffffffffffffffffffff8216811015612789576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018590526bffffffffffffffffffffffff8316602482015260448101829052606401612016565b6001600160a01b0383166127d2576040517f969f0852000000000000000000000000000000000000000000000000000000008152600481018590525f6024820152604401612016565b506040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182525f968752600290529190942093519051909116600160a01b029116179055565b5f8160011161288f57505f8181526007602052604081205490600160e01b8216900361288f57805f0361288a57600354821061287057604051636f96cda160e11b815260040160405180910390fd5b5b505f19015f818152600760205260409020548015612871575b919050565b604051636f96cda160e11b815260040160405180910390fd5b5f80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f826129108584612ba0565b14949350505050565b335f818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61298f84848461109a565b6001600160a01b0383163b156110ca576129ab84848484612be2565b6110ca576040516368d2bf6b60e11b815260040160405180910390fd5b606060108054610f5790613331565b606060118054610f5790613331565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129ff5750819003601f19909101908152919050565b5f612a33836115c6565b90508115612aa757336001600160a01b03821614612aa7576001600160a01b0381165f908152600a6020908152604080832033845290915290205460ff16612aa7576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83815260096020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600f54610100900460ff168015612b2f57506001600160a01b03841615155b8015612b4357506001600160a01b03831615155b15612b61576040516336e278fd60e21b815260040160405180910390fd5b612b6a33612cc9565b6110ca576040517f4c80d8be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81815b8451811015612bda57612bd082868381518110612bc357612bc36134d7565b6020026020010151612d7a565b9150600101612ba4565b509392505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612c1690339089908890889060040161356c565b6020604051808303815f875af1925050508015612c50575060408051601f3d908101601f19168201909252612c4d918101906135ac565b60015b612cac573d808015612c7d576040519150601f19603f3d011682016040523d82523d5f602084013e612c82565b606091505b5080515f03612ca4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600f545f9062010000900460ff1615612d7257600f546040517fe18bc08a0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152630100000090920490911690819063e18bc08a90602401602060405180830381865afa158015612d47573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d6b91906135c7565b9392505050565b506001919050565b5f818310612d94575f828152602084905260409020612d6b565b505f9182526020526040902090565b6001600160a01b03811681146111f5575f5ffd5b5f60208284031215612dc7575f5ffd5b8135612d6b81612da3565b6001600160e01b0319811681146111f5575f5ffd5b5f60208284031215612df7575f5ffd5b8135612d6b81612dd2565b80356bffffffffffffffffffffffff8116811461288a575f5ffd5b5f5f60408385031215612e2e575f5ffd5b8235612e3981612da3565b9150612e4760208401612e02565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f612d6b6020830184612e50565b5f60208284031215612ea0575f5ffd5b5035919050565b5f5f60408385031215612eb8575f5ffd5b8235612ec381612da3565b946020939093013593505050565b5f5f5f60608486031215612ee3575f5ffd5b8335612eee81612da3565b92506020840135612efe81612da3565b929592945050506040919091013590565b5f5f60408385031215612f20575f5ffd5b50508035926020909101359150565b80151581146111f5575f5ffd5b5f60208284031215612f4c575f5ffd5b8135612d6b81612f2f565b5f5f60208385031215612f68575f5ffd5b823567ffffffffffffffff811115612f7e575f5ffd5b8301601f81018513612f8e575f5ffd5b803567ffffffffffffffff811115612fa4575f5ffd5b856020828401011115612fb5575f5ffd5b6020919091019590945092505050565b5f5f5f60608486031215612fd7575f5ffd5b833592506020840135612fe981612da3565b9150612ff760408501612e02565b90509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561303d5761303d613000565b604052919050565b5f67ffffffffffffffff82111561305e5761305e613000565b5060051b60200190565b5f82601f830112613077575f5ffd5b813561308a61308582613045565b613014565b8082825260208201915060208360051b8601019250858311156130ab575f5ffd5b602085015b838110156130c85780358352602092830192016130b0565b5095945050505050565b5f5f604083850312156130e3575f5ffd5b823567ffffffffffffffff8111156130f9575f5ffd5b8301601f81018513613109575f5ffd5b803561311761308582613045565b8082825260208201915060208360051b850101925087831115613138575f5ffd5b6020840193505b8284101561316357833561315281612da3565b82526020938401939091019061313f565b9450505050602083013567ffffffffffffffff811115613181575f5ffd5b61318d85828601613068565b9150509250929050565b5f5f5f604084860312156131a9575f5ffd5b833567ffffffffffffffff8111156131bf575f5ffd5b8401601f810186136131cf575f5ffd5b803567ffffffffffffffff8111156131e5575f5ffd5b8660208260051b84010111156131f9575f5ffd5b6020918201979096509401359392505050565b5f5f6040838503121561321d575f5ffd5b823561322881612da3565b9150602083013561323881612f2f565b809150509250929050565b5f5f5f5f60808587031215613256575f5ffd5b843561326181612da3565b9350602085013561327181612da3565b925060408501359150606085013567ffffffffffffffff811115613293575f5ffd5b8501601f810187136132a3575f5ffd5b803567ffffffffffffffff8111156132bd576132bd613000565b6132d0601f8201601f1916602001613014565b8181528860208385010111156132e4575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f5f60408385031215613316575f5ffd5b823561332181612da3565b9150602083013561323881612da3565b600181811c9082168061334557607f821691505b60208210810361336357634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610efb57610efb613369565b5f826133ae57634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610efb57610efb613369565b81810381811115610efb57610efb613369565b601f82111561107b57805f5260205f20601f840160051c810160208510156133fe5750805b601f840160051c820191505b81811015611eec575f815560010161340a565b67ffffffffffffffff83111561343557613435613000565b613449836134438354613331565b836133d9565b5f601f84116001811461347a575f85156134635750838201355b5f19600387901b1c1916600186901b178355611eec565b5f83815260208120601f198716915b828110156134a95786850135825560209485019460019092019101613489565b50868210156134c5575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b5f52603260045260245ffd5b5f81518060208401855e5f93019283525090919050565b5f61350d82856134eb565b7f2f00000000000000000000000000000000000000000000000000000000000000815261353d60018201856134eb565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050195945050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6135a26080830184612e50565b9695505050505050565b5f602082840312156135bc575f5ffd5b8151612d6b81612dd2565b5f602082840312156135d7575f5ffd5b8151612d6b81612f2f56fea26469706673582212206d7e87cbc9dfbeb056be50c2fb6990e7a2c539a63324e0c86344e63da45cf5ae64736f6c634300081c003368747470733a2f2f6d696e746966792d6c61756e63687061642e6e7963332e63646e2e6469676974616c6f6365616e7370616365732e636f6d2f62353864643734352d343137302d343563662d626639332d3966393637366430393838302e676966
Deployed Bytecode
0x60806040526004361061057f575f3560e01c80636f8b44b0116102cf578063aa60bdd01161017b578063d2762b46116100dc578063e5e2a0f611610092578063f2fde38b1161006d578063f2fde38b14610e95578063f3f119f114610eb4578063fb796e6c14610ec9575f5ffd5b8063e5e2a0f614610e13578063e985e9c514610e28578063ed9aab5114610e6f575f5ffd5b8063e079e461116100c2578063e079e46114610dc0578063e1136b3d14610ddf578063e56e9ac014610dfe575f5ffd5b8063d2762b4614610d96578063d5abeb0114610dab575f5ffd5b8063b88d4fde11610131578063c87b56dd11610117578063c87b56dd14610d4d578063cafd705f14610d6c578063d1c026c914610d81575f5ffd5b8063b88d4fde14610d1b578063c3d923a614610d2e575f5ffd5b8063abd017ea11610161578063abd017ea14610cbe578063ac19701b14610cdd578063b7c0b8e814610cfc575f5ffd5b8063aa60bdd014610c80578063ab7b499314610c9f575f5ffd5b8063871215d41161023057806396db3e89116101e6578063a42c05ba116101c1578063a42c05ba14610c42578063a70138c114610c57578063aa0678ff14610c6b575f5ffd5b806396db3e8914610be55780639e5f94a714610c04578063a22cb46514610c23575f5ffd5b80638e9a85f3116102165780638e9a85f314610ba957806395d89b4114610bbe57806396ce3bfa14610bd2575f5ffd5b8063871215d414610b785780638da5cb5b14610b8d575f5ffd5b806376ee0153116102855780637d4b5a211161026b5780637d4b5a2114610b315780637f371aa014610b44578063858633f214610b59575f5ffd5b806376ee015314610afd57806379544c8614610b1c575f5ffd5b8063715018a6116102b5578063715018a614610aab57806371be5e1414610abf57806372b0d90c14610ade575f5ffd5b80636f8b44b014610a6d57806370a0823114610a8c575f5ffd5b806341d94c981161042e578063545b70b21161038f5780635c1afecb1161034557806364f52a1f1161032057806364f52a1f14610a1a57806365216a4114610a2f578063691ce97014610a4e575f5ffd5b80635c1afecb146109d15780635d99a0cf146109e65780636352211e146109fb575f5ffd5b806355f804b31161037557806355f804b31461097e5780635944c7531461099d57806359a2f3bd146109bc575f5ffd5b8063545b70b21461094a57806355f5f0661461095f575f5ffd5b8063484b973c116103e45780634ed69eaf116103ca5780634ed69eaf146109015780634f115db1146109205780635438943714610935575f5ffd5b8063484b973c146108c35780634b21839e146108e2575f5ffd5b806342b5e15c1161041457806342b5e15c14610872578063462fed141461088557806346fff98d146108a4575f5ffd5b806341d94c981461084a57806342842e0e1461085f575f5ffd5b806318160ddd116104e357806330a08965116104995780633c6d5762116104745780633c6d5762146107f65780633ccfd60b14610821578063406466a714610835575f5ffd5b806330a08965146107a357806330db1d5b146107c25780633bf30394146107e1575f5ffd5b806323b872dd116104c957806323b872dd14610733578063251c21ec146107465780632a55205a14610765575f5ffd5b806318160ddd146106f957806321b8acd714610714575f5ffd5b8063081812fc116105385780630c92b6311161051e5780630c92b631146106915780630d4c1828146106b057806312b36510146106db575f5ffd5b8063081812fc14610647578063095ea7b31461067e575f5ffd5b806304634d8d1161056857806304634d8d146105f057806306fdde03146106115780630759f2d814610632575f5ffd5b80630141a4491461058357806301ffc9a7146105c1575b5f5ffd5b34801561058e575f5ffd5b506105ae61059d366004612db7565b60296020525f908152604090205481565b6040519081526020015b60405180910390f35b3480156105cc575f5ffd5b506105e06105db366004612de7565b610ee2565b60405190151581526020016105b8565b3480156105fb575f5ffd5b5061060f61060a366004612e1d565b610f01565b005b34801561061c575f5ffd5b50610625610f48565b6040516105b89190612e7e565b34801561063d575f5ffd5b506105ae60145481565b348015610652575f5ffd5b50610666610661366004612e90565b610fd8565b6040516001600160a01b0390911681526020016105b8565b61060f61068c366004612ea7565b611033565b34801561069c575f5ffd5b5061060f6106ab366004612e90565b611080565b3480156106bb575f5ffd5b506105ae6106ca366004612db7565b60216020525f908152604090205481565b3480156106e6575f5ffd5b50600f546105e090610100900460ff1681565b348015610704575f5ffd5b50600454600354035f19016105ae565b34801561071f575f5ffd5b5061060f61072e366004612e90565b61108d565b61060f610741366004612ed1565b61109a565b348015610751575f5ffd5b5061060f610760366004612e90565b6110d0565b348015610770575f5ffd5b5061078461077f366004612f0f565b6110dd565b604080516001600160a01b0390931683526020830191909152016105b8565b3480156107ae575f5ffd5b50600d54610666906001600160a01b031681565b3480156107cd575f5ffd5b5061060f6107dc366004612e90565b61116f565b3480156107ec575f5ffd5b506105ae601c5481565b348015610801575f5ffd5b506105ae610810366004612db7565b60196020525f908152604090205481565b34801561082c575f5ffd5b5061060f61117c565b348015610840575f5ffd5b506105ae60265481565b348015610855575f5ffd5b506105ae60135481565b61060f61086d366004612ed1565b6111f8565b61060f610880366004612e90565b611228565b348015610890575f5ffd5b5061060f61089f366004612e90565b61146c565b3480156108af575f5ffd5b5061060f6108be366004612f3c565b611479565b3480156108ce575f5ffd5b5061060f6108dd366004612ea7565b6114e6565b3480156108ed575f5ffd5b5061060f6108fc366004612e90565b61153e565b34801561090c575f5ffd5b5061060f61091b366004612f57565b61154b565b34801561092b575f5ffd5b506105ae601a5481565b348015610940575f5ffd5b506105ae60225481565b348015610955575f5ffd5b506105ae60155481565b34801561096a575f5ffd5b5061060f610979366004612e90565b611560565b348015610989575f5ffd5b5061060f610998366004612f57565b61156d565b3480156109a8575f5ffd5b5061060f6109b7366004612fc5565b611582565b3480156109c7575f5ffd5b506105ae601f5481565b3480156109dc575f5ffd5b506105ae601d5481565b3480156109f1575f5ffd5b506105ae601e5481565b348015610a06575f5ffd5b50610666610a15366004612e90565b6115c6565b348015610a25575f5ffd5b506105ae60185481565b348015610a3a575f5ffd5b5061060f610a493660046130d2565b6115d0565b348015610a59575f5ffd5b5061060f610a68366004612e90565b6116c7565b348015610a78575f5ffd5b5061060f610a87366004612e90565b6116d4565b348015610a97575f5ffd5b506105ae610aa6366004612db7565b6116e1565b348015610ab6575f5ffd5b5061060f611747565b348015610aca575f5ffd5b5061060f610ad9366004612e90565b61175a565b348015610ae9575f5ffd5b5061060f610af8366004612db7565b611767565b348015610b08575f5ffd5b5061060f610b17366004612e90565b6117df565b348015610b27575f5ffd5b506105ae601b5481565b61060f610b3f366004613197565b6117ec565b348015610b4f575f5ffd5b506105ae60245481565b348015610b64575f5ffd5b5061060f610b73366004612e90565b611ad7565b348015610b83575f5ffd5b506105ae600b5481565b348015610b98575f5ffd5b505f546001600160a01b0316610666565b348015610bb4575f5ffd5b506105ae60255481565b348015610bc9575f5ffd5b50610625611ae4565b61060f610be0366004613197565b611af3565b348015610bf0575f5ffd5b5061060f610bff366004612e90565b611dc6565b348015610c0f575f5ffd5b5061060f610c1e366004612e90565b611dd3565b348015610c2e575f5ffd5b5061060f610c3d36600461320c565b611de0565b348015610c4d575f5ffd5b506105ae60285481565b348015610c62575f5ffd5b5061060f611e28565b348015610c76575f5ffd5b506105ae60125481565b348015610c8b575f5ffd5b5061060f610c9a366004612e90565b611e3d565b348015610caa575f5ffd5b5061060f610cb9366004612db7565b611e4a565b348015610cc9575f5ffd5b50600f546105e09062010000900460ff1681565b348015610ce8575f5ffd5b5061060f610cf7366004612e90565b611e93565b348015610d07575f5ffd5b5061060f610d16366004612f3c565b611ea0565b61060f610d29366004613243565b611ebb565b348015610d39575f5ffd5b5061060f610d48366004612e90565b611ef3565b348015610d58575f5ffd5b50610625610d67366004612e90565b611f00565b348015610d77575f5ffd5b506105ae60275481565b348015610d8c575f5ffd5b506105ae60235481565b348015610da1575f5ffd5b506105ae600c5481565b348015610db6575f5ffd5b506105ae600e5481565b348015610dcb575f5ffd5b5061060f610dda366004612e90565b611fb6565b348015610dea575f5ffd5b5061060f610df9366004612e90565b611fc3565b348015610e09575f5ffd5b506105ae60175481565b348015610e1e575f5ffd5b506105ae60165481565b348015610e33575f5ffd5b506105e0610e42366004613305565b6001600160a01b039182165f908152600a6020908152604080832093909416825291909152205460ff1690565b348015610e7a575f5ffd5b50600f5461066690630100000090046001600160a01b031681565b348015610ea0575f5ffd5b5061060f610eaf366004612db7565b611fd0565b348015610ebf575f5ffd5b506105ae60205481565b348015610ed4575f5ffd5b50600f546105e09060ff1681565b5f610eec82612028565b80610efb5750610efb826120a7565b92915050565b610f096120f4565b6103e8816bffffffffffffffffffffffff161115610f3a5760405163f4df6ae560e01b815260040160405180910390fd5b610f448282612139565b5050565b606060058054610f5790613331565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613331565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b5050505050905090565b5f610fe28261221c565b611018576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505f908152600960205260409020546001600160a01b031690565b81600f5460ff1615611048576110488161224f565b600f54610100900460ff1615611071576040516336e278fd60e21b815260040160405180910390fd5b61107b838361228e565b505050565b6110886120f4565b602455565b6110956120f4565b602255565b826001600160a01b03811633146110bf57600f5460ff16156110bf576110bf3361224f565b6110ca84848461229a565b50505050565b6110d86120f4565b601255565b5f82815260026020526040812080548291906001600160a01b03811690600160a01b90046bffffffffffffffffffffffff168161113a5750506001546001600160a01b03811690600160a01b90046bffffffffffffffffffffffff165b5f6127106111566bffffffffffffffffffffffff84168961337d565b6111609190613394565b92989297509195505050505050565b6111776120f4565b601e55565b6111846120f4565b5f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146111ce576040519150601f19603f3d011682016040523d82523d5f602084013e6111d3565b606091505b50509050806111f5576040516312171d8360e31b815260040160405180910390fd5b50565b826001600160a01b038116331461121d57600f5460ff161561121d5761121d3361224f565b6110ca84848461249c565b6022541580159061123a575060225442105b1561125857604051636ea7008360e11b815260040160405180910390fd5b6023541580159061126a575060235442115b1561128857604051636ea7008360e11b815260040160405180910390fd5b600e54158015906112b05750600e54600454600354839190035f19016112ae91906133b3565b115b156112ce57604051638a164f6360e01b815260040160405180910390fd5b602454158015906112ed5750602454816025546112eb91906133b3565b115b1561130b57604051638a164f6360e01b815260040160405180910390fd5b80600b5460265461131c91906133b3565b611326919061337d565b34146113455760405163193e352b60e11b815260040160405180910390fd5b602754158015906113705750602754335f9081526029602052604090205461136e9083906133b3565b115b1561138e57604051638a164f6360e01b815260040160405180910390fd5b600b545f90158015906113ab5750600d546001600160a01b031615155b156113c15781600b546113be919061337d565b90505b600c545f90158015906113de5750600d546001600160a01b031615155b1561140a576127106113f083346133c6565b600c546113fd919061337d565b6114079190613394565b90505b5f61141582846133b3565b9050801561142657611426816124b6565b335f90815260296020526040812080548692906114449084906133b3565b925050819055508360255f82825461145c91906133b3565b909155506110ca905033856125e8565b6114746120f4565b601f55565b6114816120f4565b600f54630100000090046001600160a01b03166114ca576040517fe048e71000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054911515620100000262ff000019909216919091179055565b6114ee6120f4565b600e54158015906115165750600e54600454600354839190035f190161151491906133b3565b115b1561153457604051638a164f6360e01b815260040160405180910390fd5b610f4482826125e8565b6115466120f4565b601755565b6115536120f4565b601161107b82848361341d565b6115686120f4565b601855565b6115756120f4565b601061107b82848361341d565b61158a6120f4565b6103e8816bffffffffffffffffffffffff1611156115bb5760405163f4df6ae560e01b815260040160405180910390fd5b61107b838383612720565b5f610efb82612821565b6115d86120f4565b8051825114611613576040517ffc4c603600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b825181101561107b57600e54158015906116655750600e5482828151811061163f5761163f6134d7565b60200260200101516116596004546003545f199190030190565b61166391906133b3565b115b1561168357604051638a164f6360e01b815260040160405180910390fd5b6116bf838281518110611698576116986134d7565b60200260200101518383815181106116b2576116b26134d7565b60200260200101516125e8565b600101611615565b6116cf6120f4565b602355565b6116dc6120f4565b600e55565b5f6001600160a01b038216611722576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b03165f9081526008602052604090205467ffffffffffffffff1690565b61174f6120f4565b6117585f6128a8565b565b6117626120f4565b602655565b61176f6120f4565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146117b8576040519150601f19603f3d011682016040523d82523d5f602084013e6117bd565b606091505b5050905080610f44576040516312171d8360e31b815260040160405180910390fd5b6117e76120f4565b602755565b601254158015906117fe575060125442105b1561181c57604051636ea7008360e11b815260040160405180910390fd5b6013541580159061182e575060135442115b1561184c57604051636ea7008360e11b815260040160405180910390fd5b600e54158015906118745750600e54600454600354839190035f190161187291906133b3565b115b1561189257604051638a164f6360e01b815260040160405180910390fd5b601454158015906118b15750601454816015546118af91906133b3565b115b156118cf57604051638a164f6360e01b815260040160405180910390fd5b80600b546016546118e091906133b3565b6118ea919061337d565b34146119095760405163193e352b60e11b815260040160405180910390fd5b601854156119a8576040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506119898484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506018549150849050612904565b6119a65760405163582f497d60e11b815260040160405180910390fd5b505b601754158015906119d35750601754335f908152601960205260409020546119d19083906133b3565b115b156119f157604051638a164f6360e01b815260040160405180910390fd5b600b545f9015801590611a0e5750600d546001600160a01b031615155b15611a245781600b54611a21919061337d565b90505b600c545f9015801590611a415750600d546001600160a01b031615155b15611a6d57612710611a5383346133c6565b600c54611a60919061337d565b611a6a9190613394565b90505b5f611a7882846133b3565b90508015611a8957611a89816124b6565b335f9081526019602052604081208054869290611aa79084906133b3565b925050819055508360155f828254611abf91906133b3565b90915550611acf905033856125e8565b505050505050565b611adf6120f4565b601455565b606060068054610f5790613331565b601a5415801590611b055750601a5442105b15611b2357604051636ea7008360e11b815260040160405180910390fd5b601b5415801590611b355750601b5442115b15611b5357604051636ea7008360e11b815260040160405180910390fd5b600e5415801590611b7b5750600e54600454600354839190035f1901611b7991906133b3565b115b15611b9957604051638a164f6360e01b815260040160405180910390fd5b601c5415801590611bb85750601c5481601d54611bb691906133b3565b115b15611bd657604051638a164f6360e01b815260040160405180910390fd5b80600b54601e54611be791906133b3565b611bf1919061337d565b3414611c105760405163193e352b60e11b815260040160405180910390fd5b60205415611caf576040516bffffffffffffffffffffffff193360601b1660208201525f90603401604051602081830303815290604052805190602001209050611c908484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506020549150849050612904565b611cad5760405163582f497d60e11b815260040160405180910390fd5b505b601f5415801590611cda5750601f54335f90815260216020526040902054611cd89083906133b3565b115b15611cf857604051638a164f6360e01b815260040160405180910390fd5b600b545f9015801590611d155750600d546001600160a01b031615155b15611d2b5781600b54611d28919061337d565b90505b600c545f9015801590611d485750600d546001600160a01b031615155b15611d7457612710611d5a83346133c6565b600c54611d67919061337d565b611d719190613394565b90505b5f611d7f82846133b3565b90508015611d9057611d90816124b6565b335f9081526021602052604081208054869290611dae9084906133b3565b9250508190555083601d5f828254611abf91906133b3565b611dce6120f4565b602055565b611ddb6120f4565b602855565b81600f5460ff1615611df557611df58161224f565b600f54610100900460ff1615611e1e576040516336e278fd60e21b815260040160405180910390fd5b61107b8383612919565b611e306120f4565b600f805461ff0019169055565b611e456120f4565b601a55565b611e526120f4565b600f80546001600160a01b039092166301000000027fffffffffffffffffff0000000000000000000000000000000000000000ffffff909216919091179055565b611e9b6120f4565b601355565b611ea86120f4565b600f805460ff1916911515919091179055565b836001600160a01b0381163314611ee057600f5460ff1615611ee057611ee03361224f565b611eec85858585612984565b5050505050565b611efb6120f4565b601c55565b6060611f0b8261221c565b611f41576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611f4a6129c8565b90505f611f556129d7565b905081515f14611f925781611f69856129e6565b604051602001611f7a929190613502565b60405160208183030381529060405292505050919050565b805115611fa0579392505050565b505060408051602081019091525f815292915050565b611fbe6120f4565b601b55565b611fcb6120f4565b601655565b611fd86120f4565b6001600160a01b03811661201f576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6111f5816128a8565b5f6301ffc9a760e01b6001600160e01b03198316148061207157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610efb5750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b5f6001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610efb57506301ffc9a760e01b6001600160e01b0319831614610efb565b5f546001600160a01b03163314611758576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401612016565b6127106bffffffffffffffffffffffff821681101561219b576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8316600482015260248101829052604401612016565b6001600160a01b0383166121dd576040517fb6d9900a0000000000000000000000000000000000000000000000000000000081525f6004820152602401612016565b50604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600155565b5f8160011115801561222f575060035482105b8015610efb5750505f90815260076020526040902054600160e01b161590565b69c61711340011223344555f5230601a5280603a525f5f604460166daaeb6d7670e522a718067333cd4e5afa612287573d5f5f3e3d5ffd5b5f603a5250565b610f4482826001612a29565b5f6122a482612821565b9050836001600160a01b0316816001600160a01b0316146122f1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8281526009602052604090208054338082146001600160a01b03881690911417612372576001600160a01b0386165f908152600a6020908152604080832033845290915290205460ff16612372576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166123b2576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123bf8686866001612b10565b80156123c9575f82555b6001600160a01b038681165f9081526008602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260076020526040812091909155600160e11b8416900361245657600184015f818152600760205260408120549003612454576003548114612454575f8181526007602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611acf565b61107b83838360405180602001604052805f815250611ebb565b805f036124ef576040517f5e2a89dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d546001600160a01b0316612531576040517fcd0081c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d546040515f916001600160a01b03169083908381818185875af1925050503d805f811461257b576040519150601f19603f3d011682016040523d82523d5f602084013e612580565b606091505b50509050806125a2576040516312171d8360e31b815260040160405180910390fd5b600d546040518381526001600160a01b03909116907f2b5dffd9914ddb43acdb6963bacf053a87bf9354300844f6339f17741e25145a9060200160405180910390a25050565b6003545f829003612625576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126315f848385612b10565b6001600160a01b0383165f8181526008602090815260408083208054680100000000000000018802019055848352600790915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146126dd5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f5fa46001016126a7565b50815f03612717576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035550505050565b6127106bffffffffffffffffffffffff8216811015612789576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018590526bffffffffffffffffffffffff8316602482015260448101829052606401612016565b6001600160a01b0383166127d2576040517f969f0852000000000000000000000000000000000000000000000000000000008152600481018590525f6024820152604401612016565b506040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182525f968752600290529190942093519051909116600160a01b029116179055565b5f8160011161288f57505f8181526007602052604081205490600160e01b8216900361288f57805f0361288a57600354821061287057604051636f96cda160e11b815260040160405180910390fd5b5b505f19015f818152600760205260409020548015612871575b919050565b604051636f96cda160e11b815260040160405180910390fd5b5f80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f826129108584612ba0565b14949350505050565b335f818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61298f84848461109a565b6001600160a01b0383163b156110ca576129ab84848484612be2565b6110ca576040516368d2bf6b60e11b815260040160405180910390fd5b606060108054610f5790613331565b606060118054610f5790613331565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129ff5750819003601f19909101908152919050565b5f612a33836115c6565b90508115612aa757336001600160a01b03821614612aa7576001600160a01b0381165f908152600a6020908152604080832033845290915290205460ff16612aa7576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83815260096020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600f54610100900460ff168015612b2f57506001600160a01b03841615155b8015612b4357506001600160a01b03831615155b15612b61576040516336e278fd60e21b815260040160405180910390fd5b612b6a33612cc9565b6110ca576040517f4c80d8be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81815b8451811015612bda57612bd082868381518110612bc357612bc36134d7565b6020026020010151612d7a565b9150600101612ba4565b509392505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612c1690339089908890889060040161356c565b6020604051808303815f875af1925050508015612c50575060408051601f3d908101601f19168201909252612c4d918101906135ac565b60015b612cac573d808015612c7d576040519150601f19603f3d011682016040523d82523d5f602084013e612c82565b606091505b5080515f03612ca4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600f545f9062010000900460ff1615612d7257600f546040517fe18bc08a0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152630100000090920490911690819063e18bc08a90602401602060405180830381865afa158015612d47573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d6b91906135c7565b9392505050565b506001919050565b5f818310612d94575f828152602084905260409020612d6b565b505f9182526020526040902090565b6001600160a01b03811681146111f5575f5ffd5b5f60208284031215612dc7575f5ffd5b8135612d6b81612da3565b6001600160e01b0319811681146111f5575f5ffd5b5f60208284031215612df7575f5ffd5b8135612d6b81612dd2565b80356bffffffffffffffffffffffff8116811461288a575f5ffd5b5f5f60408385031215612e2e575f5ffd5b8235612e3981612da3565b9150612e4760208401612e02565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f612d6b6020830184612e50565b5f60208284031215612ea0575f5ffd5b5035919050565b5f5f60408385031215612eb8575f5ffd5b8235612ec381612da3565b946020939093013593505050565b5f5f5f60608486031215612ee3575f5ffd5b8335612eee81612da3565b92506020840135612efe81612da3565b929592945050506040919091013590565b5f5f60408385031215612f20575f5ffd5b50508035926020909101359150565b80151581146111f5575f5ffd5b5f60208284031215612f4c575f5ffd5b8135612d6b81612f2f565b5f5f60208385031215612f68575f5ffd5b823567ffffffffffffffff811115612f7e575f5ffd5b8301601f81018513612f8e575f5ffd5b803567ffffffffffffffff811115612fa4575f5ffd5b856020828401011115612fb5575f5ffd5b6020919091019590945092505050565b5f5f5f60608486031215612fd7575f5ffd5b833592506020840135612fe981612da3565b9150612ff760408501612e02565b90509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561303d5761303d613000565b604052919050565b5f67ffffffffffffffff82111561305e5761305e613000565b5060051b60200190565b5f82601f830112613077575f5ffd5b813561308a61308582613045565b613014565b8082825260208201915060208360051b8601019250858311156130ab575f5ffd5b602085015b838110156130c85780358352602092830192016130b0565b5095945050505050565b5f5f604083850312156130e3575f5ffd5b823567ffffffffffffffff8111156130f9575f5ffd5b8301601f81018513613109575f5ffd5b803561311761308582613045565b8082825260208201915060208360051b850101925087831115613138575f5ffd5b6020840193505b8284101561316357833561315281612da3565b82526020938401939091019061313f565b9450505050602083013567ffffffffffffffff811115613181575f5ffd5b61318d85828601613068565b9150509250929050565b5f5f5f604084860312156131a9575f5ffd5b833567ffffffffffffffff8111156131bf575f5ffd5b8401601f810186136131cf575f5ffd5b803567ffffffffffffffff8111156131e5575f5ffd5b8660208260051b84010111156131f9575f5ffd5b6020918201979096509401359392505050565b5f5f6040838503121561321d575f5ffd5b823561322881612da3565b9150602083013561323881612f2f565b809150509250929050565b5f5f5f5f60808587031215613256575f5ffd5b843561326181612da3565b9350602085013561327181612da3565b925060408501359150606085013567ffffffffffffffff811115613293575f5ffd5b8501601f810187136132a3575f5ffd5b803567ffffffffffffffff8111156132bd576132bd613000565b6132d0601f8201601f1916602001613014565b8181528860208385010111156132e4575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f5f60408385031215613316575f5ffd5b823561332181612da3565b9150602083013561323881612da3565b600181811c9082168061334557607f821691505b60208210810361336357634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610efb57610efb613369565b5f826133ae57634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610efb57610efb613369565b81810381811115610efb57610efb613369565b601f82111561107b57805f5260205f20601f840160051c810160208510156133fe5750805b601f840160051c820191505b81811015611eec575f815560010161340a565b67ffffffffffffffff83111561343557613435613000565b613449836134438354613331565b836133d9565b5f601f84116001811461347a575f85156134635750838201355b5f19600387901b1c1916600186901b178355611eec565b5f83815260208120601f198716915b828110156134a95786850135825560209485019460019092019101613489565b50868210156134c5575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b5f52603260045260245ffd5b5f81518060208401855e5f93019283525090919050565b5f61350d82856134eb565b7f2f00000000000000000000000000000000000000000000000000000000000000815261353d60018201856134eb565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050195945050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6135a26080830184612e50565b9695505050505050565b5f602082840312156135bc575f5ffd5b8151612d6b81612dd2565b5f602082840312156135d7575f5ffd5b8151612d6b81612f2f56fea26469706673582212206d7e87cbc9dfbeb056be50c2fb6990e7a2c539a63324e0c86344e63da45cf5ae64736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.