ERC-721
Overview
Max Total Supply
128 WGMI2
Holders
122
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 WGMI2Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WGMIIOAllAccessBetaPass
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.15; import "./Administrable.sol"; import "./Lockable.sol"; import "./Toggleable.sol"; import "./EIP712Common.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import { Base64 } from "./Base64.sol"; import { Utils } from "./Utils.sol"; error ExceedsMaxPerWallet(); error AlreadyOnTheList(); error InvalidTokenId(); error InsufficientPayment(); error MaxSupplyReached(); error InvalidAmount(); error NotInAllowList(); error MaxAllowMintReached(); error NonExistingToken(); error InvalidLength(); error MaxMintableSupplyReached(); error EmptyAllowList(); contract WGMIIOAllAccessBetaPass is ERC721A, ERC721ABurnable, Lockable, Toggleable, Administrable, EIP712Common{ using EnumerableSet for EnumerableSet.UintSet; using Strings for uint256; uint256 public maxPerWallet = 5; uint256 public tokenPrice = 0.2 ether; uint256 public allowListPrice = 0.15 ether; uint256 public constant maxSupply = 6000; uint256 private mintableSupply; uint256 firstAllowLisLimit; uint256 secondAllowLisLimit; uint256 thirdAllowLisLimit; // The maximum TokenID that is currently active uint256 public currentMaximum; address[] allowlist1; address[] allowlist2; address[] allowlist3; // This is the list of tokens which we have moved to the front of the line. // It is intended for one-off usage vs en-mass line skipping. address private treasuryAddress; constructor ( string memory _tokenName, string memory _tokenSymbol, string memory _baseImageURI, address _treasuryAddress, uint256 _mintableSupply ) ERC721A(_tokenName, _tokenSymbol) { baseImageURI = _baseImageURI; treasuryAddress = _treasuryAddress; mintableSupply = _mintableSupply; } // ------ MINTING ----------------------------------------------------------- function mint(uint256 _count) external payable noContracts requireActiveSale requireActiveContract { if(_count + totalSupply() >= maxSupply) revert MaxSupplyReached(); if (_count + totalSupply() > mintableSupply) revert MaxMintableSupplyReached(); if(_numberMinted(msg.sender) + _count > maxPerWallet) revert ExceedsMaxPerWallet(); if(msg.value < tokenPrice * _count) revert InsufficientPayment(); _mint(msg.sender, _count); } // ------ AIRDROPS ---------------------------------------------------------- function airdrop(uint256 _count, address _recipient) external requireActiveContract onlyOperatorsAndOwner { if(_count + totalSupply() >= maxSupply) revert MaxSupplyReached(); _mint(_recipient, _count); } function airdropBatch(uint256[] calldata _counts, address[] calldata _recipients) external requireActiveContract onlyOperatorsAndOwner { if (_counts.length != _recipients.length){revert InvalidLength();} for (uint256 i; i < _recipients.length;) { if(_counts[i] + totalSupply() > maxSupply ){revert MaxSupplyReached();} _mint(_recipients[i], _counts[i]); unchecked { ++i; } } } // ------ AllOWLIST ---------------------------------------------------------- function allowListMint(uint256 _count) external payable requireActiveAllowlist { address[] memory cacheList1 = allowlist1; address[] memory cacheList2 = allowlist2; address[] memory cacheList3 = allowlist3; if(totalSupply() + _count > maxSupply) revert MaxSupplyReached(); if(cacheList1.length <= 0 ||cacheList2.length <=0 || cacheList3.length <=0) revert EmptyAllowList(); if(msg.value < allowListPrice * _count) revert InvalidAmount(); uint256 allowedmint; for(uint256 i = 0; i < cacheList1.length; i++){ if(cacheList1[i] == msg.sender){ allowedmint = firstAllowLisLimit; } } for(uint256 i = 0; i < cacheList2.length; i++){ if(cacheList2[i] == msg.sender){ allowedmint = secondAllowLisLimit; } } for(uint256 i = 0; i < cacheList3.length; i++){ if(cacheList3[i] == msg.sender){ allowedmint = thirdAllowLisLimit; } } if(allowedmint <= 0) revert NotInAllowList(); if(balanceOf(msg.sender) >= allowedmint) revert MaxAllowMintReached(); _mint(msg.sender, _count); } function isAllowed(address _address) external view returns(bool, uint256){ address[] memory cacheList1 = allowlist1; address[] memory cacheList2 = allowlist2; address[] memory cacheList3 = allowlist3; for(uint256 i = 0; i < cacheList1.length; i++){ if(cacheList1[i] == _address){ return (true, 1); } } for(uint256 i = 0; i < cacheList2.length; i++){ if(cacheList2[i] == _address){ return (true,2); } } for(uint256 i = 0; i < cacheList3.length; i++){ if(cacheList3[i] == _address){ return (true,3); } } return (false,0); } // ------ ADMINISTRATION ---------------------------------------------------- function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { maxPerWallet = _maxPerWallet; } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { tokenPrice = _tokenPrice; } function setAllowListPrice(uint256 _tokenPrice) external onlyOwner { allowListPrice = _tokenPrice; } function setTreasuryAddress(address _treasuryAddress) external onlyOwner { treasuryAddress = _treasuryAddress; } function getTreasuryAddress() public view returns (address) { return treasuryAddress; } // ------ TOKEN METADATA ---------------------------------------------------- string private baseImageURI; string private imageExtension = ".jpg"; function getBaseImageURI() public view returns (string memory) { return baseImageURI; } function getImageExtension() public view returns (string memory) { return imageExtension; } function setBaseImageURI(string memory _baseImageURI) external onlyOwner { baseImageURI = _baseImageURI; } function setImageExtension(string memory _imageExtension) external onlyOwner { imageExtension = _imageExtension; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { if(!_exists(tokenId)){revert NonExistingToken();} return string( abi.encodePacked( string(abi.encodePacked(baseImageURI)) ) ); } function release() external onlyOwner { uint256 balance = address(this).balance; Address.sendValue(payable(owner()), balance); } function updateAllowList(address[] calldata _allowlist1, address[] calldata _allowlist2, address[] calldata _allowlist3)external onlyOwner{ require(_allowlist1.length > 0 || _allowlist1.length > 0 || _allowlist3.length > 0); for(uint256 i = 0; i < _allowlist1.length; i++){ allowlist1.push(_allowlist1[i]); } for(uint256 i = 0; i < _allowlist2.length; i++){ allowlist2.push(_allowlist2[i]); } for(uint256 i = 0; i < _allowlist3.length; i++){ allowlist3.push(_allowlist3[i]); } } function setAllowListLimit(uint256 _allowlist1, uint256 _allowlist2, uint256 _allowlist3) external onlyOwner{ firstAllowLisLimit = _allowlist1; secondAllowLisLimit = _allowlist2; thirdAllowLisLimit = _allowlist3; } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC721A, AccessControlEnumerable) returns (bool) { return ERC721A.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; library Utils { function uintToString(uint v) internal pure returns (string memory) { uint maxlength = 100; bytes memory reversed = new bytes(maxlength); uint i = 0; while (v != 0) { uint remainder = v % 10; v = v / 10; reversed[i++] = bytes1(uint8(48 + remainder)); } bytes memory s = new bytes(i); // i + 1 is inefficient for (uint j = 0; j < i; j++) { s[j] = reversed[i - j - 1]; // to avoid the off-by-one error } string memory str = string(s); // memory isn't implicitly convertible to storage return str; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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 // ERC721A Contracts v4.2.2 // 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 { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // 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 virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address 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. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// 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: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; error InvalidSignature(); error NoSigningKey(); contract EIP712Common is Ownable { using ECDSA for bytes32; // The key used to sign whitelist signatures. address signingKey = address(0); // Domain Separator is the EIP-712 defined structure that defines what contract // and chain these signatures can be used for. This ensures people can't take // a signature used to mint on one contract and use it for another, or a signature // from testnet to replay on mainnet. // It has to be created in the constructor so we can dynamically grab the chainId. // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator bytes32 public CLAIM_DOMAIN_SEPARATOR; bytes32 public WHITELIST_DOMAIN_SEPARATOR; bytes32 public DISCOUNT_DOMAIN_SEPARATOR; // The typehash for the data type specified in the structured data // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash // This should match whats in the client side whitelist signing code // https://github.com/msfeldstein/EIP712-whitelisting/blob/main/test/signWhitelist.ts#L22 bytes32 public constant CLAIM_TYPEHASH = keccak256("Minter(address wallet,uint256 count)"); bytes32 public constant WHITELIST_TYPEHASH = keccak256("Minter(address wallet)"); bytes32 public constant DISCOUNT_TYPEHASH = keccak256("Minter(address wallet, uint256 count)"); constructor() { CLAIM_DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes("ClaimToken")), keccak256(bytes("1")), block.chainid, address(this) ) ); WHITELIST_DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes("WhitelistToken")), keccak256(bytes("1")), block.chainid, address(this) ) ); DISCOUNT_DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes("DiscountToken")), keccak256(bytes("1")), block.chainid, address(this) ) ); } function setSigningAddress(address newSigningKey) public onlyOwner { signingKey = newSigningKey; } modifier requiresClaim(bytes calldata signature, uint256 count) { if(signingKey == address(0)) revert NoSigningKey(); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", CLAIM_DOMAIN_SEPARATOR, keccak256(abi.encode( CLAIM_TYPEHASH, msg.sender, count)) ) ); address recoveredAddress = digest.recover(signature); if(recoveredAddress != signingKey) revert InvalidSignature(); _; } modifier requiresDiscount(bytes calldata signature, uint256 value) { if(signingKey == address(0)) revert NoSigningKey(); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DISCOUNT_DOMAIN_SEPARATOR, keccak256(abi.encode( CLAIM_TYPEHASH, msg.sender, value)) ) ); address recoveredAddress = digest.recover(signature); if(recoveredAddress != signingKey) revert InvalidSignature(); _; } modifier requiresWhitelist(bytes calldata signature) { if(signingKey == address(0)) revert NoSigningKey(); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", WHITELIST_DOMAIN_SEPARATOR, keccak256(abi.encode(WHITELIST_TYPEHASH, msg.sender)) ) ); address recoveredAddress = digest.recover(signature); if(recoveredAddress != signingKey) revert InvalidSignature(); _; } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; error SaleNotActive(); error WhitelistNotActive(); error AllowlistNotActive(); abstract contract Toggleable is Ownable { bool public saleIsActive = false; bool public allowListIsActive = false; bool public whitelistIsActive = false; function flipWhitelistState() external onlyOwner { whitelistIsActive = !whitelistIsActive; } function flipSaleState() external onlyOwner { saleIsActive = !saleIsActive; } function flipAllowListState() external onlyOwner { allowListIsActive = !allowListIsActive; } modifier requireActiveSale { if(!saleIsActive) revert SaleNotActive(); _; } modifier requireActiveWhitelist { if(!whitelistIsActive) revert WhitelistNotActive(); _; } modifier requireActiveAllowlist { if(!allowListIsActive) revert AllowlistNotActive(); _; } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; error ContractLocked(); error InvalidDestructCode(); abstract contract Lockable is Ownable { bool public contractIsLocked = false; // Recognize voice pattern Jean-Luc Picard, authorization Alpha-Alpha 3-0-5 string private DESTRUCT_CODE = "aa305"; function lockContract(string memory _destructCode) external onlyOwner { if(!_isEqual(_destructCode, DESTRUCT_CODE)) revert InvalidDestructCode(); contractIsLocked = true; } function _isEqual(string memory s1, string memory s2) private pure returns (bool) { bytes memory b1 = bytes(s1); bytes memory b2 = bytes(s2); uint256 l1 = b1.length; if (l1 != b2.length) return false; for (uint256 i=0; i<l1; i++) { if (b1[i] != b2[i]) return false; } return true; } modifier requireActiveContract { if(contractIsLocked) revert ContractLocked(); _; } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; error ContractsCannotMint(); error NotAuthorized(); abstract contract Administrable is AccessControlEnumerable, Ownable{ bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); constructor(){ _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } modifier onlyOperator { if(!hasRole(OPERATOR_ROLE, msg.sender)) revert NotAuthorized(); _; } modifier onlyOperatorsAndOwner { if(owner() != msg.sender && !hasRole(OPERATOR_ROLE, msg.sender)) revert NotAuthorized(); _; } modifier noContracts { if(msg.sender != tx.origin) revert ContractsCannotMint(); _; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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.2 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: 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/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"string","name":"_baseImageURI","type":"string"},{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"uint256","name":"_mintableSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowlistNotActive","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ContractLocked","type":"error"},{"inputs":[],"name":"ContractsCannotMint","type":"error"},{"inputs":[],"name":"EmptyAllowList","type":"error"},{"inputs":[],"name":"ExceedsMaxPerWallet","type":"error"},{"inputs":[],"name":"InsufficientPayment","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidDestructCode","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"MaxAllowMintReached","type":"error"},{"inputs":[],"name":"MaxMintableSupplyReached","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NonExistingToken","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotInAllowList","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SaleNotActive","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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CLAIM_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLAIM_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_counts","type":"uint256[]"},{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"airdropBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowListIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"allowListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allowListPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractIsLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentMaximum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipAllowListState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipWhitelistState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseImageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImageExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTreasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"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":"string","name":"_destructCode","type":"string"}],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","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":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlist1","type":"uint256"},{"internalType":"uint256","name":"_allowlist2","type":"uint256"},{"internalType":"uint256","name":"_allowlist3","type":"uint256"}],"name":"setAllowListLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPrice","type":"uint256"}],"name":"setAllowListPrice","outputs":[],"stateMutability":"nonpayable","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":"_baseImageURI","type":"string"}],"name":"setBaseImageURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_imageExtension","type":"string"}],"name":"setImageExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setSigningAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPrice","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"}],"name":"setTreasuryAddress","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":[],"name":"tokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_allowlist1","type":"address[]"},{"internalType":"address[]","name":"_allowlist2","type":"address[]"},{"internalType":"address[]","name":"_allowlist3","type":"address[]"}],"name":"updateAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526000600a60146101000a81548160ff0219169083151502179055506040518060400160405280600581526020017f6161333035000000000000000000000000000000000000000000000000000000815250600b908162000065919062000ab6565b506000600c60006101000a81548160ff0219169083151502179055506000600c60016101000a81548160ff0219169083151502179055506000600c60026101000a81548160ff0219169083151502179055506000600c60036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060056010556702c68af0bb140000601155670214e8348c4f00006012556040518060400160405280600481526020017f2e6a706700000000000000000000000000000000000000000000000000000000815250601d90816200015c919062000ab6565b503480156200016a57600080fd5b506040516200677a3803806200677a833981810160405281019062000190919062000da1565b84848160029081620001a3919062000ab6565b508060039081620001b5919062000ab6565b50620001c6620004d560201b60201c565b6000819055505050620001ee620001e2620004de60201b60201c565b620004e660201b60201c565b620002036000801b33620005ac60201b60201c565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6040518060400160405280600a81526020017f436c61696d546f6b656e00000000000000000000000000000000000000000000815250805190602001206040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250805190602001204630604051602001620002b695949392919062000ec3565b60405160208183030381529060405280519060200120600d819055507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6040518060400160405280600e81526020017f57686974656c697374546f6b656e000000000000000000000000000000000000815250805190602001206040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152508051906020012046306040516020016200038595949392919062000ec3565b60405160208183030381529060405280519060200120600e819055507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6040518060400160405280600d81526020017f446973636f756e74546f6b656e00000000000000000000000000000000000000815250805190602001206040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152508051906020012046306040516020016200045495949392919062000ec3565b60405160208183030381529060405280519060200120600f8190555082601c908162000481919062000ab6565b5081601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601381905550505050505062000f20565b60006001905090565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620005be8282620005c260201b60201c565b5050565b620005d982826200060a60201b62002ffe1760201c565b620006058160096000858152602001908152602001600020620006fc60201b620030df1790919060201c565b505050565b6200061c82826200073460201b60201c565b620006f85760016008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200069d620004de60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006200072c836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200079f60201b60201c565b905092915050565b60006008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000620007b383836200081960201b60201c565b6200080e57826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905062000813565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620008be57607f821691505b602082108103620008d457620008d362000876565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200093e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620008ff565b6200094a8683620008ff565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000997620009916200098b8462000962565b6200096c565b62000962565b9050919050565b6000819050919050565b620009b38362000976565b620009cb620009c2826200099e565b8484546200090c565b825550505050565b600090565b620009e2620009d3565b620009ef818484620009a8565b505050565b5b8181101562000a175762000a0b600082620009d8565b600181019050620009f5565b5050565b601f82111562000a665762000a3081620008da565b62000a3b84620008ef565b8101602085101562000a4b578190505b62000a6362000a5a85620008ef565b830182620009f4565b50505b505050565b600082821c905092915050565b600062000a8b6000198460080262000a6b565b1980831691505092915050565b600062000aa6838362000a78565b9150826002028217905092915050565b62000ac1826200083c565b67ffffffffffffffff81111562000add5762000adc62000847565b5b62000ae98254620008a5565b62000af682828562000a1b565b600060209050601f83116001811462000b2e576000841562000b19578287015190505b62000b25858262000a98565b86555062000b95565b601f19841662000b3e86620008da565b60005b8281101562000b685784890151825560018201915060208501945060208101905062000b41565b8683101562000b88578489015162000b84601f89168262000a78565b8355505b6001600288020188555050505b505050505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b62000bd78262000bbb565b810181811067ffffffffffffffff8211171562000bf95762000bf862000847565b5b80604052505050565b600062000c0e62000b9d565b905062000c1c828262000bcc565b919050565b600067ffffffffffffffff82111562000c3f5762000c3e62000847565b5b62000c4a8262000bbb565b9050602081019050919050565b60005b8381101562000c7757808201518184015260208101905062000c5a565b8381111562000c87576000848401525b50505050565b600062000ca462000c9e8462000c21565b62000c02565b90508281526020810184848401111562000cc35762000cc262000bb6565b5b62000cd084828562000c57565b509392505050565b600082601f83011262000cf05762000cef62000bb1565b5b815162000d0284826020860162000c8d565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000d388262000d0b565b9050919050565b62000d4a8162000d2b565b811462000d5657600080fd5b50565b60008151905062000d6a8162000d3f565b92915050565b62000d7b8162000962565b811462000d8757600080fd5b50565b60008151905062000d9b8162000d70565b92915050565b600080600080600060a0868803121562000dc05762000dbf62000ba7565b5b600086015167ffffffffffffffff81111562000de15762000de062000bac565b5b62000def8882890162000cd8565b955050602086015167ffffffffffffffff81111562000e135762000e1262000bac565b5b62000e218882890162000cd8565b945050604086015167ffffffffffffffff81111562000e455762000e4462000bac565b5b62000e538882890162000cd8565b935050606062000e668882890162000d59565b925050608062000e798882890162000d8a565b9150509295509295909350565b6000819050919050565b62000e9b8162000e86565b82525050565b62000eac8162000962565b82525050565b62000ebd8162000d2b565b82525050565b600060a08201905062000eda600083018862000e90565b62000ee9602083018762000e90565b62000ef8604083018662000e90565b62000f07606083018562000ea1565b62000f16608083018462000eb2565b9695505050505050565b61584a8062000f306000396000f3fe6080604052600436106103c35760003560e01c80637ff9b596116101f2578063bc63f02e1161010d578063e985e9c5116100a0578063f6fa26ab1161006f578063f6fa26ab14610e21578063f732f5d914610e38578063fd6e4d7a14610e61578063feb309ad14610e8a576103c3565b8063e985e9c514610d65578063eb8d244414610da2578063f2fde38b14610dcd578063f5b541a614610df6576103c3565b8063d5abeb01116100dc578063d5abeb0114610cbb578063db1354d214610ce6578063e002460414610d11578063e268e4d314610d3c576103c3565b8063bc63f02e14610bef578063c87b56dd14610c18578063ca15c87314610c55578063d547741f14610c92576103c3565b8063a0712d6811610185578063ad7fa75111610154578063ad7fa75114610b32578063b88d4fde14610b5d578063b8be499b14610b86578063babcc53914610bb1576103c3565b8063a0712d6814610a97578063a217fddf14610ab3578063a22cb46514610ade578063a24e515314610b07576103c3565b80639010d07c116101c15780639010d07c146109c757806391d1485414610a0457806395d89b4114610a415780639c79e52714610a6c576103c3565b80637ff9b596146109315780638647ca761461095c57806386d1a69f146109855780638da5cb5b1461099c576103c3565b806342842e0e116102e25780636a61e5fc1161027557806370a082311161024457806370a0823114610896578063711f684a146108d3578063715018a6146108fe57806379995c1114610915576103c3565b80636a61e5fc146107ee5780636b0509b1146108175780636d4a450a146108425780636df9fa881461086d576103c3565b8063613f5a8d116102b1578063613f5a8d146107325780636301dccf1461075d5780636352211e146107885780636605bfda146107c5576103c3565b806342842e0e1461068c57806342966c68146106b5578063453c2310146106de578063599e74af14610709576103c3565b806323b872dd1161035a57806334918dfd1161032957806334918dfd146105fa57806336568abe1461061157806339e3aa7e1461063a57806341fab09d14610663576103c3565b806323b872dd14610542578063248a9ca31461056b5780632f2ff15d146105a857806331beb605146105d1576103c3565b806318160ddd1161039657806318160ddd146104965780631f8cbe5c146104c15780631fe70d6f146104ec578063212e9a0f14610517576103c3565b806301ffc9a7146103c857806306fdde0314610405578063081812fc14610430578063095ea7b31461046d575b600080fd5b3480156103d457600080fd5b506103ef60048036038101906103ea919061437d565b610ea1565b6040516103fc91906143c5565b60405180910390f35b34801561041157600080fd5b5061041a610eb3565b6040516104279190614479565b60405180910390f35b34801561043c57600080fd5b50610457600480360381019061045291906144d1565b610f45565b604051610464919061453f565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f9190614586565b610fc4565b005b3480156104a257600080fd5b506104ab611108565b6040516104b891906145d5565b60405180910390f35b3480156104cd57600080fd5b506104d661111f565b6040516104e39190614479565b60405180910390f35b3480156104f857600080fd5b506105016111b1565b60405161050e91906143c5565b60405180910390f35b34801561052357600080fd5b5061052c6111c4565b6040516105399190614609565b60405180910390f35b34801561054e57600080fd5b5061056960048036038101906105649190614624565b6111e8565b005b34801561057757600080fd5b50610592600480360381019061058d91906146a3565b61150a565b60405161059f9190614609565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca91906146d0565b61152a565b005b3480156105dd57600080fd5b506105f860048036038101906105f39190614710565b61154b565b005b34801561060657600080fd5b5061060f611597565b005b34801561061d57600080fd5b50610638600480360381019061063391906146d0565b6115cb565b005b34801561064657600080fd5b50610661600480360381019061065c9190614872565b61164e565b005b34801561066f57600080fd5b5061068a600480360381019061068591906148bb565b611669565b005b34801561069857600080fd5b506106b360048036038101906106ae9190614624565b61168b565b005b3480156106c157600080fd5b506106dc60048036038101906106d791906144d1565b6116ab565b005b3480156106ea57600080fd5b506106f36116b9565b60405161070091906145d5565b60405180910390f35b34801561071557600080fd5b50610730600480360381019061072b9190614872565b6116bf565b005b34801561073e57600080fd5b506107476117af565b6040516107549190614479565b60405180910390f35b34801561076957600080fd5b50610772611841565b60405161077f9190614609565b60405180910390f35b34801561079457600080fd5b506107af60048036038101906107aa91906144d1565b611865565b6040516107bc919061453f565b60405180910390f35b3480156107d157600080fd5b506107ec60048036038101906107e79190614710565b611877565b005b3480156107fa57600080fd5b50610815600480360381019061081091906144d1565b6118c3565b005b34801561082357600080fd5b5061082c6118d5565b6040516108399190614609565b60405180910390f35b34801561084e57600080fd5b506108576118f9565b6040516108649190614609565b60405180910390f35b34801561087957600080fd5b50610894600480360381019061088f91906144d1565b6118ff565b005b3480156108a257600080fd5b506108bd60048036038101906108b89190614710565b611911565b6040516108ca91906145d5565b60405180910390f35b3480156108df57600080fd5b506108e86119c9565b6040516108f591906145d5565b60405180910390f35b34801561090a57600080fd5b506109136119cf565b005b61092f600480360381019061092a91906144d1565b6119e3565b005b34801561093d57600080fd5b50610946611ea0565b60405161095391906145d5565b60405180910390f35b34801561096857600080fd5b50610983600480360381019061097e9190614872565b611ea6565b005b34801561099157600080fd5b5061099a611ec1565b005b3480156109a857600080fd5b506109b1611ee2565b6040516109be919061453f565b60405180910390f35b3480156109d357600080fd5b506109ee60048036038101906109e9919061490e565b611f0c565b6040516109fb919061453f565b60405180910390f35b348015610a1057600080fd5b50610a2b6004803603810190610a2691906146d0565b611f3b565b604051610a3891906143c5565b60405180910390f35b348015610a4d57600080fd5b50610a56611fa6565b604051610a639190614479565b60405180910390f35b348015610a7857600080fd5b50610a81612038565b604051610a8e9190614609565b60405180910390f35b610ab16004803603810190610aac91906144d1565b61203e565b005b348015610abf57600080fd5b50610ac861226e565b604051610ad59190614609565b60405180910390f35b348015610aea57600080fd5b50610b056004803603810190610b00919061497a565b612275565b005b348015610b1357600080fd5b50610b1c6123ec565b604051610b2991906145d5565b60405180910390f35b348015610b3e57600080fd5b50610b476123f2565b604051610b5491906143c5565b60405180910390f35b348015610b6957600080fd5b50610b846004803603810190610b7f9190614a5b565b612405565b005b348015610b9257600080fd5b50610b9b612478565b604051610ba891906143c5565b60405180910390f35b348015610bbd57600080fd5b50610bd86004803603810190610bd39190614710565b61248b565b604051610be6929190614ade565b60405180910390f35b348015610bfb57600080fd5b50610c166004803603810190610c119190614b07565b6127b8565b005b348015610c2457600080fd5b50610c3f6004803603810190610c3a91906144d1565b6128fb565b604051610c4c9190614479565b60405180910390f35b348015610c6157600080fd5b50610c7c6004803603810190610c7791906146a3565b612983565b604051610c8991906145d5565b60405180910390f35b348015610c9e57600080fd5b50610cb96004803603810190610cb491906146d0565b6129a7565b005b348015610cc757600080fd5b50610cd06129c8565b604051610cdd91906145d5565b60405180910390f35b348015610cf257600080fd5b50610cfb6129ce565b604051610d089190614609565b60405180910390f35b348015610d1d57600080fd5b50610d266129d4565b604051610d33919061453f565b60405180910390f35b348015610d4857600080fd5b50610d636004803603810190610d5e91906144d1565b6129fe565b005b348015610d7157600080fd5b50610d8c6004803603810190610d879190614b47565b612a10565b604051610d9991906143c5565b60405180910390f35b348015610dae57600080fd5b50610db7612aa4565b604051610dc491906143c5565b60405180910390f35b348015610dd957600080fd5b50610df46004803603810190610def9190614710565b612ab7565b005b348015610e0257600080fd5b50610e0b612b3a565b604051610e189190614609565b60405180910390f35b348015610e2d57600080fd5b50610e36612b5e565b005b348015610e4457600080fd5b50610e5f6004803603810190610e5a9190614c3d565b612b92565b005b348015610e6d57600080fd5b50610e886004803603810190610e839190614cbe565b612d8a565b005b348015610e9657600080fd5b50610e9f612fca565b005b6000610eac8261310f565b9050919050565b606060028054610ec290614da1565b80601f0160208091040260200160405190810160405280929190818152602001828054610eee90614da1565b8015610f3b5780601f10610f1057610100808354040283529160200191610f3b565b820191906000526020600020905b815481529060010190602001808311610f1e57829003601f168201915b5050505050905090565b6000610f50826131a1565b610f86576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610fcf82611865565b90508073ffffffffffffffffffffffffffffffffffffffff16610ff0613200565b73ffffffffffffffffffffffffffffffffffffffff16146110535761101c81611017613200565b612a10565b611052576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000611112613208565b6001546000540303905090565b6060601c805461112e90614da1565b80601f016020809104026020016040519081016040528092919081815260200182805461115a90614da1565b80156111a75780601f1061117c576101008083540402835291602001916111a7565b820191906000526020600020905b81548152906001019060200180831161118a57829003601f168201915b5050505050905090565b600c60029054906101000a900460ff1681565b7f2744a6917094ca2ea2ac15d34cf9febe9c2a504b2370fa0f60e99090ad07d83e81565b60006111f382613211565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461125a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611266846132dd565b9150915061127c8187611277613200565b613304565b6112c8576112918661128c613200565b612a10565b6112c7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361132e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61133b8686866001613348565b801561134657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550611414856113f088888761334e565b7c020000000000000000000000000000000000000000000000000000000017613376565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361149a5760006001850190506000600460008381526020019081526020016000205403611498576000548114611497578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461150286868660016133a1565b505050505050565b600060086000838152602001908152602001600020600101549050919050565b6115338261150a565b61153c816133a7565b61154683836133bb565b505050565b6115536133ef565b80600c60036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61159f6133ef565b600c60009054906101000a900460ff1615600c60006101000a81548160ff021916908315150217905550565b6115d361346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163790614e44565b60405180910390fd5b61164a8282613475565b5050565b6116566133ef565b80601d90816116659190615010565b5050565b6116716133ef565b826014819055508160158190555080601681905550505050565b6116a683838360405180602001604052806000815250612405565b505050565b6116b68160016134a9565b50565b60105481565b6116c76133ef565b61175b81600b80546116d890614da1565b80601f016020809104026020016040519081016040528092919081815260200182805461170490614da1565b80156117515780601f1061172657610100808354040283529160200191611751565b820191906000526020600020905b81548152906001019060200180831161173457829003601f168201915b50505050506136fb565b611791576040517fa10f96b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600a60146101000a81548160ff02191690831515021790555050565b6060601d80546117be90614da1565b80601f01602080910402602001604051908101604052809291908181526020018280546117ea90614da1565b80156118375780601f1061180c57610100808354040283529160200191611837565b820191906000526020600020905b81548152906001019060200180831161181a57829003601f168201915b5050505050905090565b7f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061187082613211565b9050919050565b61187f6133ef565b80601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6118cb6133ef565b8060118190555050565b7f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca81565b600d5481565b6119076133ef565b8060128190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611978576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b60175481565b6119d76133ef565b6119e160006137df565b565b600c60019054906101000a900460ff16611a29576040517fc39f6ac400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006018805480602002602001604051908101604052809291908181526020018280548015611aad57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611a63575b5050505050905060006019805480602002602001604051908101604052809291908181526020018280548015611b3857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611aee575b505050505090506000601a805480602002602001604051908101604052809291908181526020018280548015611bc357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611b79575b5050505050905061177084611bd6611108565b611be09190615111565b1115611c18576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008351111580611c2b57506000825111155b80611c3857506000815111155b15611c6f576040517f4578c07e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83601254611c7d9190615167565b341015611cb6576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b8451811015611d2d573373ffffffffffffffffffffffffffffffffffffffff16858281518110611cf157611cf06151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611d1a5760145491505b8080611d25906151f0565b915050611cbe565b5060005b8351811015611da0573373ffffffffffffffffffffffffffffffffffffffff16848281518110611d6457611d636151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611d8d5760155491505b8080611d98906151f0565b915050611d31565b5060005b8251811015611e13573373ffffffffffffffffffffffffffffffffffffffff16838281518110611dd757611dd66151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e005760165491505b8080611e0b906151f0565b915050611da4565b5060008111611e4e576040517fe0e6520900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611e5833611911565b10611e8f576040517fedfb508500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e9933866138a5565b5050505050565b60115481565b611eae6133ef565b80601c9081611ebd9190615010565b5050565b611ec96133ef565b6000479050611edf611ed9611ee2565b82613a60565b50565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611f338260096000868152602001908152602001600020613b5490919063ffffffff16565b905092915050565b60006008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b606060038054611fb590614da1565b80601f0160208091040260200160405190810160405280929190818152602001828054611fe190614da1565b801561202e5780601f106120035761010080835404028352916020019161202e565b820191906000526020600020905b81548152906001019060200180831161201157829003601f168201915b5050505050905090565b600f5481565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120a3576040517fd9d552c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c60009054906101000a900460ff166120e9576040517fb7b2409700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a60149054906101000a900460ff1615612130576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61177061213b611108565b826121469190615111565b1061217d576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601354612188611108565b826121939190615111565b11156121cb576040517fa313e08d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601054816121d833613b6e565b6121e29190615111565b111561221a576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806011546122289190615167565b341015612261576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61226b33826138a5565b50565b6000801b81565b61227d613200565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036122e1576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006122ee613200565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661239b613200565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123e091906143c5565b60405180910390a35050565b60125481565b600a60149054906101000a900460ff1681565b6124108484846111e8565b60008373ffffffffffffffffffffffffffffffffffffffff163b146124725761243b84848484613bc5565b612471576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b600c60019054906101000a900460ff1681565b6000806000601880548060200260200160405190810160405280929190818152602001828054801561251257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116124c8575b505050505090506000601980548060200260200160405190810160405280929190818152602001828054801561259d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612553575b505050505090506000601a80548060200260200160405190810160405280929190818152602001828054801561262857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116125de575b5050505050905060005b83518110156126ab578673ffffffffffffffffffffffffffffffffffffffff16848281518110612665576126646151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036126985760018095509550505050506127b3565b80806126a3906151f0565b915050612632565b5060005b8251811015612729578673ffffffffffffffffffffffffffffffffffffffff168382815181106126e2576126e16151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612716576001600295509550505050506127b3565b8080612721906151f0565b9150506126af565b5060005b81518110156127a7578673ffffffffffffffffffffffffffffffffffffffff168282815181106127605761275f6151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612794576001600395509550505050506127b3565b808061279f906151f0565b91505061272d565b50600080945094505050505b915091565b600a60149054906101000a900460ff16156127ff576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1661281e611ee2565b73ffffffffffffffffffffffffffffffffffffffff161415801561286957506128677f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92933611f3b565b155b156128a0576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117706128ab611108565b836128b69190615111565b106128ed576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6128f781836138a5565b5050565b6060612906826131a1565b61293c576040517f8e8fe17c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601c60405160200161294e91906152c6565b60405160208183030381529060405260405160200161296d919061530e565b6040516020818303038152906040529050919050565b60006129a060096000848152602001908152602001600020613d15565b9050919050565b6129b08261150a565b6129b9816133a7565b6129c38383613475565b505050565b61177081565b600e5481565b6000601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612a066133ef565b8060108190555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c60009054906101000a900460ff1681565b612abf6133ef565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2590615397565b60405180910390fd5b612b37816137df565b50565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b612b666133ef565b600c60029054906101000a900460ff1615600c60026101000a81548160ff021916908315150217905550565b600a60149054906101000a900460ff1615612bd9576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16612bf8611ee2565b73ffffffffffffffffffffffffffffffffffffffff1614158015612c435750612c417f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92933611f3b565b155b15612c7a576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014612cb9576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82829050811015612d8357611770612cd2611108565b868684818110612ce557612ce46151c1565b5b90506020020135612cf69190615111565b1115612d2e576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d78838383818110612d4457612d436151c1565b5b9050602002016020810190612d599190614710565b868684818110612d6c57612d6b6151c1565b5b905060200201356138a5565b806001019050612cbc565b5050505050565b612d926133ef565b6000868690501180612da75750600086869050115b80612db55750600082829050115b612dbe57600080fd5b60005b86869050811015612e69576018878783818110612de157612de06151c1565b5b9050602002016020810190612df69190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612e61906151f0565b915050612dc1565b5060005b84849050811015612f15576019858583818110612e8d57612e8c6151c1565b5b9050602002016020810190612ea29190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612f0d906151f0565b915050612e6d565b5060005b82829050811015612fc157601a838383818110612f3957612f386151c1565b5b9050602002016020810190612f4e9190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612fb9906151f0565b915050612f19565b50505050505050565b612fd26133ef565b600c60019054906101000a900460ff1615600c60016101000a81548160ff021916908315150217905550565b6130088282611f3b565b6130db5760016008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061308061346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000613107836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613d2a565b905092915050565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061316a57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061319a5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000816131ac613208565b111580156131bb575060005482105b80156131f9575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b60008082905080613220613208565b116132a6576000548110156132a55760006004600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216036132a3575b6000810361329957600460008360019003935083815260200190815260200160002054905061326f565b80925050506132d8565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613365868684613d9a565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6133b8816133b361346d565b613da3565b50565b6133c58282612ffe565b6133ea81600960008581526020019081526020016000206130df90919063ffffffff16565b505050565b6133f761346d565b73ffffffffffffffffffffffffffffffffffffffff16613415611ee2565b73ffffffffffffffffffffffffffffffffffffffff161461346b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161346290615403565b60405180910390fd5b565b600033905090565b61347f8282613e40565b6134a48160096000858152602001908152602001600020613f2290919063ffffffff16565b505050565b60006134b483613211565b905060008190506000806134c7866132dd565b915091508415613530576134e381846134de613200565b613304565b61352f576134f8836134f3613200565b612a10565b61352e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b61353e836000886001613348565b801561354957600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506135f1836135ae8560008861334e565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613376565b600460008881526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008516036136775760006001870190506000600460008381526020019081526020016000205403613675576000548114613674578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46136e18360008860016133a1565b600160008154809291906001019190505550505050505050565b60008083905060008390506000825190508151811461372057600093505050506137d9565b60005b818110156137d05782818151811061373e5761373d6151c1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061377e5761377d6151c1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146137bd5760009450505050506137d9565b80806137c8906151f0565b915050613723565b50600193505050505b92915050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080549050600082036138e5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138f26000848385613348565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506139698361395a600086600061334e565b61396385613f52565b17613376565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114613a0a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506139cf565b5060008203613a45576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050613a5b60008483856133a1565b505050565b80471015613aa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a9a9061546f565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051613ac9906154c0565b60006040518083038185875af1925050503d8060008114613b06576040519150601f19603f3d011682016040523d82523d6000602084013e613b0b565b606091505b5050905080613b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b4690615547565b60405180910390fd5b505050565b6000613b638360000183613f62565b60001c905092915050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613beb613200565b8786866040518563ffffffff1660e01b8152600401613c0d94939291906155bc565b6020604051808303816000875af1925050508015613c4957506040513d601f19601f82011682018060405250810190613c46919061561d565b60015b613cc2573d8060008114613c79576040519150601f19603f3d011682016040523d82523d6000602084013e613c7e565b606091505b506000815103613cba576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6000613d2382600001613f8d565b9050919050565b6000613d368383613f9e565b613d8f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613d94565b600090505b92915050565b60009392505050565b613dad8282611f3b565b613e3c57613dd28173ffffffffffffffffffffffffffffffffffffffff166014613fc1565b613de08360001c6020613fc1565b604051602001613df19291906156e2565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e339190614479565b60405180910390fd5b5050565b613e4a8282611f3b565b15613f1e5760006008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613ec361346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000613f4a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141fd565b905092915050565b60006001821460e11b9050919050565b6000826000018281548110613f7a57613f796151c1565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b606060006002836002613fd49190615167565b613fde9190615111565b67ffffffffffffffff811115613ff757613ff6614747565b5b6040519080825280601f01601f1916602001820160405280156140295781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110614061576140606151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106140c5576140c46151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026141059190615167565b61410f9190615111565b90505b60018111156141af577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110614151576141506151c1565b5b1a60f81b828281518110614168576141676151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806141a89061571c565b9050614112565b50600084146141f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016141ea90615791565b60405180910390fd5b8091505092915050565b6000808360010160008481526020019081526020016000205490506000811461430557600060018261422f91906157b1565b905060006001866000018054905061424791906157b1565b90508181146142b6576000866000018281548110614268576142676151c1565b5b906000526020600020015490508087600001848154811061428c5761428b6151c1565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806142ca576142c96157e5565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061430b565b60009150505b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61435a81614325565b811461436557600080fd5b50565b60008135905061437781614351565b92915050565b6000602082840312156143935761439261431b565b5b60006143a184828501614368565b91505092915050565b60008115159050919050565b6143bf816143aa565b82525050565b60006020820190506143da60008301846143b6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561441a5780820151818401526020810190506143ff565b83811115614429576000848401525b50505050565b6000601f19601f8301169050919050565b600061444b826143e0565b61445581856143eb565b93506144658185602086016143fc565b61446e8161442f565b840191505092915050565b600060208201905081810360008301526144938184614440565b905092915050565b6000819050919050565b6144ae8161449b565b81146144b957600080fd5b50565b6000813590506144cb816144a5565b92915050565b6000602082840312156144e7576144e661431b565b5b60006144f5848285016144bc565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614529826144fe565b9050919050565b6145398161451e565b82525050565b60006020820190506145546000830184614530565b92915050565b6145638161451e565b811461456e57600080fd5b50565b6000813590506145808161455a565b92915050565b6000806040838503121561459d5761459c61431b565b5b60006145ab85828601614571565b92505060206145bc858286016144bc565b9150509250929050565b6145cf8161449b565b82525050565b60006020820190506145ea60008301846145c6565b92915050565b6000819050919050565b614603816145f0565b82525050565b600060208201905061461e60008301846145fa565b92915050565b60008060006060848603121561463d5761463c61431b565b5b600061464b86828701614571565b935050602061465c86828701614571565b925050604061466d868287016144bc565b9150509250925092565b614680816145f0565b811461468b57600080fd5b50565b60008135905061469d81614677565b92915050565b6000602082840312156146b9576146b861431b565b5b60006146c78482850161468e565b91505092915050565b600080604083850312156146e7576146e661431b565b5b60006146f58582860161468e565b925050602061470685828601614571565b9150509250929050565b6000602082840312156147265761472561431b565b5b600061473484828501614571565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61477f8261442f565b810181811067ffffffffffffffff8211171561479e5761479d614747565b5b80604052505050565b60006147b1614311565b90506147bd8282614776565b919050565b600067ffffffffffffffff8211156147dd576147dc614747565b5b6147e68261442f565b9050602081019050919050565b82818337600083830152505050565b6000614815614810846147c2565b6147a7565b90508281526020810184848401111561483157614830614742565b5b61483c8482856147f3565b509392505050565b600082601f8301126148595761485861473d565b5b8135614869848260208601614802565b91505092915050565b6000602082840312156148885761488761431b565b5b600082013567ffffffffffffffff8111156148a6576148a5614320565b5b6148b284828501614844565b91505092915050565b6000806000606084860312156148d4576148d361431b565b5b60006148e2868287016144bc565b93505060206148f3868287016144bc565b9250506040614904868287016144bc565b9150509250925092565b600080604083850312156149255761492461431b565b5b60006149338582860161468e565b9250506020614944858286016144bc565b9150509250929050565b614957816143aa565b811461496257600080fd5b50565b6000813590506149748161494e565b92915050565b600080604083850312156149915761499061431b565b5b600061499f85828601614571565b92505060206149b085828601614965565b9150509250929050565b600067ffffffffffffffff8211156149d5576149d4614747565b5b6149de8261442f565b9050602081019050919050565b60006149fe6149f9846149ba565b6147a7565b905082815260208101848484011115614a1a57614a19614742565b5b614a258482856147f3565b509392505050565b600082601f830112614a4257614a4161473d565b5b8135614a528482602086016149eb565b91505092915050565b60008060008060808587031215614a7557614a7461431b565b5b6000614a8387828801614571565b9450506020614a9487828801614571565b9350506040614aa5878288016144bc565b925050606085013567ffffffffffffffff811115614ac657614ac5614320565b5b614ad287828801614a2d565b91505092959194509250565b6000604082019050614af360008301856143b6565b614b0060208301846145c6565b9392505050565b60008060408385031215614b1e57614b1d61431b565b5b6000614b2c858286016144bc565b9250506020614b3d85828601614571565b9150509250929050565b60008060408385031215614b5e57614b5d61431b565b5b6000614b6c85828601614571565b9250506020614b7d85828601614571565b9150509250929050565b600080fd5b600080fd5b60008083601f840112614ba757614ba661473d565b5b8235905067ffffffffffffffff811115614bc457614bc3614b87565b5b602083019150836020820283011115614be057614bdf614b8c565b5b9250929050565b60008083601f840112614bfd57614bfc61473d565b5b8235905067ffffffffffffffff811115614c1a57614c19614b87565b5b602083019150836020820283011115614c3657614c35614b8c565b5b9250929050565b60008060008060408587031215614c5757614c5661431b565b5b600085013567ffffffffffffffff811115614c7557614c74614320565b5b614c8187828801614b91565b9450945050602085013567ffffffffffffffff811115614ca457614ca3614320565b5b614cb087828801614be7565b925092505092959194509250565b60008060008060008060608789031215614cdb57614cda61431b565b5b600087013567ffffffffffffffff811115614cf957614cf8614320565b5b614d0589828a01614be7565b9650965050602087013567ffffffffffffffff811115614d2857614d27614320565b5b614d3489828a01614be7565b9450945050604087013567ffffffffffffffff811115614d5757614d56614320565b5b614d6389828a01614be7565b92509250509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614db957607f821691505b602082108103614dcc57614dcb614d72565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000614e2e602f836143eb565b9150614e3982614dd2565b604082019050919050565b60006020820190508181036000830152614e5d81614e21565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614ec67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614e89565b614ed08683614e89565b95508019841693508086168417925050509392505050565b6000819050919050565b6000614f0d614f08614f038461449b565b614ee8565b61449b565b9050919050565b6000819050919050565b614f2783614ef2565b614f3b614f3382614f14565b848454614e96565b825550505050565b600090565b614f50614f43565b614f5b818484614f1e565b505050565b5b81811015614f7f57614f74600082614f48565b600181019050614f61565b5050565b601f821115614fc457614f9581614e64565b614f9e84614e79565b81016020851015614fad578190505b614fc1614fb985614e79565b830182614f60565b50505b505050565b600082821c905092915050565b6000614fe760001984600802614fc9565b1980831691505092915050565b60006150008383614fd6565b9150826002028217905092915050565b615019826143e0565b67ffffffffffffffff81111561503257615031614747565b5b61503c8254614da1565b615047828285614f83565b600060209050601f83116001811461507a5760008415615068578287015190505b6150728582614ff4565b8655506150da565b601f19841661508886614e64565b60005b828110156150b05784890151825560018201915060208501945060208101905061508b565b868310156150cd57848901516150c9601f891682614fd6565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061511c8261449b565b91506151278361449b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561515c5761515b6150e2565b5b828201905092915050565b60006151728261449b565b915061517d8361449b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156151b6576151b56150e2565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006151fb8261449b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361522d5761522c6150e2565b5b600182019050919050565b600081905092915050565b6000815461525081614da1565b61525a8186615238565b94506001821660008114615275576001811461528a576152bd565b60ff19831686528115158202860193506152bd565b61529385614e64565b60005b838110156152b557815481890152600182019150602081019050615296565b838801955050505b50505092915050565b60006152d28284615243565b915081905092915050565b60006152e8826143e0565b6152f28185615238565b93506153028185602086016143fc565b80840191505092915050565b600061531a82846152dd565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006153816026836143eb565b915061538c82615325565b604082019050919050565b600060208201905081810360008301526153b081615374565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006153ed6020836143eb565b91506153f8826153b7565b602082019050919050565b6000602082019050818103600083015261541c816153e0565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000615459601d836143eb565b915061546482615423565b602082019050919050565b600060208201905081810360008301526154888161544c565b9050919050565b600081905092915050565b50565b60006154aa60008361548f565b91506154b58261549a565b600082019050919050565b60006154cb8261549d565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000615531603a836143eb565b915061553c826154d5565b604082019050919050565b6000602082019050818103600083015261556081615524565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061558e82615567565b6155988185615572565b93506155a88185602086016143fc565b6155b18161442f565b840191505092915050565b60006080820190506155d16000830187614530565b6155de6020830186614530565b6155eb60408301856145c6565b81810360608301526155fd8184615583565b905095945050505050565b60008151905061561781614351565b92915050565b6000602082840312156156335761563261431b565b5b600061564184828501615608565b91505092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000615680601783615238565b915061568b8261564a565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006156cc601183615238565b91506156d782615696565b601182019050919050565b60006156ed82615673565b91506156f982856152dd565b9150615704826156bf565b915061571082846152dd565b91508190509392505050565b60006157278261449b565b91506000820361573a576157396150e2565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061577b6020836143eb565b915061578682615745565b602082019050919050565b600060208201905081810360008301526157aa8161576e565b9050919050565b60006157bc8261449b565b91506157c78361449b565b9250828210156157da576157d96150e2565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea264697066735822122049ea75dd44ab5b2970e54ce5949e41f11a4af1933e37f00e54f140c3327b44b464736f6c634300080f003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000470d1c511c57ef2dc150d4080176bb22025ba9a300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000000000000000000000000000000000000000001857474d4920416c6c204163636573732042657461204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000557474d4932000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f77676d692d7075626c69632d6173736574732e73332e616d617a6f6e6177732e636f6d2f6d657461646174612e6a736f6e00000000000000
Deployed Bytecode
0x6080604052600436106103c35760003560e01c80637ff9b596116101f2578063bc63f02e1161010d578063e985e9c5116100a0578063f6fa26ab1161006f578063f6fa26ab14610e21578063f732f5d914610e38578063fd6e4d7a14610e61578063feb309ad14610e8a576103c3565b8063e985e9c514610d65578063eb8d244414610da2578063f2fde38b14610dcd578063f5b541a614610df6576103c3565b8063d5abeb01116100dc578063d5abeb0114610cbb578063db1354d214610ce6578063e002460414610d11578063e268e4d314610d3c576103c3565b8063bc63f02e14610bef578063c87b56dd14610c18578063ca15c87314610c55578063d547741f14610c92576103c3565b8063a0712d6811610185578063ad7fa75111610154578063ad7fa75114610b32578063b88d4fde14610b5d578063b8be499b14610b86578063babcc53914610bb1576103c3565b8063a0712d6814610a97578063a217fddf14610ab3578063a22cb46514610ade578063a24e515314610b07576103c3565b80639010d07c116101c15780639010d07c146109c757806391d1485414610a0457806395d89b4114610a415780639c79e52714610a6c576103c3565b80637ff9b596146109315780638647ca761461095c57806386d1a69f146109855780638da5cb5b1461099c576103c3565b806342842e0e116102e25780636a61e5fc1161027557806370a082311161024457806370a0823114610896578063711f684a146108d3578063715018a6146108fe57806379995c1114610915576103c3565b80636a61e5fc146107ee5780636b0509b1146108175780636d4a450a146108425780636df9fa881461086d576103c3565b8063613f5a8d116102b1578063613f5a8d146107325780636301dccf1461075d5780636352211e146107885780636605bfda146107c5576103c3565b806342842e0e1461068c57806342966c68146106b5578063453c2310146106de578063599e74af14610709576103c3565b806323b872dd1161035a57806334918dfd1161032957806334918dfd146105fa57806336568abe1461061157806339e3aa7e1461063a57806341fab09d14610663576103c3565b806323b872dd14610542578063248a9ca31461056b5780632f2ff15d146105a857806331beb605146105d1576103c3565b806318160ddd1161039657806318160ddd146104965780631f8cbe5c146104c15780631fe70d6f146104ec578063212e9a0f14610517576103c3565b806301ffc9a7146103c857806306fdde0314610405578063081812fc14610430578063095ea7b31461046d575b600080fd5b3480156103d457600080fd5b506103ef60048036038101906103ea919061437d565b610ea1565b6040516103fc91906143c5565b60405180910390f35b34801561041157600080fd5b5061041a610eb3565b6040516104279190614479565b60405180910390f35b34801561043c57600080fd5b50610457600480360381019061045291906144d1565b610f45565b604051610464919061453f565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f9190614586565b610fc4565b005b3480156104a257600080fd5b506104ab611108565b6040516104b891906145d5565b60405180910390f35b3480156104cd57600080fd5b506104d661111f565b6040516104e39190614479565b60405180910390f35b3480156104f857600080fd5b506105016111b1565b60405161050e91906143c5565b60405180910390f35b34801561052357600080fd5b5061052c6111c4565b6040516105399190614609565b60405180910390f35b34801561054e57600080fd5b5061056960048036038101906105649190614624565b6111e8565b005b34801561057757600080fd5b50610592600480360381019061058d91906146a3565b61150a565b60405161059f9190614609565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca91906146d0565b61152a565b005b3480156105dd57600080fd5b506105f860048036038101906105f39190614710565b61154b565b005b34801561060657600080fd5b5061060f611597565b005b34801561061d57600080fd5b50610638600480360381019061063391906146d0565b6115cb565b005b34801561064657600080fd5b50610661600480360381019061065c9190614872565b61164e565b005b34801561066f57600080fd5b5061068a600480360381019061068591906148bb565b611669565b005b34801561069857600080fd5b506106b360048036038101906106ae9190614624565b61168b565b005b3480156106c157600080fd5b506106dc60048036038101906106d791906144d1565b6116ab565b005b3480156106ea57600080fd5b506106f36116b9565b60405161070091906145d5565b60405180910390f35b34801561071557600080fd5b50610730600480360381019061072b9190614872565b6116bf565b005b34801561073e57600080fd5b506107476117af565b6040516107549190614479565b60405180910390f35b34801561076957600080fd5b50610772611841565b60405161077f9190614609565b60405180910390f35b34801561079457600080fd5b506107af60048036038101906107aa91906144d1565b611865565b6040516107bc919061453f565b60405180910390f35b3480156107d157600080fd5b506107ec60048036038101906107e79190614710565b611877565b005b3480156107fa57600080fd5b50610815600480360381019061081091906144d1565b6118c3565b005b34801561082357600080fd5b5061082c6118d5565b6040516108399190614609565b60405180910390f35b34801561084e57600080fd5b506108576118f9565b6040516108649190614609565b60405180910390f35b34801561087957600080fd5b50610894600480360381019061088f91906144d1565b6118ff565b005b3480156108a257600080fd5b506108bd60048036038101906108b89190614710565b611911565b6040516108ca91906145d5565b60405180910390f35b3480156108df57600080fd5b506108e86119c9565b6040516108f591906145d5565b60405180910390f35b34801561090a57600080fd5b506109136119cf565b005b61092f600480360381019061092a91906144d1565b6119e3565b005b34801561093d57600080fd5b50610946611ea0565b60405161095391906145d5565b60405180910390f35b34801561096857600080fd5b50610983600480360381019061097e9190614872565b611ea6565b005b34801561099157600080fd5b5061099a611ec1565b005b3480156109a857600080fd5b506109b1611ee2565b6040516109be919061453f565b60405180910390f35b3480156109d357600080fd5b506109ee60048036038101906109e9919061490e565b611f0c565b6040516109fb919061453f565b60405180910390f35b348015610a1057600080fd5b50610a2b6004803603810190610a2691906146d0565b611f3b565b604051610a3891906143c5565b60405180910390f35b348015610a4d57600080fd5b50610a56611fa6565b604051610a639190614479565b60405180910390f35b348015610a7857600080fd5b50610a81612038565b604051610a8e9190614609565b60405180910390f35b610ab16004803603810190610aac91906144d1565b61203e565b005b348015610abf57600080fd5b50610ac861226e565b604051610ad59190614609565b60405180910390f35b348015610aea57600080fd5b50610b056004803603810190610b00919061497a565b612275565b005b348015610b1357600080fd5b50610b1c6123ec565b604051610b2991906145d5565b60405180910390f35b348015610b3e57600080fd5b50610b476123f2565b604051610b5491906143c5565b60405180910390f35b348015610b6957600080fd5b50610b846004803603810190610b7f9190614a5b565b612405565b005b348015610b9257600080fd5b50610b9b612478565b604051610ba891906143c5565b60405180910390f35b348015610bbd57600080fd5b50610bd86004803603810190610bd39190614710565b61248b565b604051610be6929190614ade565b60405180910390f35b348015610bfb57600080fd5b50610c166004803603810190610c119190614b07565b6127b8565b005b348015610c2457600080fd5b50610c3f6004803603810190610c3a91906144d1565b6128fb565b604051610c4c9190614479565b60405180910390f35b348015610c6157600080fd5b50610c7c6004803603810190610c7791906146a3565b612983565b604051610c8991906145d5565b60405180910390f35b348015610c9e57600080fd5b50610cb96004803603810190610cb491906146d0565b6129a7565b005b348015610cc757600080fd5b50610cd06129c8565b604051610cdd91906145d5565b60405180910390f35b348015610cf257600080fd5b50610cfb6129ce565b604051610d089190614609565b60405180910390f35b348015610d1d57600080fd5b50610d266129d4565b604051610d33919061453f565b60405180910390f35b348015610d4857600080fd5b50610d636004803603810190610d5e91906144d1565b6129fe565b005b348015610d7157600080fd5b50610d8c6004803603810190610d879190614b47565b612a10565b604051610d9991906143c5565b60405180910390f35b348015610dae57600080fd5b50610db7612aa4565b604051610dc491906143c5565b60405180910390f35b348015610dd957600080fd5b50610df46004803603810190610def9190614710565b612ab7565b005b348015610e0257600080fd5b50610e0b612b3a565b604051610e189190614609565b60405180910390f35b348015610e2d57600080fd5b50610e36612b5e565b005b348015610e4457600080fd5b50610e5f6004803603810190610e5a9190614c3d565b612b92565b005b348015610e6d57600080fd5b50610e886004803603810190610e839190614cbe565b612d8a565b005b348015610e9657600080fd5b50610e9f612fca565b005b6000610eac8261310f565b9050919050565b606060028054610ec290614da1565b80601f0160208091040260200160405190810160405280929190818152602001828054610eee90614da1565b8015610f3b5780601f10610f1057610100808354040283529160200191610f3b565b820191906000526020600020905b815481529060010190602001808311610f1e57829003601f168201915b5050505050905090565b6000610f50826131a1565b610f86576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610fcf82611865565b90508073ffffffffffffffffffffffffffffffffffffffff16610ff0613200565b73ffffffffffffffffffffffffffffffffffffffff16146110535761101c81611017613200565b612a10565b611052576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000611112613208565b6001546000540303905090565b6060601c805461112e90614da1565b80601f016020809104026020016040519081016040528092919081815260200182805461115a90614da1565b80156111a75780601f1061117c576101008083540402835291602001916111a7565b820191906000526020600020905b81548152906001019060200180831161118a57829003601f168201915b5050505050905090565b600c60029054906101000a900460ff1681565b7f2744a6917094ca2ea2ac15d34cf9febe9c2a504b2370fa0f60e99090ad07d83e81565b60006111f382613211565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461125a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611266846132dd565b9150915061127c8187611277613200565b613304565b6112c8576112918661128c613200565b612a10565b6112c7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361132e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61133b8686866001613348565b801561134657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550611414856113f088888761334e565b7c020000000000000000000000000000000000000000000000000000000017613376565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361149a5760006001850190506000600460008381526020019081526020016000205403611498576000548114611497578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461150286868660016133a1565b505050505050565b600060086000838152602001908152602001600020600101549050919050565b6115338261150a565b61153c816133a7565b61154683836133bb565b505050565b6115536133ef565b80600c60036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61159f6133ef565b600c60009054906101000a900460ff1615600c60006101000a81548160ff021916908315150217905550565b6115d361346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163790614e44565b60405180910390fd5b61164a8282613475565b5050565b6116566133ef565b80601d90816116659190615010565b5050565b6116716133ef565b826014819055508160158190555080601681905550505050565b6116a683838360405180602001604052806000815250612405565b505050565b6116b68160016134a9565b50565b60105481565b6116c76133ef565b61175b81600b80546116d890614da1565b80601f016020809104026020016040519081016040528092919081815260200182805461170490614da1565b80156117515780601f1061172657610100808354040283529160200191611751565b820191906000526020600020905b81548152906001019060200180831161173457829003601f168201915b50505050506136fb565b611791576040517fa10f96b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600a60146101000a81548160ff02191690831515021790555050565b6060601d80546117be90614da1565b80601f01602080910402602001604051908101604052809291908181526020018280546117ea90614da1565b80156118375780601f1061180c57610100808354040283529160200191611837565b820191906000526020600020905b81548152906001019060200180831161181a57829003601f168201915b5050505050905090565b7f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061187082613211565b9050919050565b61187f6133ef565b80601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6118cb6133ef565b8060118190555050565b7f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca81565b600d5481565b6119076133ef565b8060128190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611978576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b60175481565b6119d76133ef565b6119e160006137df565b565b600c60019054906101000a900460ff16611a29576040517fc39f6ac400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006018805480602002602001604051908101604052809291908181526020018280548015611aad57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611a63575b5050505050905060006019805480602002602001604051908101604052809291908181526020018280548015611b3857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611aee575b505050505090506000601a805480602002602001604051908101604052809291908181526020018280548015611bc357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611b79575b5050505050905061177084611bd6611108565b611be09190615111565b1115611c18576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008351111580611c2b57506000825111155b80611c3857506000815111155b15611c6f576040517f4578c07e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83601254611c7d9190615167565b341015611cb6576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b8451811015611d2d573373ffffffffffffffffffffffffffffffffffffffff16858281518110611cf157611cf06151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611d1a5760145491505b8080611d25906151f0565b915050611cbe565b5060005b8351811015611da0573373ffffffffffffffffffffffffffffffffffffffff16848281518110611d6457611d636151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611d8d5760155491505b8080611d98906151f0565b915050611d31565b5060005b8251811015611e13573373ffffffffffffffffffffffffffffffffffffffff16838281518110611dd757611dd66151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e005760165491505b8080611e0b906151f0565b915050611da4565b5060008111611e4e576040517fe0e6520900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611e5833611911565b10611e8f576040517fedfb508500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e9933866138a5565b5050505050565b60115481565b611eae6133ef565b80601c9081611ebd9190615010565b5050565b611ec96133ef565b6000479050611edf611ed9611ee2565b82613a60565b50565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611f338260096000868152602001908152602001600020613b5490919063ffffffff16565b905092915050565b60006008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b606060038054611fb590614da1565b80601f0160208091040260200160405190810160405280929190818152602001828054611fe190614da1565b801561202e5780601f106120035761010080835404028352916020019161202e565b820191906000526020600020905b81548152906001019060200180831161201157829003601f168201915b5050505050905090565b600f5481565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120a3576040517fd9d552c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c60009054906101000a900460ff166120e9576040517fb7b2409700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a60149054906101000a900460ff1615612130576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61177061213b611108565b826121469190615111565b1061217d576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601354612188611108565b826121939190615111565b11156121cb576040517fa313e08d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601054816121d833613b6e565b6121e29190615111565b111561221a576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806011546122289190615167565b341015612261576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61226b33826138a5565b50565b6000801b81565b61227d613200565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036122e1576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006122ee613200565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661239b613200565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123e091906143c5565b60405180910390a35050565b60125481565b600a60149054906101000a900460ff1681565b6124108484846111e8565b60008373ffffffffffffffffffffffffffffffffffffffff163b146124725761243b84848484613bc5565b612471576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b600c60019054906101000a900460ff1681565b6000806000601880548060200260200160405190810160405280929190818152602001828054801561251257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116124c8575b505050505090506000601980548060200260200160405190810160405280929190818152602001828054801561259d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612553575b505050505090506000601a80548060200260200160405190810160405280929190818152602001828054801561262857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116125de575b5050505050905060005b83518110156126ab578673ffffffffffffffffffffffffffffffffffffffff16848281518110612665576126646151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036126985760018095509550505050506127b3565b80806126a3906151f0565b915050612632565b5060005b8251811015612729578673ffffffffffffffffffffffffffffffffffffffff168382815181106126e2576126e16151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612716576001600295509550505050506127b3565b8080612721906151f0565b9150506126af565b5060005b81518110156127a7578673ffffffffffffffffffffffffffffffffffffffff168282815181106127605761275f6151c1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612794576001600395509550505050506127b3565b808061279f906151f0565b91505061272d565b50600080945094505050505b915091565b600a60149054906101000a900460ff16156127ff576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1661281e611ee2565b73ffffffffffffffffffffffffffffffffffffffff161415801561286957506128677f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92933611f3b565b155b156128a0576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117706128ab611108565b836128b69190615111565b106128ed576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6128f781836138a5565b5050565b6060612906826131a1565b61293c576040517f8e8fe17c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601c60405160200161294e91906152c6565b60405160208183030381529060405260405160200161296d919061530e565b6040516020818303038152906040529050919050565b60006129a060096000848152602001908152602001600020613d15565b9050919050565b6129b08261150a565b6129b9816133a7565b6129c38383613475565b505050565b61177081565b600e5481565b6000601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612a066133ef565b8060108190555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c60009054906101000a900460ff1681565b612abf6133ef565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2590615397565b60405180910390fd5b612b37816137df565b50565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b612b666133ef565b600c60029054906101000a900460ff1615600c60026101000a81548160ff021916908315150217905550565b600a60149054906101000a900460ff1615612bd9576040517f6f5ffb7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16612bf8611ee2565b73ffffffffffffffffffffffffffffffffffffffff1614158015612c435750612c417f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92933611f3b565b155b15612c7a576040517fea8e4eb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014612cb9576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82829050811015612d8357611770612cd2611108565b868684818110612ce557612ce46151c1565b5b90506020020135612cf69190615111565b1115612d2e576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d78838383818110612d4457612d436151c1565b5b9050602002016020810190612d599190614710565b868684818110612d6c57612d6b6151c1565b5b905060200201356138a5565b806001019050612cbc565b5050505050565b612d926133ef565b6000868690501180612da75750600086869050115b80612db55750600082829050115b612dbe57600080fd5b60005b86869050811015612e69576018878783818110612de157612de06151c1565b5b9050602002016020810190612df69190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612e61906151f0565b915050612dc1565b5060005b84849050811015612f15576019858583818110612e8d57612e8c6151c1565b5b9050602002016020810190612ea29190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612f0d906151f0565b915050612e6d565b5060005b82829050811015612fc157601a838383818110612f3957612f386151c1565b5b9050602002016020810190612f4e9190614710565b9080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080612fb9906151f0565b915050612f19565b50505050505050565b612fd26133ef565b600c60019054906101000a900460ff1615600c60016101000a81548160ff021916908315150217905550565b6130088282611f3b565b6130db5760016008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061308061346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000613107836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613d2a565b905092915050565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061316a57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061319a5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000816131ac613208565b111580156131bb575060005482105b80156131f9575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b60008082905080613220613208565b116132a6576000548110156132a55760006004600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216036132a3575b6000810361329957600460008360019003935083815260200190815260200160002054905061326f565b80925050506132d8565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613365868684613d9a565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6133b8816133b361346d565b613da3565b50565b6133c58282612ffe565b6133ea81600960008581526020019081526020016000206130df90919063ffffffff16565b505050565b6133f761346d565b73ffffffffffffffffffffffffffffffffffffffff16613415611ee2565b73ffffffffffffffffffffffffffffffffffffffff161461346b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161346290615403565b60405180910390fd5b565b600033905090565b61347f8282613e40565b6134a48160096000858152602001908152602001600020613f2290919063ffffffff16565b505050565b60006134b483613211565b905060008190506000806134c7866132dd565b915091508415613530576134e381846134de613200565b613304565b61352f576134f8836134f3613200565b612a10565b61352e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b61353e836000886001613348565b801561354957600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506135f1836135ae8560008861334e565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613376565b600460008881526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008516036136775760006001870190506000600460008381526020019081526020016000205403613675576000548114613674578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46136e18360008860016133a1565b600160008154809291906001019190505550505050505050565b60008083905060008390506000825190508151811461372057600093505050506137d9565b60005b818110156137d05782818151811061373e5761373d6151c1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811061377e5761377d6151c1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146137bd5760009450505050506137d9565b80806137c8906151f0565b915050613723565b50600193505050505b92915050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080549050600082036138e5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138f26000848385613348565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506139698361395a600086600061334e565b61396385613f52565b17613376565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114613a0a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506139cf565b5060008203613a45576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050613a5b60008483856133a1565b505050565b80471015613aa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a9a9061546f565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051613ac9906154c0565b60006040518083038185875af1925050503d8060008114613b06576040519150601f19603f3d011682016040523d82523d6000602084013e613b0b565b606091505b5050905080613b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b4690615547565b60405180910390fd5b505050565b6000613b638360000183613f62565b60001c905092915050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613beb613200565b8786866040518563ffffffff1660e01b8152600401613c0d94939291906155bc565b6020604051808303816000875af1925050508015613c4957506040513d601f19601f82011682018060405250810190613c46919061561d565b60015b613cc2573d8060008114613c79576040519150601f19603f3d011682016040523d82523d6000602084013e613c7e565b606091505b506000815103613cba576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6000613d2382600001613f8d565b9050919050565b6000613d368383613f9e565b613d8f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613d94565b600090505b92915050565b60009392505050565b613dad8282611f3b565b613e3c57613dd28173ffffffffffffffffffffffffffffffffffffffff166014613fc1565b613de08360001c6020613fc1565b604051602001613df19291906156e2565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e339190614479565b60405180910390fd5b5050565b613e4a8282611f3b565b15613f1e5760006008600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613ec361346d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000613f4a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141fd565b905092915050565b60006001821460e11b9050919050565b6000826000018281548110613f7a57613f796151c1565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b606060006002836002613fd49190615167565b613fde9190615111565b67ffffffffffffffff811115613ff757613ff6614747565b5b6040519080825280601f01601f1916602001820160405280156140295781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110614061576140606151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106140c5576140c46151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026141059190615167565b61410f9190615111565b90505b60018111156141af577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110614151576141506151c1565b5b1a60f81b828281518110614168576141676151c1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806141a89061571c565b9050614112565b50600084146141f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016141ea90615791565b60405180910390fd5b8091505092915050565b6000808360010160008481526020019081526020016000205490506000811461430557600060018261422f91906157b1565b905060006001866000018054905061424791906157b1565b90508181146142b6576000866000018281548110614268576142676151c1565b5b906000526020600020015490508087600001848154811061428c5761428b6151c1565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806142ca576142c96157e5565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061430b565b60009150505b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61435a81614325565b811461436557600080fd5b50565b60008135905061437781614351565b92915050565b6000602082840312156143935761439261431b565b5b60006143a184828501614368565b91505092915050565b60008115159050919050565b6143bf816143aa565b82525050565b60006020820190506143da60008301846143b6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561441a5780820151818401526020810190506143ff565b83811115614429576000848401525b50505050565b6000601f19601f8301169050919050565b600061444b826143e0565b61445581856143eb565b93506144658185602086016143fc565b61446e8161442f565b840191505092915050565b600060208201905081810360008301526144938184614440565b905092915050565b6000819050919050565b6144ae8161449b565b81146144b957600080fd5b50565b6000813590506144cb816144a5565b92915050565b6000602082840312156144e7576144e661431b565b5b60006144f5848285016144bc565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614529826144fe565b9050919050565b6145398161451e565b82525050565b60006020820190506145546000830184614530565b92915050565b6145638161451e565b811461456e57600080fd5b50565b6000813590506145808161455a565b92915050565b6000806040838503121561459d5761459c61431b565b5b60006145ab85828601614571565b92505060206145bc858286016144bc565b9150509250929050565b6145cf8161449b565b82525050565b60006020820190506145ea60008301846145c6565b92915050565b6000819050919050565b614603816145f0565b82525050565b600060208201905061461e60008301846145fa565b92915050565b60008060006060848603121561463d5761463c61431b565b5b600061464b86828701614571565b935050602061465c86828701614571565b925050604061466d868287016144bc565b9150509250925092565b614680816145f0565b811461468b57600080fd5b50565b60008135905061469d81614677565b92915050565b6000602082840312156146b9576146b861431b565b5b60006146c78482850161468e565b91505092915050565b600080604083850312156146e7576146e661431b565b5b60006146f58582860161468e565b925050602061470685828601614571565b9150509250929050565b6000602082840312156147265761472561431b565b5b600061473484828501614571565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61477f8261442f565b810181811067ffffffffffffffff8211171561479e5761479d614747565b5b80604052505050565b60006147b1614311565b90506147bd8282614776565b919050565b600067ffffffffffffffff8211156147dd576147dc614747565b5b6147e68261442f565b9050602081019050919050565b82818337600083830152505050565b6000614815614810846147c2565b6147a7565b90508281526020810184848401111561483157614830614742565b5b61483c8482856147f3565b509392505050565b600082601f8301126148595761485861473d565b5b8135614869848260208601614802565b91505092915050565b6000602082840312156148885761488761431b565b5b600082013567ffffffffffffffff8111156148a6576148a5614320565b5b6148b284828501614844565b91505092915050565b6000806000606084860312156148d4576148d361431b565b5b60006148e2868287016144bc565b93505060206148f3868287016144bc565b9250506040614904868287016144bc565b9150509250925092565b600080604083850312156149255761492461431b565b5b60006149338582860161468e565b9250506020614944858286016144bc565b9150509250929050565b614957816143aa565b811461496257600080fd5b50565b6000813590506149748161494e565b92915050565b600080604083850312156149915761499061431b565b5b600061499f85828601614571565b92505060206149b085828601614965565b9150509250929050565b600067ffffffffffffffff8211156149d5576149d4614747565b5b6149de8261442f565b9050602081019050919050565b60006149fe6149f9846149ba565b6147a7565b905082815260208101848484011115614a1a57614a19614742565b5b614a258482856147f3565b509392505050565b600082601f830112614a4257614a4161473d565b5b8135614a528482602086016149eb565b91505092915050565b60008060008060808587031215614a7557614a7461431b565b5b6000614a8387828801614571565b9450506020614a9487828801614571565b9350506040614aa5878288016144bc565b925050606085013567ffffffffffffffff811115614ac657614ac5614320565b5b614ad287828801614a2d565b91505092959194509250565b6000604082019050614af360008301856143b6565b614b0060208301846145c6565b9392505050565b60008060408385031215614b1e57614b1d61431b565b5b6000614b2c858286016144bc565b9250506020614b3d85828601614571565b9150509250929050565b60008060408385031215614b5e57614b5d61431b565b5b6000614b6c85828601614571565b9250506020614b7d85828601614571565b9150509250929050565b600080fd5b600080fd5b60008083601f840112614ba757614ba661473d565b5b8235905067ffffffffffffffff811115614bc457614bc3614b87565b5b602083019150836020820283011115614be057614bdf614b8c565b5b9250929050565b60008083601f840112614bfd57614bfc61473d565b5b8235905067ffffffffffffffff811115614c1a57614c19614b87565b5b602083019150836020820283011115614c3657614c35614b8c565b5b9250929050565b60008060008060408587031215614c5757614c5661431b565b5b600085013567ffffffffffffffff811115614c7557614c74614320565b5b614c8187828801614b91565b9450945050602085013567ffffffffffffffff811115614ca457614ca3614320565b5b614cb087828801614be7565b925092505092959194509250565b60008060008060008060608789031215614cdb57614cda61431b565b5b600087013567ffffffffffffffff811115614cf957614cf8614320565b5b614d0589828a01614be7565b9650965050602087013567ffffffffffffffff811115614d2857614d27614320565b5b614d3489828a01614be7565b9450945050604087013567ffffffffffffffff811115614d5757614d56614320565b5b614d6389828a01614be7565b92509250509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614db957607f821691505b602082108103614dcc57614dcb614d72565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000614e2e602f836143eb565b9150614e3982614dd2565b604082019050919050565b60006020820190508181036000830152614e5d81614e21565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614ec67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614e89565b614ed08683614e89565b95508019841693508086168417925050509392505050565b6000819050919050565b6000614f0d614f08614f038461449b565b614ee8565b61449b565b9050919050565b6000819050919050565b614f2783614ef2565b614f3b614f3382614f14565b848454614e96565b825550505050565b600090565b614f50614f43565b614f5b818484614f1e565b505050565b5b81811015614f7f57614f74600082614f48565b600181019050614f61565b5050565b601f821115614fc457614f9581614e64565b614f9e84614e79565b81016020851015614fad578190505b614fc1614fb985614e79565b830182614f60565b50505b505050565b600082821c905092915050565b6000614fe760001984600802614fc9565b1980831691505092915050565b60006150008383614fd6565b9150826002028217905092915050565b615019826143e0565b67ffffffffffffffff81111561503257615031614747565b5b61503c8254614da1565b615047828285614f83565b600060209050601f83116001811461507a5760008415615068578287015190505b6150728582614ff4565b8655506150da565b601f19841661508886614e64565b60005b828110156150b05784890151825560018201915060208501945060208101905061508b565b868310156150cd57848901516150c9601f891682614fd6565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061511c8261449b565b91506151278361449b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561515c5761515b6150e2565b5b828201905092915050565b60006151728261449b565b915061517d8361449b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156151b6576151b56150e2565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006151fb8261449b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361522d5761522c6150e2565b5b600182019050919050565b600081905092915050565b6000815461525081614da1565b61525a8186615238565b94506001821660008114615275576001811461528a576152bd565b60ff19831686528115158202860193506152bd565b61529385614e64565b60005b838110156152b557815481890152600182019150602081019050615296565b838801955050505b50505092915050565b60006152d28284615243565b915081905092915050565b60006152e8826143e0565b6152f28185615238565b93506153028185602086016143fc565b80840191505092915050565b600061531a82846152dd565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006153816026836143eb565b915061538c82615325565b604082019050919050565b600060208201905081810360008301526153b081615374565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006153ed6020836143eb565b91506153f8826153b7565b602082019050919050565b6000602082019050818103600083015261541c816153e0565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000615459601d836143eb565b915061546482615423565b602082019050919050565b600060208201905081810360008301526154888161544c565b9050919050565b600081905092915050565b50565b60006154aa60008361548f565b91506154b58261549a565b600082019050919050565b60006154cb8261549d565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000615531603a836143eb565b915061553c826154d5565b604082019050919050565b6000602082019050818103600083015261556081615524565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061558e82615567565b6155988185615572565b93506155a88185602086016143fc565b6155b18161442f565b840191505092915050565b60006080820190506155d16000830187614530565b6155de6020830186614530565b6155eb60408301856145c6565b81810360608301526155fd8184615583565b905095945050505050565b60008151905061561781614351565b92915050565b6000602082840312156156335761563261431b565b5b600061564184828501615608565b91505092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000615680601783615238565b915061568b8261564a565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006156cc601183615238565b91506156d782615696565b601182019050919050565b60006156ed82615673565b91506156f982856152dd565b9150615704826156bf565b915061571082846152dd565b91508190509392505050565b60006157278261449b565b91506000820361573a576157396150e2565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061577b6020836143eb565b915061578682615745565b602082019050919050565b600060208201905081810360008301526157aa8161576e565b9050919050565b60006157bc8261449b565b91506157c78361449b565b9250828210156157da576157d96150e2565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea264697066735822122049ea75dd44ab5b2970e54ce5949e41f11a4af1933e37f00e54f140c3327b44b464736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000470d1c511c57ef2dc150d4080176bb22025ba9a300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000000000000000000000000000000000000000001857474d4920416c6c204163636573732042657461204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000557474d4932000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f77676d692d7075626c69632d6173736574732e73332e616d617a6f6e6177732e636f6d2f6d657461646174612e6a736f6e00000000000000
-----Decoded View---------------
Arg [0] : _tokenName (string): WGMI All Access Beta NFT
Arg [1] : _tokenSymbol (string): WGMI2
Arg [2] : _baseImageURI (string): https://wgmi-public-assets.s3.amazonaws.com/metadata.json
Arg [3] : _treasuryAddress (address): 0x470D1c511C57Ef2DC150D4080176bb22025Ba9a3
Arg [4] : _mintableSupply (uint256): 1500
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 000000000000000000000000470d1c511c57ef2dc150d4080176bb22025ba9a3
Arg [4] : 00000000000000000000000000000000000000000000000000000000000005dc
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [6] : 57474d4920416c6c204163636573732042657461204e46540000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 57474d4932000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000039
Arg [10] : 68747470733a2f2f77676d692d7075626c69632d6173736574732e73332e616d
Arg [11] : 617a6f6e6177732e636f6d2f6d657461646174612e6a736f6e00000000000000
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.