Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
5,555 LILH
Holders
795
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
4 LILHLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
LilHomies
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 8888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; pragma solidity 0.8.15; contract LilHomies is ERC721ABurnable, ERC721AQueryable, IERC2981, ReentrancyGuard, Pausable, Ownable { using Address for address; // MODIFIERS modifier onlyDevs() { require(isDeveloper[msg.sender], "Dev Only: caller is not the developer"); _; } //EVENTS event WithdrawFees(address indexed devAddress, uint256 amount); event WithdrawWrongTokens(address indexed devAddress, address tokenAddress, uint256 amount); event WithdrawWrongNfts(address indexed devAddress, address tokenAddress, uint256 tokenId); // CONSTANTS uint256 private constant MAX_SUPPLY = 5555; string public baseURI; bytes32 public merkleRoot; // VARIABLES uint256 public maxSupply = MAX_SUPPLY; uint256 public maxPerTx = 1; uint256 public maxPerPerson = 5; bool public whitelistedOnly; address public royaltyAddress = 0xCD30e2F4c6aA0657465886B2B9Ee96cD42515bcC; uint256 public royalty = 750; // MAPPINGS mapping(address => bool) public whitelistMinted; mapping(address => bool) public isDeveloper; constructor(address[] memory _devList, bytes32 merkleRoot_) ERC721A("Lil Homies", "LILH") { for (uint8 i = 0; i < _devList.length; i++) { isDeveloper[_devList[i]] = true; } whitelistedOnly = true; merkleRoot = merkleRoot_; _pause(); } function _baseURI() internal view override returns (string memory) { return baseURI; } function whitelistedMint(uint256 quantity, bytes32[] calldata merkleProof) external payable whenNotPaused nonReentrant { require(whitelistedOnly,"Error: whitelisted mint turned off"); uint256 supply = _totalMinted(); require(supply < maxSupply, "Error: cannot mint more than total supply"); require(!whitelistMinted[msg.sender], "Error: you already minted"); bytes32 node = keccak256(abi.encodePacked(msg.sender, quantity)); require( MerkleProof.verify(merkleProof, merkleRoot, node), "Error: you are not whitelisted or invalid quantity" ); if (supply + quantity > maxSupply) { quantity = maxSupply - supply; } whitelistMinted[msg.sender] = true; _safeMint(msg.sender, quantity); } function mint(uint256 quantity) external payable whenNotPaused nonReentrant { require(!whitelistedOnly,"Error: whitelisted only turned on"); uint256 supply = _totalMinted(); require( supply + quantity - 1 < maxSupply, "Error: cannot mint more than total supply" ); require(quantity <= maxPerTx, "Error: max per tx limit"); require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit"); _safeMint(msg.sender, quantity); } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { return super.tokenURI(tokenId); } function tokenExists(uint256 _id) external view returns (bool) { return (_exists(_id)); } function royaltyInfo(uint256, uint256 _salePrice) external view override(IERC2981) returns (address receiver, uint256 royaltyAmount) { return (royaltyAddress, (_salePrice * royalty) / 10000); } function updateMerkleRoot(bytes32 merkleRoot_) external onlyOwner { merkleRoot = merkleRoot_; } function updatePausedStatus() external onlyOwner { paused() ? _unpause() : _pause(); } function updateWhitelistedStatus() external onlyOwner { whitelistedOnly = !whitelistedOnly; } function setMaxPerPerson(uint256 newMaxBuy) external onlyOwner { maxPerPerson = newMaxBuy; } function setMaxPerTx(uint256 newMaxBuy) external onlyOwner { maxPerTx = newMaxBuy; } function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } function setRoyalty(uint16 _royalty) external onlyOwner { require(_royalty <= 750, "Royalty must be lower than or equal to 7,5%"); royalty = _royalty; } function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { royaltyAddress = _royaltyAddress; } //Overrides function _startTokenId() internal view virtual override returns (uint256) { return 0; } function safeMint(address to, uint256 count) public onlyOwner { _safeMint(to, count); } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC721A, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || ERC721A.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } /// @dev emergency withdraw contract balance to the contract owner function emergencyWithdraw() external onlyOwner { uint256 amount = address(this).balance; require(amount > 0, "Error: no fees :("); payable(msg.sender).transfer(amount); emit WithdrawFees(msg.sender, amount); } function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner { for (uint256 i = 0; i < _addr.length; i++) { _safeMint(_addr[i], amount); } } /// @dev withdraw ERC20 tokens function withdrawTokens(address _tokenContract) external onlyOwner { IERC20 tokenContract = IERC20(_tokenContract); uint256 _amount = tokenContract.balanceOf(address(this)); tokenContract.transfer(owner(), _amount); emit WithdrawWrongTokens(msg.sender, _tokenContract, _amount); } /// @dev withdraw ERC721 tokens to the contract owner function withdrawNFT(address _tokenContract, uint256[] memory _id) external onlyOwner { ERC721A tokenContract = ERC721A(_tokenContract); for (uint256 i = 0; i < _id.length; i++) { tokenContract.safeTransferFrom(address(this), owner(), _id[i]); emit WithdrawWrongNfts(msg.sender, _tokenContract, _id[i]); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * 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. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// 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 v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
{ "optimizer": { "enabled": true, "runs": 8888 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"_devList","type":"address[]"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"devAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"devAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WithdrawWrongNfts","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"devAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawWrongTokens","type":"event"},{"inputs":[{"internalType":"address[]","name":"_addr","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdropsToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDeveloper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerPerson","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerTx","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":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxBuy","type":"uint256"}],"name":"setMaxPerPerson","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxBuy","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_royalty","type":"uint16"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"tokenExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePausedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateWhitelistedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"whitelistedMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whitelistedOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256[]","name":"_id","type":"uint256[]"}],"name":"withdrawNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526115b3600c556001600d556005600e55600f8054610100600160a81b03191674cd30e2f4c6aa0657465886b2b9ee96cd42515bcc001790556102ee6010553480156200004f57600080fd5b50604051620039ea380380620039ea8339810160408190526200007291620002c4565b6040518060400160405280600a8152602001694c696c20486f6d69657360b01b815250604051806040016040528060048152602001630989298960e31b8152508160029081620000c391906200042d565b506003620000d282826200042d565b5060008055505060016008556009805460ff19169055620000f3336200018d565b60005b82518160ff1610156200016857600160126000858460ff1681518110620001215762000121620004f9565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806200015f816200050f565b915050620000f6565b50600f805460ff19166001179055600b81905562000185620001e7565b50506200053d565b600980546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001f162000244565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620002273390565b6040516001600160a01b03909116815260200160405180910390a1565b60095460ff16156200028f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002bf57600080fd5b919050565b60008060408385031215620002d857600080fd5b82516001600160401b0380821115620002f057600080fd5b818501915085601f8301126200030557600080fd5b81516020828211156200031c576200031c62000291565b8160051b604051601f19603f8301168101818110868211171562000344576200034462000291565b6040529283528183019350848101820192898411156200036357600080fd5b948201945b838610156200038c576200037c86620002a7565b8552948201949382019362000368565b97909101519698969750505050505050565b600181811c90821680620003b357607f821691505b602082108103620003d457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200042857600081815260208120601f850160051c81016020861015620004035750805b601f850160051c820191505b8181101562000424578281556001016200040f565b5050505b505050565b81516001600160401b0381111562000449576200044962000291565b62000461816200045a84546200039e565b84620003da565b602080601f831160018114620004995760008415620004805750858301515b600019600386901b1c1916600185901b17855562000424565b600085815260208120601f198616915b82811015620004ca57888601518255948401946001909101908401620004a9565b5085821015620004e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036200053457634e487b7160e01b600052601160045260246000fd5b60010192915050565b61349d806200054d6000396000f3fe6080604052600436106103285760003560e01c80636c0360eb116101a5578063a0712d68116100ec578063c6f6f21611610095578063db2e21bc1161006f578063db2e21bc146108d4578063e985e9c5146108e9578063f2fde38b14610932578063f968adbe1461095257600080fd5b8063c6f6f2161461087e578063c87b56dd1461089e578063d5abeb01146108be57600080fd5b8063ad2f852a116100c6578063ad2f852a14610819578063b88d4fde1461083e578063c23dc68f1461085157600080fd5b8063a0712d68146107c6578063a1448194146107d9578063a22cb465146107f957600080fd5b80638da5cb5b1161014e57806398a8cffe1161012857806398a8cffe1461075657806399a2557a146107865780639bdedea5146107a657600080fd5b80638da5cb5b146107045780639186b4251461072757806395d89b411461074157600080fd5b8063715018a61161017f578063715018a6146106ac578063768d7138146106c15780638462151c146106d757600080fd5b80636c0360eb146106645780636f9950471461067957806370a082311461068c57600080fd5b806336e79a5a1161027457806355f804b31161021d5780635c975abb116101f75780635c975abb146105e75780635eca4a70146105ff5780636352211e1461062f57806367dded4d1461064f57600080fd5b806355f804b3146105855780635693dd38146105a55780635bbb2177146105ba57600080fd5b80634783f0ef1161024e5780634783f0ef14610525578063483efda21461054557806349df728c1461056557600080fd5b806336e79a5a146104d257806342842e0e146104f257806342966c681461050557600080fd5b806318160ddd116102d657806329ee566c116102b057806329ee566c146104675780632a55205a1461047d5780632eb4a7ab146104bc57600080fd5b806318160ddd1461041157806323b872dd1461043457806329413b121461044757600080fd5b806306fdde031161030757806306fdde03146103a4578063081812fc146103c6578063095ea7b3146103fe57600080fd5b8062923f9e1461032d57806301ffc9a71461036257806306d254da14610382575b600080fd5b34801561033957600080fd5b5061034d610348366004612a3d565b610968565b60405190151581526020015b60405180910390f35b34801561036e57600080fd5b5061034d61037d366004612a84565b610979565b34801561038e57600080fd5b506103a261039d366004612abd565b6109de565b005b3480156103b057600080fd5b506103b9610a25565b6040516103599190612b30565b3480156103d257600080fd5b506103e66103e1366004612a3d565b610ab7565b6040516001600160a01b039091168152602001610359565b6103a261040c366004612b43565b610b14565b34801561041d57600080fd5b50600154600054035b604051908152602001610359565b6103a2610442366004612b6d565b610be5565b34801561045357600080fd5b506103a2610462366004612c2d565b610e06565b34801561047357600080fd5b5061042660105481565b34801561048957600080fd5b5061049d610498366004612cd0565b610e54565b604080516001600160a01b039093168352602083019190915201610359565b3480156104c857600080fd5b50610426600b5481565b3480156104de57600080fd5b506103a26104ed366004612cf2565b610e94565b6103a2610500366004612b6d565b610f26565b34801561051157600080fd5b506103a2610520366004612a3d565b610f41565b34801561053157600080fd5b506103a2610540366004612a3d565b610f4f565b34801561055157600080fd5b506103a2610560366004612a3d565b610f5c565b34801561057157600080fd5b506103a2610580366004612abd565b610f69565b34801561059157600080fd5b506103a26105a0366004612d6e565b6110f3565b3480156105b157600080fd5b506103a261110b565b3480156105c657600080fd5b506105da6105d5366004612dfc565b611127565b6040516103599190612e3e565b3480156105f357600080fd5b5060095460ff1661034d565b34801561060b57600080fd5b5061034d61061a366004612abd565b60126020526000908152604090205460ff1681565b34801561063b57600080fd5b506103e661064a366004612a3d565b6111f3565b34801561065b57600080fd5b506103a26111fe565b34801561067057600080fd5b506103b9611222565b6103a2610687366004612ebb565b6112b0565b34801561069857600080fd5b506104266106a7366004612abd565b6115bb565b3480156106b857600080fd5b506103a2611623565b3480156106cd57600080fd5b50610426600e5481565b3480156106e357600080fd5b506106f76106f2366004612abd565b611635565b6040516103599190612f07565b34801561071057600080fd5b5060095461010090046001600160a01b03166103e6565b34801561073357600080fd5b50600f5461034d9060ff1681565b34801561074d57600080fd5b506103b9611736565b34801561076257600080fd5b5061034d610771366004612abd565b60116020526000908152604090205460ff1681565b34801561079257600080fd5b506106f76107a1366004612f3f565b611745565b3480156107b257600080fd5b506103a26107c1366004612f72565b6118d8565b6103a26107d4366004612a3d565b611a39565b3480156107e557600080fd5b506103a26107f4366004612b43565b611c6a565b34801561080557600080fd5b506103a2610814366004613024565b611c7c565b34801561082557600080fd5b50600f546103e69061010090046001600160a01b031681565b6103a261084c36600461305b565b611ce8565b34801561085d57600080fd5b5061087161086c366004612a3d565b611d45565b60405161035991906130d7565b34801561088a57600080fd5b506103a2610899366004612a3d565b611dbd565b3480156108aa57600080fd5b506103b96108b9366004612a3d565b611dca565b3480156108ca57600080fd5b50610426600c5481565b3480156108e057600080fd5b506103a2611dd5565b3480156108f557600080fd5b5061034d61090436600461311c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561093e57600080fd5b506103a261094d366004612abd565b611e91565b34801561095e57600080fd5b50610426600d5481565b600061097382611f1e565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806109cf57506109cf82611f5e565b80610973575061097382611f5e565b6109e661203f565b600f80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b606060028054610a349061314f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a609061314f565b8015610aad5780601f10610a8257610100808354040283529160200191610aad565b820191906000526020600020905b815481529060010190602001808311610a9057829003601f168201915b5050505050905090565b6000610ac282611f1e565b610af8576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b1f826111f3565b9050336001600160a01b03821614610b7157610b3b8133610904565b610b71576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610bf08261209f565b9050836001600160a01b0316816001600160a01b031614610c3d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610c698187335b6001600160a01b039081169116811491141790565b610cad57610c778633610904565b610cad576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610ced576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610cf857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610dbc57600184016000818152600460205260408120549003610dba576000548114610dba5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610e0e61203f565b60005b8251811015610e4f57610e3d838281518110610e2f57610e2f6131a2565b602002602001015183612138565b80610e4781613200565b915050610e11565b505050565b600080600f60019054906101000a90046001600160a01b031661271060105485610e7e919061321a565b610e889190613239565b915091505b9250929050565b610e9c61203f565b6102ee8161ffff161115610f1d5760405162461bcd60e51b815260206004820152602b60248201527f526f79616c7479206d757374206265206c6f776572207468616e206f7220657160448201527f75616c20746f20372c352500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61ffff16601055565b610e4f83838360405180602001604052806000815250611ce8565b610f4c816001612152565b50565b610f5761203f565b600b55565b610f6461203f565b600e55565b610f7161203f565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610fd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff79190613274565b9050816001600160a01b031663a9059cbb6110206009546001600160a01b036101009091041690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a9919061328d565b50604080516001600160a01b03851681526020810183905233917f5aa586896a67fb05c3b86276f66eecee7da00719d0e7299c403596fa2ec58ca4910160405180910390a2505050565b6110fb61203f565b600a61110782826132f0565b5050565b61111361203f565b600f805460ff19811660ff90911615179055565b60608160008167ffffffffffffffff81111561114557611145612ba9565b60405190808252806020026020018201604052801561119757816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111635790505b50905060005b8281146111ea576111c58686838181106111b9576111b96131a2565b90506020020135611d45565b8282815181106111d7576111d76131a2565b602090810291909101015260010161119d565b50949350505050565b60006109738261209f565b61120661203f565b60095460ff1661121a576112186122e7565b565b611218612341565b600a805461122f9061314f565b80601f016020809104026020016040519081016040528092919081815260200182805461125b9061314f565b80156112a85780601f1061127d576101008083540402835291602001916112a8565b820191906000526020600020905b81548152906001019060200180831161128b57829003601f168201915b505050505081565b6112b861237a565b60026008540361130a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f14565b6002600855600f5460ff166113875760405162461bcd60e51b815260206004820152602260248201527f4572726f723a2077686974656c6973746564206d696e74207475726e6564206f60448201527f66660000000000000000000000000000000000000000000000000000000000006064820152608401610f14565b600054600c5481106114015760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2063616e6e6f74206d696e74206d6f7265207468616e20746f7460448201527f616c20737570706c7900000000000000000000000000000000000000000000006064820152608401610f14565b3360009081526011602052604090205460ff16156114615760405162461bcd60e51b815260206004820152601960248201527f4572726f723a20796f7520616c7265616479206d696e746564000000000000006044820152606401610f14565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481018590526000906054016040516020818303038152906040528051906020012090506114f584848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508490506123cd565b6115675760405162461bcd60e51b815260206004820152603260248201527f4572726f723a20796f7520617265206e6f742077686974656c6973746564206f60448201527f7220696e76616c6964207175616e7469747900000000000000000000000000006064820152608401610f14565b600c5461157486846133b0565b111561158b5781600c5461158891906133c8565b94505b336000818152601160205260409020805460ff191660011790556115af9086612138565b50506001600855505050565b60006001600160a01b0382166115fd576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61162b61203f565b61121860006123e3565b60606000806000611645856115bb565b905060008167ffffffffffffffff81111561166257611662612ba9565b60405190808252806020026020018201604052801561168b578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b83861461172a576116c381612454565b915081604001516117225781516001600160a01b0316156116e357815194505b876001600160a01b0316856001600160a01b0316036117225780838780600101985081518110611715576117156131a2565b6020026020010181815250505b6001016116b3565b50909695505050505050565b606060038054610a349061314f565b6060818310611780576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061178c60005490565b90508084111561179a578093505b60006117a5876115bb565b9050848610156117c457858503818110156117be578091505b506117c8565b5060005b60008167ffffffffffffffff8111156117e3576117e3612ba9565b60405190808252806020026020018201604052801561180c578160200160208202803683370190505b509050816000036118225793506118d192505050565b600061182d88611d45565b90506000816040015161183e575080515b885b8881141580156118505750848714155b156118c55761185e81612454565b925082604001516118bd5782516001600160a01b03161561187e57825191505b8a6001600160a01b0316826001600160a01b0316036118bd57808488806001019950815181106118b0576118b06131a2565b6020026020010181815250505b600101611840565b50505092835250909150505b9392505050565b6118e061203f565b8160005b8251811015611a3357816001600160a01b03166342842e0e306119156009546001600160a01b036101009091041690565b868581518110611927576119276131a2565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561199957600080fd5b505af11580156119ad573d6000803e3d6000fd5b50505050336001600160a01b03167fb8dbf4ce06446b88ef02ffd28a948c2637ac80fb0bd4d3a31c70878c1046eb7f858584815181106119ef576119ef6131a2565b6020026020010151604051611a199291906001600160a01b03929092168252602082015260400190565b60405180910390a280611a2b81613200565b9150506118e4565b50505050565b611a4161237a565b600260085403611a935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f14565b6002600855600f5460ff1615611b115760405162461bcd60e51b815260206004820152602160248201527f4572726f723a2077686974656c6973746564206f6e6c79207475726e6564206f60448201527f6e000000000000000000000000000000000000000000000000000000000000006064820152608401610f14565b600054600c546001611b2384846133b0565b611b2d91906133c8565b10611ba05760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2063616e6e6f74206d696e74206d6f7265207468616e20746f7460448201527f616c20737570706c7900000000000000000000000000000000000000000000006064820152608401610f14565b600d54821115611bf25760405162461bcd60e51b815260206004820152601760248201527f4572726f723a206d617820706572207478206c696d69740000000000000000006044820152606401610f14565b600e54611bfe336115bb565b611c099060016133b0565b1115611c575760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a206d6178207065722061646472657373206c696d6974000000006044820152606401610f14565b611c613383612138565b50506001600855565b611c7261203f565b6111078282612138565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611cf3848484610be5565b6001600160a01b0383163b15611a3357611d0f848484846124ec565b611a33576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160808082018352600080835260208084018290528385018290526060808501839052855193840186528284529083018290529382018190529281018390529091506000548310611d995792915050565b611da283612454565b9050806040015115611db45792915050565b6118d18361263b565b611dc561203f565b600d55565b6060610973826126cc565b611ddd61203f565b4780611e2b5760405162461bcd60e51b815260206004820152601160248201527f4572726f723a206e6f2066656573203a280000000000000000000000000000006044820152606401610f14565b604051339082156108fc029083906000818181858888f19350505050158015611e58573d6000803e3d6000fd5b5060405181815233907f9bba815921f12cb7b1408e14b5ade745234397d39623ae5e7c82d693cb45815f9060200160405180910390a250565b611e9961203f565b6001600160a01b038116611f155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f14565b610f4c816123e3565b60008054821080156109735750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480611ff157507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806109735750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6009546001600160a01b036101009091041633146112185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f14565b60008160005481101561210657600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003612104575b806000036118d15750600019016000818152600460205260409020546120e3565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611107828260405180602001604052806000815250612768565b600061215d8361209f565b90508060008061217b86600090815260066020526040902080549091565b9150915084156121d457612190818433610c54565b6121d45761219e8333610904565b6121d4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156121df57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c0300000000000000000000000000000000000000000000000000000000176000878152600460205260408120919091557c02000000000000000000000000000000000000000000000000000000008516900361229f5760018601600081815260046020526040812054900361229d57600054811461229d5760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b6122ef61237a565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123243390565b6040516001600160a01b03909116815260200160405180910390a1565b6123496127ee565b6009805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612324565b60095460ff16156112185760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f14565b6000826123da8584612840565b14949350505050565b600980546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff85161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461097390604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061253a9033908990889088906004016133df565b6020604051808303816000875af1925050508015612575575060408051601f3d908101601f191682019092526125729181019061341b565b60015b6125ec573d8080156125a3576040519150601f19603f3d011682016040523d82523d6000602084013e6125a8565b606091505b5080516000036125e4576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261097361266b8361209f565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b60606126d782611f1e565b61270d576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061271761288d565b9050805160000361273757604051806020016040528060008152506118d1565b806127418461289c565b604051602001612752929190613438565b6040516020818303038152906040529392505050565b61277283836128e0565b6001600160a01b0383163b15610e4f576000548281035b61279c60008683806001019450866124ec565b6127d2576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106127895781600054146127e757600080fd5b5050505050565b60095460ff166112185760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f14565b600081815b84518110156128855761287182868381518110612864576128646131a2565b6020026020010151612a11565b91508061287d81613200565b915050612845565b509392505050565b6060600a8054610a349061314f565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806128b65750819003601f19909101908152919050565b600080549082900361291e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146129cd57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612995565b5081600003612a08576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818310612a2d5760008281526020849052604090206118d1565b5060009182526020526040902090565b600060208284031215612a4f57600080fd5b5035919050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610f4c57600080fd5b600060208284031215612a9657600080fd5b81356118d181612a56565b80356001600160a01b0381168114612ab857600080fd5b919050565b600060208284031215612acf57600080fd5b6118d182612aa1565b60005b83811015612af3578181015183820152602001612adb565b83811115611a335750506000910152565b60008151808452612b1c816020860160208601612ad8565b601f01601f19169290920160200192915050565b6020815260006118d16020830184612b04565b60008060408385031215612b5657600080fd5b612b5f83612aa1565b946020939093013593505050565b600080600060608486031215612b8257600080fd5b612b8b84612aa1565b9250612b9960208501612aa1565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c0157612c01612ba9565b604052919050565b600067ffffffffffffffff821115612c2357612c23612ba9565b5060051b60200190565b60008060408385031215612c4057600080fd5b823567ffffffffffffffff811115612c5757600080fd5b8301601f81018513612c6857600080fd5b80356020612c7d612c7883612c09565b612bd8565b82815260059290921b83018101918181019088841115612c9c57600080fd5b938201935b83851015612cc157612cb285612aa1565b82529382019390820190612ca1565b98969091013596505050505050565b60008060408385031215612ce357600080fd5b50508035926020909101359150565b600060208284031215612d0457600080fd5b813561ffff811681146118d157600080fd5b600067ffffffffffffffff831115612d3057612d30612ba9565b612d436020601f19601f86011601612bd8565b9050828152838383011115612d5757600080fd5b828260208301376000602084830101529392505050565b600060208284031215612d8057600080fd5b813567ffffffffffffffff811115612d9757600080fd5b8201601f81018413612da857600080fd5b61263384823560208401612d16565b60008083601f840112612dc957600080fd5b50813567ffffffffffffffff811115612de157600080fd5b6020830191508360208260051b8501011115610e8d57600080fd5b60008060208385031215612e0f57600080fd5b823567ffffffffffffffff811115612e2657600080fd5b612e3285828601612db7565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561172a57612ea88385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612e5a565b600080600060408486031215612ed057600080fd5b83359250602084013567ffffffffffffffff811115612eee57600080fd5b612efa86828701612db7565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b8181101561172a57835183529284019291840191600101612f23565b600080600060608486031215612f5457600080fd5b612f5d84612aa1565b95602085013595506040909401359392505050565b60008060408385031215612f8557600080fd5b612f8e83612aa1565b915060208084013567ffffffffffffffff811115612fab57600080fd5b8401601f81018613612fbc57600080fd5b8035612fca612c7882612c09565b81815260059190911b82018301908381019088831115612fe957600080fd5b928401925b8284101561300757833582529284019290840190612fee565b80955050505050509250929050565b8015158114610f4c57600080fd5b6000806040838503121561303757600080fd5b61304083612aa1565b9150602083013561305081613016565b809150509250929050565b6000806000806080858703121561307157600080fd5b61307a85612aa1565b935061308860208601612aa1565b925060408501359150606085013567ffffffffffffffff8111156130ab57600080fd5b8501601f810187136130bc57600080fd5b6130cb87823560208401612d16565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610973565b6000806040838503121561312f57600080fd5b61313883612aa1565b915061314660208401612aa1565b90509250929050565b600181811c9082168061316357607f821691505b60208210810361319c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006000198203613213576132136131d1565b5060010190565b6000816000190483118215151615613234576132346131d1565b500290565b60008261326f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561328657600080fd5b5051919050565b60006020828403121561329f57600080fd5b81516118d181613016565b601f821115610e4f57600081815260208120601f850160051c810160208610156132d15750805b601f850160051c820191505b81811015610dfe578281556001016132dd565b815167ffffffffffffffff81111561330a5761330a612ba9565b61331e81613318845461314f565b846132aa565b602080601f831160018114613353576000841561333b5750858301515b600019600386901b1c1916600185901b178555610dfe565b600085815260208120601f198616915b8281101561338257888601518255948401946001909101908401613363565b50858210156133a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156133c3576133c36131d1565b500190565b6000828210156133da576133da6131d1565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526134116080830184612b04565b9695505050505050565b60006020828403121561342d57600080fd5b81516118d181612a56565b6000835161344a818460208801612ad8565b83519083019061345e818360208801612ad8565b0194935050505056fea26469706673582212207b4522c17eaae9cab25e5257d86a6c8218bd6c8a5d88aac8d8efd0e08418df4e64736f6c634300080f00330000000000000000000000000000000000000000000000000000000000000040eed8b6ddeecd38f7475adee89dfdf949faafe643f220abe8173c368eccd385c70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ea869669210a69b035b382e0f2a498b87dc6a45c
Deployed Bytecode
0x6080604052600436106103285760003560e01c80636c0360eb116101a5578063a0712d68116100ec578063c6f6f21611610095578063db2e21bc1161006f578063db2e21bc146108d4578063e985e9c5146108e9578063f2fde38b14610932578063f968adbe1461095257600080fd5b8063c6f6f2161461087e578063c87b56dd1461089e578063d5abeb01146108be57600080fd5b8063ad2f852a116100c6578063ad2f852a14610819578063b88d4fde1461083e578063c23dc68f1461085157600080fd5b8063a0712d68146107c6578063a1448194146107d9578063a22cb465146107f957600080fd5b80638da5cb5b1161014e57806398a8cffe1161012857806398a8cffe1461075657806399a2557a146107865780639bdedea5146107a657600080fd5b80638da5cb5b146107045780639186b4251461072757806395d89b411461074157600080fd5b8063715018a61161017f578063715018a6146106ac578063768d7138146106c15780638462151c146106d757600080fd5b80636c0360eb146106645780636f9950471461067957806370a082311461068c57600080fd5b806336e79a5a1161027457806355f804b31161021d5780635c975abb116101f75780635c975abb146105e75780635eca4a70146105ff5780636352211e1461062f57806367dded4d1461064f57600080fd5b806355f804b3146105855780635693dd38146105a55780635bbb2177146105ba57600080fd5b80634783f0ef1161024e5780634783f0ef14610525578063483efda21461054557806349df728c1461056557600080fd5b806336e79a5a146104d257806342842e0e146104f257806342966c681461050557600080fd5b806318160ddd116102d657806329ee566c116102b057806329ee566c146104675780632a55205a1461047d5780632eb4a7ab146104bc57600080fd5b806318160ddd1461041157806323b872dd1461043457806329413b121461044757600080fd5b806306fdde031161030757806306fdde03146103a4578063081812fc146103c6578063095ea7b3146103fe57600080fd5b8062923f9e1461032d57806301ffc9a71461036257806306d254da14610382575b600080fd5b34801561033957600080fd5b5061034d610348366004612a3d565b610968565b60405190151581526020015b60405180910390f35b34801561036e57600080fd5b5061034d61037d366004612a84565b610979565b34801561038e57600080fd5b506103a261039d366004612abd565b6109de565b005b3480156103b057600080fd5b506103b9610a25565b6040516103599190612b30565b3480156103d257600080fd5b506103e66103e1366004612a3d565b610ab7565b6040516001600160a01b039091168152602001610359565b6103a261040c366004612b43565b610b14565b34801561041d57600080fd5b50600154600054035b604051908152602001610359565b6103a2610442366004612b6d565b610be5565b34801561045357600080fd5b506103a2610462366004612c2d565b610e06565b34801561047357600080fd5b5061042660105481565b34801561048957600080fd5b5061049d610498366004612cd0565b610e54565b604080516001600160a01b039093168352602083019190915201610359565b3480156104c857600080fd5b50610426600b5481565b3480156104de57600080fd5b506103a26104ed366004612cf2565b610e94565b6103a2610500366004612b6d565b610f26565b34801561051157600080fd5b506103a2610520366004612a3d565b610f41565b34801561053157600080fd5b506103a2610540366004612a3d565b610f4f565b34801561055157600080fd5b506103a2610560366004612a3d565b610f5c565b34801561057157600080fd5b506103a2610580366004612abd565b610f69565b34801561059157600080fd5b506103a26105a0366004612d6e565b6110f3565b3480156105b157600080fd5b506103a261110b565b3480156105c657600080fd5b506105da6105d5366004612dfc565b611127565b6040516103599190612e3e565b3480156105f357600080fd5b5060095460ff1661034d565b34801561060b57600080fd5b5061034d61061a366004612abd565b60126020526000908152604090205460ff1681565b34801561063b57600080fd5b506103e661064a366004612a3d565b6111f3565b34801561065b57600080fd5b506103a26111fe565b34801561067057600080fd5b506103b9611222565b6103a2610687366004612ebb565b6112b0565b34801561069857600080fd5b506104266106a7366004612abd565b6115bb565b3480156106b857600080fd5b506103a2611623565b3480156106cd57600080fd5b50610426600e5481565b3480156106e357600080fd5b506106f76106f2366004612abd565b611635565b6040516103599190612f07565b34801561071057600080fd5b5060095461010090046001600160a01b03166103e6565b34801561073357600080fd5b50600f5461034d9060ff1681565b34801561074d57600080fd5b506103b9611736565b34801561076257600080fd5b5061034d610771366004612abd565b60116020526000908152604090205460ff1681565b34801561079257600080fd5b506106f76107a1366004612f3f565b611745565b3480156107b257600080fd5b506103a26107c1366004612f72565b6118d8565b6103a26107d4366004612a3d565b611a39565b3480156107e557600080fd5b506103a26107f4366004612b43565b611c6a565b34801561080557600080fd5b506103a2610814366004613024565b611c7c565b34801561082557600080fd5b50600f546103e69061010090046001600160a01b031681565b6103a261084c36600461305b565b611ce8565b34801561085d57600080fd5b5061087161086c366004612a3d565b611d45565b60405161035991906130d7565b34801561088a57600080fd5b506103a2610899366004612a3d565b611dbd565b3480156108aa57600080fd5b506103b96108b9366004612a3d565b611dca565b3480156108ca57600080fd5b50610426600c5481565b3480156108e057600080fd5b506103a2611dd5565b3480156108f557600080fd5b5061034d61090436600461311c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561093e57600080fd5b506103a261094d366004612abd565b611e91565b34801561095e57600080fd5b50610426600d5481565b600061097382611f1e565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806109cf57506109cf82611f5e565b80610973575061097382611f5e565b6109e661203f565b600f80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b606060028054610a349061314f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a609061314f565b8015610aad5780601f10610a8257610100808354040283529160200191610aad565b820191906000526020600020905b815481529060010190602001808311610a9057829003601f168201915b5050505050905090565b6000610ac282611f1e565b610af8576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b1f826111f3565b9050336001600160a01b03821614610b7157610b3b8133610904565b610b71576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610bf08261209f565b9050836001600160a01b0316816001600160a01b031614610c3d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610c698187335b6001600160a01b039081169116811491141790565b610cad57610c778633610904565b610cad576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610ced576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610cf857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610dbc57600184016000818152600460205260408120549003610dba576000548114610dba5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610e0e61203f565b60005b8251811015610e4f57610e3d838281518110610e2f57610e2f6131a2565b602002602001015183612138565b80610e4781613200565b915050610e11565b505050565b600080600f60019054906101000a90046001600160a01b031661271060105485610e7e919061321a565b610e889190613239565b915091505b9250929050565b610e9c61203f565b6102ee8161ffff161115610f1d5760405162461bcd60e51b815260206004820152602b60248201527f526f79616c7479206d757374206265206c6f776572207468616e206f7220657160448201527f75616c20746f20372c352500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61ffff16601055565b610e4f83838360405180602001604052806000815250611ce8565b610f4c816001612152565b50565b610f5761203f565b600b55565b610f6461203f565b600e55565b610f7161203f565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610fd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff79190613274565b9050816001600160a01b031663a9059cbb6110206009546001600160a01b036101009091041690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a9919061328d565b50604080516001600160a01b03851681526020810183905233917f5aa586896a67fb05c3b86276f66eecee7da00719d0e7299c403596fa2ec58ca4910160405180910390a2505050565b6110fb61203f565b600a61110782826132f0565b5050565b61111361203f565b600f805460ff19811660ff90911615179055565b60608160008167ffffffffffffffff81111561114557611145612ba9565b60405190808252806020026020018201604052801561119757816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111635790505b50905060005b8281146111ea576111c58686838181106111b9576111b96131a2565b90506020020135611d45565b8282815181106111d7576111d76131a2565b602090810291909101015260010161119d565b50949350505050565b60006109738261209f565b61120661203f565b60095460ff1661121a576112186122e7565b565b611218612341565b600a805461122f9061314f565b80601f016020809104026020016040519081016040528092919081815260200182805461125b9061314f565b80156112a85780601f1061127d576101008083540402835291602001916112a8565b820191906000526020600020905b81548152906001019060200180831161128b57829003601f168201915b505050505081565b6112b861237a565b60026008540361130a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f14565b6002600855600f5460ff166113875760405162461bcd60e51b815260206004820152602260248201527f4572726f723a2077686974656c6973746564206d696e74207475726e6564206f60448201527f66660000000000000000000000000000000000000000000000000000000000006064820152608401610f14565b600054600c5481106114015760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2063616e6e6f74206d696e74206d6f7265207468616e20746f7460448201527f616c20737570706c7900000000000000000000000000000000000000000000006064820152608401610f14565b3360009081526011602052604090205460ff16156114615760405162461bcd60e51b815260206004820152601960248201527f4572726f723a20796f7520616c7265616479206d696e746564000000000000006044820152606401610f14565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481018590526000906054016040516020818303038152906040528051906020012090506114f584848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508490506123cd565b6115675760405162461bcd60e51b815260206004820152603260248201527f4572726f723a20796f7520617265206e6f742077686974656c6973746564206f60448201527f7220696e76616c6964207175616e7469747900000000000000000000000000006064820152608401610f14565b600c5461157486846133b0565b111561158b5781600c5461158891906133c8565b94505b336000818152601160205260409020805460ff191660011790556115af9086612138565b50506001600855505050565b60006001600160a01b0382166115fd576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61162b61203f565b61121860006123e3565b60606000806000611645856115bb565b905060008167ffffffffffffffff81111561166257611662612ba9565b60405190808252806020026020018201604052801561168b578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b83861461172a576116c381612454565b915081604001516117225781516001600160a01b0316156116e357815194505b876001600160a01b0316856001600160a01b0316036117225780838780600101985081518110611715576117156131a2565b6020026020010181815250505b6001016116b3565b50909695505050505050565b606060038054610a349061314f565b6060818310611780576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061178c60005490565b90508084111561179a578093505b60006117a5876115bb565b9050848610156117c457858503818110156117be578091505b506117c8565b5060005b60008167ffffffffffffffff8111156117e3576117e3612ba9565b60405190808252806020026020018201604052801561180c578160200160208202803683370190505b509050816000036118225793506118d192505050565b600061182d88611d45565b90506000816040015161183e575080515b885b8881141580156118505750848714155b156118c55761185e81612454565b925082604001516118bd5782516001600160a01b03161561187e57825191505b8a6001600160a01b0316826001600160a01b0316036118bd57808488806001019950815181106118b0576118b06131a2565b6020026020010181815250505b600101611840565b50505092835250909150505b9392505050565b6118e061203f565b8160005b8251811015611a3357816001600160a01b03166342842e0e306119156009546001600160a01b036101009091041690565b868581518110611927576119276131a2565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561199957600080fd5b505af11580156119ad573d6000803e3d6000fd5b50505050336001600160a01b03167fb8dbf4ce06446b88ef02ffd28a948c2637ac80fb0bd4d3a31c70878c1046eb7f858584815181106119ef576119ef6131a2565b6020026020010151604051611a199291906001600160a01b03929092168252602082015260400190565b60405180910390a280611a2b81613200565b9150506118e4565b50505050565b611a4161237a565b600260085403611a935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f14565b6002600855600f5460ff1615611b115760405162461bcd60e51b815260206004820152602160248201527f4572726f723a2077686974656c6973746564206f6e6c79207475726e6564206f60448201527f6e000000000000000000000000000000000000000000000000000000000000006064820152608401610f14565b600054600c546001611b2384846133b0565b611b2d91906133c8565b10611ba05760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2063616e6e6f74206d696e74206d6f7265207468616e20746f7460448201527f616c20737570706c7900000000000000000000000000000000000000000000006064820152608401610f14565b600d54821115611bf25760405162461bcd60e51b815260206004820152601760248201527f4572726f723a206d617820706572207478206c696d69740000000000000000006044820152606401610f14565b600e54611bfe336115bb565b611c099060016133b0565b1115611c575760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a206d6178207065722061646472657373206c696d6974000000006044820152606401610f14565b611c613383612138565b50506001600855565b611c7261203f565b6111078282612138565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611cf3848484610be5565b6001600160a01b0383163b15611a3357611d0f848484846124ec565b611a33576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160808082018352600080835260208084018290528385018290526060808501839052855193840186528284529083018290529382018190529281018390529091506000548310611d995792915050565b611da283612454565b9050806040015115611db45792915050565b6118d18361263b565b611dc561203f565b600d55565b6060610973826126cc565b611ddd61203f565b4780611e2b5760405162461bcd60e51b815260206004820152601160248201527f4572726f723a206e6f2066656573203a280000000000000000000000000000006044820152606401610f14565b604051339082156108fc029083906000818181858888f19350505050158015611e58573d6000803e3d6000fd5b5060405181815233907f9bba815921f12cb7b1408e14b5ade745234397d39623ae5e7c82d693cb45815f9060200160405180910390a250565b611e9961203f565b6001600160a01b038116611f155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f14565b610f4c816123e3565b60008054821080156109735750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480611ff157507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806109735750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6009546001600160a01b036101009091041633146112185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f14565b60008160005481101561210657600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003612104575b806000036118d15750600019016000818152600460205260409020546120e3565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611107828260405180602001604052806000815250612768565b600061215d8361209f565b90508060008061217b86600090815260066020526040902080549091565b9150915084156121d457612190818433610c54565b6121d45761219e8333610904565b6121d4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156121df57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c0300000000000000000000000000000000000000000000000000000000176000878152600460205260408120919091557c02000000000000000000000000000000000000000000000000000000008516900361229f5760018601600081815260046020526040812054900361229d57600054811461229d5760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b6122ef61237a565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123243390565b6040516001600160a01b03909116815260200160405180910390a1565b6123496127ee565b6009805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612324565b60095460ff16156112185760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f14565b6000826123da8584612840565b14949350505050565b600980546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff85161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461097390604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061253a9033908990889088906004016133df565b6020604051808303816000875af1925050508015612575575060408051601f3d908101601f191682019092526125729181019061341b565b60015b6125ec573d8080156125a3576040519150601f19603f3d011682016040523d82523d6000602084013e6125a8565b606091505b5080516000036125e4576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261097361266b8361209f565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b60606126d782611f1e565b61270d576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061271761288d565b9050805160000361273757604051806020016040528060008152506118d1565b806127418461289c565b604051602001612752929190613438565b6040516020818303038152906040529392505050565b61277283836128e0565b6001600160a01b0383163b15610e4f576000548281035b61279c60008683806001019450866124ec565b6127d2576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106127895781600054146127e757600080fd5b5050505050565b60095460ff166112185760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f14565b600081815b84518110156128855761287182868381518110612864576128646131a2565b6020026020010151612a11565b91508061287d81613200565b915050612845565b509392505050565b6060600a8054610a349061314f565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806128b65750819003601f19909101908152919050565b600080549082900361291e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146129cd57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612995565b5081600003612a08576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818310612a2d5760008281526020849052604090206118d1565b5060009182526020526040902090565b600060208284031215612a4f57600080fd5b5035919050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610f4c57600080fd5b600060208284031215612a9657600080fd5b81356118d181612a56565b80356001600160a01b0381168114612ab857600080fd5b919050565b600060208284031215612acf57600080fd5b6118d182612aa1565b60005b83811015612af3578181015183820152602001612adb565b83811115611a335750506000910152565b60008151808452612b1c816020860160208601612ad8565b601f01601f19169290920160200192915050565b6020815260006118d16020830184612b04565b60008060408385031215612b5657600080fd5b612b5f83612aa1565b946020939093013593505050565b600080600060608486031215612b8257600080fd5b612b8b84612aa1565b9250612b9960208501612aa1565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c0157612c01612ba9565b604052919050565b600067ffffffffffffffff821115612c2357612c23612ba9565b5060051b60200190565b60008060408385031215612c4057600080fd5b823567ffffffffffffffff811115612c5757600080fd5b8301601f81018513612c6857600080fd5b80356020612c7d612c7883612c09565b612bd8565b82815260059290921b83018101918181019088841115612c9c57600080fd5b938201935b83851015612cc157612cb285612aa1565b82529382019390820190612ca1565b98969091013596505050505050565b60008060408385031215612ce357600080fd5b50508035926020909101359150565b600060208284031215612d0457600080fd5b813561ffff811681146118d157600080fd5b600067ffffffffffffffff831115612d3057612d30612ba9565b612d436020601f19601f86011601612bd8565b9050828152838383011115612d5757600080fd5b828260208301376000602084830101529392505050565b600060208284031215612d8057600080fd5b813567ffffffffffffffff811115612d9757600080fd5b8201601f81018413612da857600080fd5b61263384823560208401612d16565b60008083601f840112612dc957600080fd5b50813567ffffffffffffffff811115612de157600080fd5b6020830191508360208260051b8501011115610e8d57600080fd5b60008060208385031215612e0f57600080fd5b823567ffffffffffffffff811115612e2657600080fd5b612e3285828601612db7565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561172a57612ea88385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612e5a565b600080600060408486031215612ed057600080fd5b83359250602084013567ffffffffffffffff811115612eee57600080fd5b612efa86828701612db7565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b8181101561172a57835183529284019291840191600101612f23565b600080600060608486031215612f5457600080fd5b612f5d84612aa1565b95602085013595506040909401359392505050565b60008060408385031215612f8557600080fd5b612f8e83612aa1565b915060208084013567ffffffffffffffff811115612fab57600080fd5b8401601f81018613612fbc57600080fd5b8035612fca612c7882612c09565b81815260059190911b82018301908381019088831115612fe957600080fd5b928401925b8284101561300757833582529284019290840190612fee565b80955050505050509250929050565b8015158114610f4c57600080fd5b6000806040838503121561303757600080fd5b61304083612aa1565b9150602083013561305081613016565b809150509250929050565b6000806000806080858703121561307157600080fd5b61307a85612aa1565b935061308860208601612aa1565b925060408501359150606085013567ffffffffffffffff8111156130ab57600080fd5b8501601f810187136130bc57600080fd5b6130cb87823560208401612d16565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610973565b6000806040838503121561312f57600080fd5b61313883612aa1565b915061314660208401612aa1565b90509250929050565b600181811c9082168061316357607f821691505b60208210810361319c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006000198203613213576132136131d1565b5060010190565b6000816000190483118215151615613234576132346131d1565b500290565b60008261326f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561328657600080fd5b5051919050565b60006020828403121561329f57600080fd5b81516118d181613016565b601f821115610e4f57600081815260208120601f850160051c810160208610156132d15750805b601f850160051c820191505b81811015610dfe578281556001016132dd565b815167ffffffffffffffff81111561330a5761330a612ba9565b61331e81613318845461314f565b846132aa565b602080601f831160018114613353576000841561333b5750858301515b600019600386901b1c1916600185901b178555610dfe565b600085815260208120601f198616915b8281101561338257888601518255948401946001909101908401613363565b50858210156133a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156133c3576133c36131d1565b500190565b6000828210156133da576133da6131d1565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526134116080830184612b04565b9695505050505050565b60006020828403121561342d57600080fd5b81516118d181612a56565b6000835161344a818460208801612ad8565b83519083019061345e818360208801612ad8565b0194935050505056fea26469706673582212207b4522c17eaae9cab25e5257d86a6c8218bd6c8a5d88aac8d8efd0e08418df4e64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000040eed8b6ddeecd38f7475adee89dfdf949faafe643f220abe8173c368eccd385c70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ea869669210a69b035b382e0f2a498b87dc6a45c
-----Decoded View---------------
Arg [0] : _devList (address[]): 0xeA869669210a69B035b382E0F2A498B87dc6a45C
Arg [1] : merkleRoot_ (bytes32): 0xeed8b6ddeecd38f7475adee89dfdf949faafe643f220abe8173c368eccd385c7
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : eed8b6ddeecd38f7475adee89dfdf949faafe643f220abe8173c368eccd385c7
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 000000000000000000000000ea869669210a69b035b382e0f2a498b87dc6a45c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.