Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
5025
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CNPP
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import { BitOpe } from 'bitope/contracts/libs/BitOpe.sol'; import "./libs/OperatorFilterer/UpdatableOperatorFilterer.sol"; import "./libs/OperatorFilterer/RevokableDefaultOperatorFilterer.sol"; import "./interface/ITokenURI.sol"; import "./interface/IContractAllowListProxy.sol"; import "./interface/ISBTwithMint.sol"; abstract contract CNPPcore is Ownable{ enum Phase { BeforeMint, WLMint, BurnMint } // Upgradable FullOnChain ITokenURI public tokenuri; IContractAllowListProxy public cal; address public stakeManage; //for only stake control address public constant WITHDRAW_ADDRESS = 0x664d4e1e7E0DEb51932985f0A727d4dFB09fB621; uint256 public constant MAX_SUPPLY = 7641; uint256 public maxBurnMint = 2000; uint256 public limitGroup; //0 start uint256 public cost = 0.001 ether; string public baseURI; string public baseURI_lock; string public baseExtension = ".json"; bool public revealed; //initial:false string public notRevealedUri; bytes32 public merkleRoot; uint256 public wlcount; // max:65535 Always raiseOrder uint256 public bmcount; // max:65535 Always raiseOrder Phase public phase = Phase.BeforeMint; address public royaltyAddress = WITHDRAW_ADDRESS; uint96 public royaltyFee = 1000; // default:10% uint256 public calLevel = 1; bool public isLocked; //initial:false bool public isLockDisplay; //initial:false // Bit management with uint256 for 30 groups of 256 divisions of 7641 mapping(uint256 => uint256) public stakeInfo; //individual lock&stake bool public SBTwithMint; //initial:false ISBTwithMint public sbtCollection; event StartStake(address indexed holder,uint256 indexed tokenId,uint256 startTime); event EndStake(address indexed holder,uint256 indexed tokenId,uint256 endTime); } abstract contract CNPPadmin is CNPPcore,AccessControl,ERC721AQueryable,ERC2981{ using BitOpe for uint256; function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl,IERC721A,ERC721A, ERC2981) returns (bool) { return interfaceId == type(IAccessControl).interfaceId || interfaceId == type(IERC721A).interfaceId || interfaceId == type(ERC2981).interfaceId || super.supportsInterface(interfaceId); } // modifier modifier onlyAdmin() { _checkRole(DEFAULT_ADMIN_ROLE); _; } // onlyAdmin function setMaxBurnMint(uint256 _value) external onlyAdmin { maxBurnMint = _value; } function setCost(uint256 _value) external onlyAdmin { cost = _value; } function setBaseURI(string memory _newBaseURI) external onlyAdmin { baseURI = _newBaseURI; } function setBaseURI_lock(string memory _newBaseURI) external onlyAdmin { baseURI_lock = _newBaseURI; } function setBaseExtension(string memory _newBaseExtension) external onlyAdmin { baseExtension = _newBaseExtension; } function setRevealed(bool _value) external onlyAdmin{ revealed = _value; } function setNotRevealedURI(string memory _notRevealedURI) external onlyAdmin { notRevealedUri = _notRevealedURI; } function setPhase(Phase _newPhase) external onlyAdmin { //0:BeroreMint > Always Stop Sale (1 -> 0 , 2 -> 0) //1:WLMint > Mint Start (0 -> 1) //2:BurnMint > BurnMint Start (1 -> 2) phase = _newPhase; } function setLimitGroup(uint256 _value) external onlyAdmin{ limitGroup = _value; } function incWlcount() external onlyAdmin { require( phase == Phase.BeforeMint,"out-of-scope phase that can be set"); require( wlcount < 65535,"no Valid"); unchecked { wlcount += 1; } } function incBMcount() external onlyAdmin { require( phase == Phase.BeforeMint,"out-of-scope phase that can be set"); require( bmcount < 65535,"no Valid"); unchecked { bmcount += 1; } } function setMerkleRoot(bytes32 _merkleRoot) external onlyAdmin { merkleRoot = _merkleRoot; } function withdraw() external onlyAdmin { (bool os, ) = payable(WITHDRAW_ADDRESS).call{value: address(this).balance}(""); require(os); } function setRoyaltyFee(uint96 _feeNumerator) external onlyAdmin { royaltyFee = _feeNumerator; // set Default Royalty._feeNumerator 500 = 5% Royalty _setDefaultRoyalty(royaltyAddress, royaltyFee); } function setRoyaltyAddress(address _royaltyAddress) external onlyAdmin { royaltyAddress = _royaltyAddress; //Change the royalty address where royalty payouts are sent _setDefaultRoyalty(royaltyAddress, royaltyFee); } function setTokenURI(ITokenURI _tokenuri) external onlyAdmin{ tokenuri = _tokenuri; } function setStakeManage(address _stakemanage) external onlyAdmin{ stakeManage = _stakemanage; } function setCalContract(IContractAllowListProxy _cal) external onlyAdmin{ cal = _cal; } function setCalLevel(uint256 _value) external onlyAdmin{ calLevel = _value; } function setIsLocked(bool _locked) external onlyAdmin{ isLocked = _locked; } function setIsLockDisplay(bool _lockDisplay) external onlyAdmin{ isLockDisplay = _lockDisplay; } function setSBTwithMint(bool _SBTwithMint) external onlyAdmin { SBTwithMint = _SBTwithMint; } function setSbtCollection(address _address) external onlyAdmin { sbtCollection = ISBTwithMint(_address); } function admin_mint(address[] calldata _airdropAddresses , uint256[] memory _UserMintAmount) external onlyAdmin{ uint256 _mintAmount = 0; for (uint256 i = 0; i < _UserMintAmount.length; i++) { _mintAmount += _UserMintAmount[i]; } require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount + totalSupply() <= MAX_SUPPLY, "claim is over the max supply"); require(_airdropAddresses.length == _UserMintAmount.length, "array length unmuch"); for (uint256 i = 0; i < _UserMintAmount.length; i++) { _safeMint(_airdropAddresses[i], _UserMintAmount[i] ); } } function _getStakeInfo(uint256 _tokenId) internal view returns(bool value){ uint256 _group = _tokenId / 256; uint256 _index = (_tokenId % 256); return stakeInfo[_group].get256bit(_index); } function _setStakeInfo(uint256 _tokenId,bool _setValue) internal{ uint256 _group = _tokenId / 256; uint256 _index = (_tokenId % 256); stakeInfo[_group] = stakeInfo[_group].set256bit(_index,_setValue); } // Stake Function function _setStartStake(uint256 _tokenId) internal{ require(_exists(_tokenId) == true,"not exists"); require(_getStakeInfo(_tokenId) == false,"Already staked"); _setStakeInfo(_tokenId,true); emit StartStake(ownerOf(_tokenId),_tokenId,block.timestamp); } function _setEndStake(uint256 _tokenId) internal { require(_exists(_tokenId) == true,"not exists"); require(_getStakeInfo(_tokenId) == true,"Not staked"); _setStakeInfo(_tokenId,false); emit EndStake(ownerOf(_tokenId),_tokenId,block.timestamp); } function setStartStake_admin(uint256[] calldata _tokenIds) external onlyAdmin{ for(uint256 i = 0; i < _tokenIds.length;i++){ _setStartStake(_tokenIds[i]); } } function setEndStake_admin(uint256[] calldata _tokenIds) external onlyAdmin { for(uint256 i = 0; i < _tokenIds.length;i++){ _setEndStake(_tokenIds[i]); } } } contract CNPP is CNPPadmin,RevokableDefaultOperatorFilterer{ using BitOpe for uint256; using BitOpe for uint64; constructor() ERC721A('CNP Philippines', 'CNPP') { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _safeMint(0x664d4e1e7E0DEb51932985f0A727d4dFB09fB621, 1448); _safeMint(0xAb5060422c66dDA175a9931fCdF589E2A059D9FC, 500); _safeMint(0x083e6B4300A3e3c4e6d6e888E4cA158b3cb1812E, 50); _safeMint(0x6A1Ebf8f64aA793b4113E9D76864ea2264A5d482, 25); _safeMint(0xd63A3eD1B2a6776b031B56C6ba91c6fEEBaCfA1f, 15); _safeMint(0xe0aB5Bcf3E41De3598D9F41B95c708a16fDf6383, 15); } // overrides function setApprovalForAll(address operator, bool approved) public virtual override(IERC721A,ERC721A) onlyAllowedOperatorApproval(operator){ if(address(cal) != address(0)){ require(cal.isAllowed(operator,calLevel) == true,"address no list"); } super.setApprovalForAll(operator,approved); } function approve(address to, uint256 tokenId) public virtual override(IERC721A,ERC721A) onlyAllowedOperatorApproval(to){ if(address(cal) != address(0)){ require(cal.isAllowed(to,calLevel) == true,"address no list"); } if(isLocked == true){ require(_getStakeInfo(tokenId) == false,"this tokenId is locked"); } super.approve(to, tokenId); } function _beforeTokenTransfers( address from, address /*to*/, uint256 startTokenId, uint256 /*quantity*/ ) internal view override { // individual lock if(isLocked == true && from != address(0)){ require(_getStakeInfo(startTokenId) == false,"this tokenId is locked"); } } function _afterTokenTransfers( address from, address /*to*/, uint256 startTokenId, uint256 /*quantity*/ ) internal virtual override { if (from != address(0) && _getStakeInfo(startTokenId) == true) { // after transfer always unstake _setStakeInfo(startTokenId,false); } } // For OperatorFilter functions function transferFrom( address from, address to, uint256 tokenId ) public override(IERC721A,ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(IERC721A,ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(IERC721A,ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function owner() public view virtual override (Ownable, UpdatableOperatorFilterer) returns (address) { return Ownable.owner(); } // internal function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function _tokenURI_lock(uint256 _tokenId) internal view returns (string memory) { if (!_exists(_tokenId)) revert URIQueryForNonexistentToken(); return bytes(baseURI_lock).length != 0 ? string(abi.encodePacked(baseURI_lock, _toString(_tokenId))) : ''; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } // aux->00..15:wl_count,16..31:wl_amount,32..47:burnmint_count,48..63:burnmint_amount function _resetWLCount(address _owner) internal{ uint64 _auxval = _getAux(_owner); if(_auxval.get16_forAux(0) < wlcount){ _setAux(_owner,_auxval.set16_forAux(0,uint64(wlcount)).set16_forAux(1,0)); // CountUp + Clear } } function _resetBMCount(address _owner) internal{ uint64 _auxval = _getAux(_owner); if(_auxval.get16_forAux(2) < bmcount){ _setAux(_owner,_auxval.set16_forAux(2,uint64(bmcount)).set16_forAux(3,0)); // CountUp + Clear } } function _getAuxforWLAmount(address _owner) internal returns (uint64){ _resetWLCount(_owner); return _getAux(_owner).get16_forAux(1); } function _getAuxforBMAmount(address _owner) internal returns (uint64){ _resetBMCount(_owner); return _getAux(_owner).get16_forAux(3); } function _setAuxforWL(address _owner, uint64 _aux) internal { _resetWLCount(_owner); _setAux(_owner,_getAux(_owner).set16_forAux(1,_aux)); } function _setWLmintedCount(address _owner,uint256 _mintAmount) internal{ unchecked { _setAuxforWL(_owner,_getAuxforWLAmount(_owner) + uint64(_mintAmount)); } } function _setAuxforBM(address _owner, uint64 _aux) internal{ _resetBMCount(_owner); _setAux(_owner,_getAux(_owner).set16_forAux(3,_aux)); } function _setBMmintedCount(address _owner,uint256 _mintAmount) internal{ unchecked { _setAuxforBM(_owner,_getAuxforBMAmount(_owner) + uint64(_mintAmount)); } } // public function tokenURI(uint256 tokenId) public view virtual override(IERC721A,ERC721A) returns (string memory){ if(revealed == false) { return notRevealedUri; } if(address(tokenuri) == address(0)) { if(isLockDisplay == true && isLocked == true && _getStakeInfo(tokenId) == true){ return string(abi.encodePacked(_tokenURI_lock(tokenId), baseExtension)); }else{ return string(abi.encodePacked(ERC721A.tokenURI(tokenId), baseExtension)); } }else{ // Full-on chain support return tokenuri.tokenURI_future(tokenId,_getStakeInfo(tokenId)); } } function getWLRemain(address _address,uint256 _wlAmountMax,uint256 _wlGroup,bytes32[] calldata _merkleProof) public view returns (uint256) { uint256 _Amount = 0; if(phase == Phase.WLMint){ if(getWLExit(_address,_wlAmountMax,_wlGroup,_merkleProof) == true){ if(_getAux(_address).get16_forAux(0) < wlcount){ _Amount = _wlAmountMax; }else{ _Amount = _wlAmountMax - _getAux(_address).get16_forAux(1); } } } return _Amount; } function getBMRemain(address _address,uint256 _wlAmountMax,uint256 _wlGroup,bytes32[] calldata _merkleProof ) public view returns (uint256) { uint256 _Amount = 0; if(phase == Phase.BurnMint){ if(getWLExit(_address,_wlAmountMax,_wlGroup,_merkleProof) == true){ if(_getAux(_address).get16_forAux(2) < bmcount){ _Amount = _wlAmountMax; }else{ _Amount = _wlAmountMax - _getAux(_address).get16_forAux(3); } } } return _Amount; } function getWLExit(address _address,uint256 _wlAmountMax,uint256 _wlGroup,bytes32[] calldata _merkleProof ) public view returns (bool) { bool _exit = false; bytes32 _leaf = keccak256(abi.encodePacked(_address,_wlAmountMax,_wlGroup)); if(MerkleProof.verifyCalldata(_merkleProof, merkleRoot, _leaf) == true){ _exit = true; } return _exit; } // external function getTotalBurned() external view returns (uint256) { return _totalBurned(); } function mint(uint256 _mintAmount,uint256 _wlAmountMax,uint256 _wlGroup,bytes32[] calldata _merkleProof) external payable { require(phase == Phase.WLMint,"sale is not active"); require(_wlGroup <= limitGroup,"not target group"); require(tx.origin == msg.sender,"the caller is another controler"); require(getWLExit(msg.sender,_wlAmountMax,_wlGroup,_merkleProof) == true,"You don't have a whitelist!"); require(_mintAmount > 0, "need to mint at least 1 NFT"); _resetWLCount(msg.sender); // Always check reset before getWLRemain require(_mintAmount <= getWLRemain(msg.sender,_wlAmountMax,_wlGroup,_merkleProof), "claim is over max amount"); require(_mintAmount + totalSupply() <= MAX_SUPPLY, "claim is over the max supply"); require(msg.value >= cost * _mintAmount, "not enough eth"); if(SBTwithMint == true){ if(sbtCollection.balanceOf(msg.sender) == 0){ sbtCollection.externalMint(msg.sender,1); } } _setWLmintedCount(msg.sender, _mintAmount); _safeMint(msg.sender, _mintAmount); } function burnMint(uint256[] memory _burnTokenIds,uint256 _wlAmountMax,uint256 _wlGroup,bytes32[] calldata _merkleProof) external payable{ require(phase == Phase.BurnMint,"sale is not active"); require(_wlGroup <= limitGroup,"not target group"); require(tx.origin == msg.sender,"the caller is another controler"); require(getWLExit(msg.sender,_wlAmountMax,_wlGroup,_merkleProof) == true,"You don't have a whitelist!"); require(_burnTokenIds.length > 0, "need to mint at least 1 NFT"); _resetBMCount(msg.sender); // Always check reset before getBMRemain require(_burnTokenIds.length <= getBMRemain(msg.sender,_wlAmountMax,_wlGroup,_merkleProof), "claim is over max amount"); require(_burnTokenIds.length + _totalBurned() <= maxBurnMint, "over total burn count"); require(msg.value >= cost * _burnTokenIds.length, "not enough eth"); _setBMmintedCount(msg.sender,_burnTokenIds.length); for (uint256 i = 0; i < _burnTokenIds.length; i++) { uint256 tokenId = _burnTokenIds[i]; require (msg.sender == ownerOf(tokenId)); _burn(tokenId); } _safeMint(msg.sender, _burnTokenIds.length); } // Stake Function external function setStartStake(uint256[] calldata _tokenIds) external{ require(msg.sender == stakeManage,"only specific control contract"); for(uint256 i = 0; i < _tokenIds.length;i++){ _setStartStake(_tokenIds[i]); } } function setEndStake(uint256[] calldata _tokenIds) external { require(msg.sender ==stakeManage,"only specific control contract"); for(uint256 i = 0; i < _tokenIds.length;i++){ _setEndStake(_tokenIds[i]); } } // get stake info (only view) function getStakeState(uint256 _tokenId)external view returns (bool){ require(_exists(_tokenId) == true,"not exists"); return _getStakeInfo(_tokenId); } function getStakeStateOfOwner(address _owner)external view returns (bool[] memory){ unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(_owner); bool[] memory tokenIdLocked = new bool[](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) { bool setval = false; if(_getStakeInfo(i) == true){ setval = true; } tokenIdLocked[tokenIdsIdx++] = setval; } } return tokenIdLocked; } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.7.0 <0.9.0; interface ITokenURI{ function tokenURI_future(uint256 _tokenId) external view returns(string memory); function tokenURI_future(uint256 _tokenId,bool _locked) external view returns(string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; interface IContractAllowListProxy { function isAllowed(address _transferer, uint256 _level) external view returns (bool); }
// SPDX-License-Identifier: MIT /* * Created by masataka.eth (@masataka_net) */ pragma solidity >=0.7.0 <0.9.0; interface ISBTwithMint { function externalMint(address _address , uint256 _amount ) external; function balanceOf(address _owner) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title UpdatableOperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the * OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address, * which will bypass registry checks. * Note that OpenSea will still disable creator fee enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract UpdatableOperatorFilterer { error OperatorNotAllowed(address operator); error OnlyOwner(); IOperatorFilterRegistry public operatorFilterRegistry; constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) { IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry); operatorFilterRegistry = registry; // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(registry).code.length > 0) { if (subscribe) { registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { registry.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be bypassed. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public virtual { if (msg.sender != owner()) { revert OnlyOwner(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); } /** * @dev assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract */ function owner() public view virtual returns (address); function _checkFilterOperator(address operator) internal view virtual { IOperatorFilterRegistry registry = operatorFilterRegistry; // Check registry code length to facilitate testing in environments without a deployed registry. if (address(registry) != address(0) && address(registry).code.length > 0) { if (!registry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {RevokableOperatorFilterer} from "./RevokableOperatorFilterer.sol"; /** * @title RevokableDefaultOperatorFilterer * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription. * Note that OpenSea will disable creator fee enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() RevokableOperatorFilterer(0x000000000000AAeB6D7670E522A718067333cd4E, DEFAULT_SUBSCRIPTION, true) {} }
// 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 // 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 (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 pragma solidity >=0.7.0 <0.9.0; library BitOpe { uint256 private constant BITSIZE_128 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; uint256 private constant BITPOS_128 = 128; uint256 private constant BITSIZE_64 = 0xFFFFFFFFFFFFFFFF; uint256 private constant BITPOS_64 = 64; uint256 private constant BITSIZE_32 = 0xFFFFFFFF; uint256 private constant BITPOS_32 = 32; uint256 private constant BITSIZE_16 = 0xFFFF; uint256 private constant BITPOS_16 = 16; uint256 private constant BITSIZE_8 = 0xFF; uint256 private constant BITPOS_8 = 8; uint64 private constant AUX_BITSIZE_32 = 0xFFFFFFFF; uint64 private constant AUX_BITPOS_32 = 32; uint64 private constant AUX_BITSIZE_16 = 0xFFFF; uint64 private constant AUX_BITPOS_16 = 16; uint64 private constant AUX_BITSIZE_8 = 0xFF; uint64 private constant AUX_BITPOS_8 = 8; function set128(uint256 _src, uint256 _index, uint256 _setValue) internal pure returns (uint256) { require(_index < 2); uint256 _maskdata = _src & ~(BITSIZE_128 << (_index * BITPOS_128)); uint256 _setdata = (_setValue & BITSIZE_128) << (_index * BITPOS_128); return (_maskdata | _setdata); } function get128(uint256 _src, uint256 _index) internal pure returns (uint256) { require(_index < 2); uint256 _getdata = _src & BITSIZE_128; if(_index > 0){ _getdata = _src >> BITPOS_128; } return _getdata; } function set64(uint256 _src, uint256 _index, uint256 _setValue) internal pure returns (uint256) { require(_index < 4); uint256 _maskdata = _src & ~(BITSIZE_64 << (BITPOS_64 * _index)); uint256 _setdata = (_setValue & BITSIZE_64) << (BITPOS_64 * _index); return (_maskdata | _setdata); } function get64(uint256 _src, uint256 _index) internal pure returns (uint256) { require(_index < 4); return (_src >> (BITPOS_64 * _index)) & BITSIZE_64; } function set32(uint256 _src, uint256 _index, uint256 _setValue) internal pure returns (uint256) { require(_index < 8); uint256 _maskdata = _src & ~(BITSIZE_32 << (BITPOS_32 * _index)); uint256 _setdata = (_setValue & BITSIZE_32) << (BITPOS_32 * _index); return (_maskdata | _setdata); } function get32(uint256 _src, uint256 _index) internal pure returns (uint256) { require(_index < 8); return (_src >> (BITPOS_32 * _index)) & BITSIZE_32; } function set16(uint256 _src, uint256 _index, uint256 _setValue) internal pure returns (uint256) { require(_index < 16); uint256 _maskdata = _src & ~(BITSIZE_16 << (BITPOS_16 * _index)); uint256 _setdata = (_setValue & BITSIZE_16) << (BITPOS_16 * _index); return (_maskdata | _setdata); } function get16(uint256 _src, uint256 _index) internal pure returns (uint256) { require(_index < 16); return (_src >> (BITPOS_16 * _index)) & BITSIZE_16; } function set8(uint256 _src, uint256 _index, uint256 _setValue) internal pure returns (uint256) { require(_index < 32); uint256 _maskdata = _src & ~(BITSIZE_8 << (BITPOS_8 * _index)); uint256 _setdata = (_setValue & BITSIZE_8) << (BITPOS_8 * _index); return (_maskdata | _setdata); } function get8(uint256 _src, uint256 _index) internal pure returns (uint256) { require(_index < 32); return (_src >> (BITPOS_8 * _index)) & BITSIZE_8; } // Aux(size uint64) function set32_forAux(uint64 _src,uint256 _index, uint64 _setValue) internal pure returns (uint64) { require(_index < 2); uint64 _maskdata = _src & (~AUX_BITSIZE_32); uint64 _setdata = _setValue & AUX_BITSIZE_32; if(_index > 0){ _maskdata = _src & AUX_BITSIZE_32; _setdata = _setdata << AUX_BITPOS_32; } return (_maskdata | _setdata); } function get32_forAux(uint64 _src, uint256 _index) internal pure returns (uint64) { require(_index < 2); uint64 _getdata = _src & AUX_BITSIZE_32; if(_index > 0){ _getdata = _src >> AUX_BITPOS_32; } return _getdata; } function set16_forAux(uint64 _src,uint256 _index, uint64 _setValue) internal pure returns (uint64) { require(_index < 4); uint64 _maskdata = _src & ~(AUX_BITSIZE_16 << (AUX_BITPOS_16 * uint64(_index))); uint64 _setdata = (_setValue & AUX_BITSIZE_16) << (AUX_BITPOS_16 * uint64(_index)); return (_maskdata | _setdata); } function get16_forAux(uint64 _src, uint256 _index) internal pure returns (uint64) { require(_index < 4); return (_src >> (AUX_BITPOS_16 * _index)) & AUX_BITSIZE_16; } function set8_forAux(uint64 _src, uint256 _index, uint64 _setValue) internal pure returns (uint64) { require(_index < 8); uint64 _maskdata = _src & ~(AUX_BITSIZE_8 << (AUX_BITPOS_8 * uint64(_index))); uint64 _setdata = (_setValue & AUX_BITSIZE_8) << (AUX_BITPOS_8 * uint64(_index)); return (_maskdata | _setdata); } function get8_forAux(uint64 _src, uint256 _index) internal pure returns (uint64) { require(_index < 8); return (_src >> (AUX_BITPOS_8 * _index)) & AUX_BITSIZE_8; } // uint256 index bit function set256bit(uint256 _src,uint256 _index, bool _setValue) internal pure returns (uint256) { require(_index < 256); if(_setValue == false){ _src &= ~(1 << _index); }else{ _src |= (1 << _index); } return _src; } function get256bit(uint256 _src,uint256 _index) internal pure returns(bool) { require(_index < 256); bool _ret = false; uint256 _bit = _src & (1 << _index); if(_bit > 0){ _ret = true; } return _ret; } // Options for advanced users function set_manual_forAux(uint64 _src,uint256 _startbit,uint256 _endbit,uint64 _setValue) internal pure returns (uint64) { require(_startbit < _endbit); require(_endbit <= 64); // 0 -64 uint64 _manualPos_64 = 0xFFFFFFFFFFFFFFFF; uint64 leftmask = _manualPos_64 >> (64 - _endbit); uint64 rightmask = _manualPos_64 << uint64(_startbit); _manualPos_64 = leftmask & rightmask; uint64 _maskdata = _src & (~_manualPos_64); uint64 _setdata = _setValue << uint64(_startbit); return (_maskdata | _setdata); } function get_manual_forAux(uint64 _src,uint256 _startbit,uint256 _endbit) internal pure returns (uint64) { require(_startbit < _endbit); require(_endbit <= 64); // 0 -64 uint64 _manualPos_64 = 0xFFFFFFFFFFFFFFFF; uint64 leftmask = _manualPos_64 >> (64 - _endbit); uint64 rightmask = _manualPos_64 << uint64(_startbit); _manualPos_64 = leftmask & rightmask; uint64 _getdata = (_src & _manualPos_64) >> _startbit; return _getdata; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {UpdatableOperatorFilterer} from "./UpdatableOperatorFilterer.sol"; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title RevokableOperatorFilterer * @notice This contract is meant to allow contracts to permanently skip OperatorFilterRegistry checks if desired. The * Registry itself has an "unregister" function, but if the contract is ownable, the owner can re-register at * any point. As implemented, this abstract contract allows the contract owner to permanently skip the * OperatorFilterRegistry checks by calling revokeOperatorFilterRegistry. Once done, the registry * address cannot be further updated. * Note that OpenSea will still disable creator fee enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer { error RegistryHasBeenRevoked(); error InitialRegistryAddressCannotBeZeroAddress(); bool public isOperatorFilterRegistryRevoked; constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) UpdatableOperatorFilterer(_registry, subscriptionOrRegistrantToCopy, subscribe) { // don't allow creating a contract with a permanently revoked registry if (_registry == address(0)) { revert InitialRegistryAddressCannotBeZeroAddress(); } } function _checkFilterOperator(address operator) internal view virtual override { if (address(operatorFilterRegistry) != address(0)) { super._checkFilterOperator(operator); } } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be permanently bypassed, and the address cannot be updated again. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public override { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); } /** * @notice Revoke the OperatorFilterRegistry address, permanently bypassing checks. OnlyOwner. */ function revokeOperatorFilterRegistry() public { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } // set to zero address to bypass checks operatorFilterRegistry = IOperatorFilterRegistry(address(0)); isOperatorFilterRegistryRevoked = 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 // 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; /** * @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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 (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 v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InitialRegistryAddressCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"RegistryHasBeenRevoked","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":"holder","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"EndStake","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":"holder","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"StartStake","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":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SBTwithMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_UserMintAmount","type":"uint256[]"}],"name":"admin_mint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI_lock","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bmcount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_burnTokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_wlAmountMax","type":"uint256"},{"internalType":"uint256","name":"_wlGroup","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"burnMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"cal","outputs":[{"internalType":"contract IContractAllowListProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_wlAmountMax","type":"uint256"},{"internalType":"uint256","name":"_wlGroup","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"getBMRemain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"_tokenId","type":"uint256"}],"name":"getStakeState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getStakeStateOfOwner","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_wlAmountMax","type":"uint256"},{"internalType":"uint256","name":"_wlGroup","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"getWLExit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_wlAmountMax","type":"uint256"},{"internalType":"uint256","name":"_wlGroup","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"getWLRemain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"incBMcount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"incWlcount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLockDisplay","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperatorFilterRegistryRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limitGroup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBurnMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256","name":"_wlAmountMax","type":"uint256"},{"internalType":"uint256","name":"_wlGroup","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilterRegistry","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"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":"phase","outputs":[{"internalType":"enum CNPPcore.Phase","name":"","type":"uint8"}],"stateMutability":"view","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":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revokeOperatorFilterRegistry","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":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFee","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"sbtCollection","outputs":[{"internalType":"contract ISBTwithMint","name":"","type":"address"}],"stateMutability":"view","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":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI_lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IContractAllowListProxy","name":"_cal","type":"address"}],"name":"setCalContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setCalLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"setEndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"setEndStake_admin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_lockDisplay","type":"bool"}],"name":"setIsLockDisplay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_locked","type":"bool"}],"name":"setIsLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimitGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMaxBurnMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum CNPPcore.Phase","name":"_newPhase","type":"uint8"}],"name":"setPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"setRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_SBTwithMint","type":"bool"}],"name":"setSBTwithMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setSbtCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakemanage","type":"address"}],"name":"setStakeManage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"setStartStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"setStartStake_admin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITokenURI","name":"_tokenuri","type":"address"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakeInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeManage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenuri","outputs":[{"internalType":"contract ITokenURI","name":"","type":"address"}],"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":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wlcount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6107d060045566038d7ea4c6800060065560c06040526005608081905264173539b7b760d91b60a0908152620000399160099190620008f4565b50600f80546001600160a81b03191674664d4e1e7e0deb51932985f0a727d4dfb09fb62100179055601080546103e86001600160601b031990911617905560016011553480156200008957600080fd5b506daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb660018282826040518060400160405280600f81526020016e434e50205068696c697070696e657360881b815250604051806040016040528060048152602001630434e50560e41b815250620001126200010c6200038b60201b60201c565b6200038f565b815162000127906018906020850190620008f4565b5080516200013d906019906020840190620008f4565b5060016016555050602080546001600160a01b0319166001600160a01b03851690811790915583903b156200027e578115620001dd57604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b600060405180830381600087803b158015620001be57600080fd5b505af1158015620001d3573d6000803e3d6000fd5b505050506200027e565b6001600160a01b03831615620002225760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af290390604401620001a3565b604051632210724360e11b81523060048201526001600160a01b03821690634420e48690602401600060405180830381600087803b1580156200026457600080fd5b505af115801562000279573d6000803e3d6000fd5b505050505b5050506001600160a01b0384169050620002ab5760405163c49d17ad60e01b815260040160405180910390fd5b50620002bd91506000905033620003df565b620002df73664d4e1e7e0deb51932985f0a727d4dfb09fb6216105a862000484565b6200030173ab5060422c66dda175a9931fcdf589e2a059d9fc6101f462000484565b6200032273083e6b4300a3e3c4e6d6e888e4ca158b3cb1812e603262000484565b62000343736a1ebf8f64aa793b4113e9d76864ea2264a5d482601962000484565b6200036473d63a3ed1b2a6776b031b56c6ba91c6feebacfa1f600f62000484565b6200038573e0ab5bcf3e41de3598d9f41b95c708a16fdf6383600f62000484565b62000ac8565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008281526015602090815260408083206001600160a01b038516845290915290205460ff16620004805760008281526015602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200043f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b62000480828260405180602001604052806000815250620004a660201b60201c565b620004b283836200051d565b6001600160a01b0383163b1562000518576016548281035b6001810190620004e09060009087908662000616565b620004fe576040516368d2bf6b60e11b815260040160405180910390fd5b818110620004ca5781601654146200051557600080fd5b50505b505050565b6016546000829003620005435760405163b562e8dd60e01b815260040160405180910390fd5b6200055260008483856200070b565b6001600160a01b0383166000818152601b602090815260408083208054680100000000000000018802019055848352601a90915281206001851460e11b4260a01b1783179055828401908390839060008051602062005be08339815191528180a4600183015b818114620005e1578083600060008051602062005be0833981519152600080a4600101620005b8565b50816000036200060357604051622e076360e81b815260040160405180910390fd5b6016555062000518600084838562000794565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200064d9033908990889088906004016200099a565b6020604051808303816000875af19250505080156200068b575060408051601f3d908101601f19168201909252620006889181019062000a15565b60015b620006ed573d808015620006bc576040519150601f19603f3d011682016040523d82523d6000602084013e620006c1565b606091505b508051600003620006e5576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60125460ff16151560011480156200072b57506001600160a01b03841615155b156200078e576200073c82620007cc565b156200078e5760405162461bcd60e51b815260206004820152601660248201527f7468697320746f6b656e4964206973206c6f636b656400000000000000000000604482015260640160405180910390fd5b50505050565b6001600160a01b03841615801590620007b95750620007b382620007cc565b15156001145b156200078e576200078e8260006200081e565b600080620007dd6101008462000a5e565b90506000620007ef6101008562000a75565b9050620007038160136000858152602001908152602001600020546200088960201b62002e7f1790919060201c565b60006200082e6101008462000a5e565b90506000620008406101008562000a75565b90506200087181846013600086815260200190815260200160002054620008b660201b62002eaa179092919060201c565b60009283526013602052604090922091909155505050565b600061010082106200089a57600080fd5b60006001831b84168015620008ae57600191505b509392505050565b60006101008310620008c757600080fd5b811515600003620008e257826001901b1984169350620008ec565b826001901b841793505b509192915050565b828054620009029062000a8c565b90600052602060002090601f01602090048101928262000926576000855562000971565b82601f106200094157805160ff191683800117855562000971565b8280016001018555821562000971579182015b828111156200097157825182559160200191906001019062000954565b506200097f92915062000983565b5090565b5b808211156200097f576000815560010162000984565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620009e95785810182015185820160a001528101620009cb565b82811115620009fc57600060a084870101525b5050601f01601f19169190910160a00195945050505050565b60006020828403121562000a2857600080fd5b81516001600160e01b03198116811462000a4157600080fd5b9392505050565b634e487b7160e01b600052601260045260246000fd5b60008262000a705762000a7062000a48565b500490565b60008262000a875762000a8762000a48565b500690565b600181811c9082168062000aa157607f821691505b60208210810362000ac257634e487b7160e01b600052602260045260246000fd5b50919050565b6151088062000ad86000396000f3fe6080604052600436106105025760003560e01c8063860bc37f11610297578063c0ca39ae11610165578063e0a80853116100cc578063f36922cd11610085578063f36922cd14610fe9578063f58f9c6614611009578063f77322fa14611029578063fac81a5314611056578063fe9ba2fb1461106b578063febd1b121461108b57600080fd5b8063e0a8085314610f09578063e7a4bd1514610f29578063e985e9c514610f3f578063ecba222a14610f88578063f2c4ce1e14610fa9578063f2fde38b14610fc957600080fd5b8063ca40c7ae1161011e578063ca40c7ae14610e54578063cc835a8814610e74578063d4d2609a14610e8a578063d547741f14610eaa578063da3ef23f14610eca578063dda475e314610eea57600080fd5b8063c0ca39ae14610d9c578063c23dc68f14610dbc578063c668286214610de9578063c79668a814610dfe578063c87b56dd14610e1e578063ca2b435414610e3e57600080fd5b8063b0ccc31e11610209578063b88d4fde116101c2578063b88d4fde14610cd1578063b8997a9714610cf1578063b8d1e53214610d29578063c0035b2a14610d49578063c03afb5914610d5c578063c0c2e0a314610d7c57600080fd5b8063b0ccc31e14610c20578063b1c9fe6e14610c40578063b3a0663014610c67578063b414a56f14610c87578063b55cd04b14610c9c578063b7c738f414610cb157600080fd5b806399a2557a1161025b57806399a2557a14610b6c578063a210c80414610b8c578063a217fddf14610bac578063a22cb46514610bc1578063a4e2d63414610be1578063ad2f852a14610bfb57600080fd5b8063860bc37f14610ad95780638c8fae4014610af95780638da5cb5b14610b1957806391d1485414610b3757806395d89b4114610b5757600080fd5b80633ccfd60b116103d45780635bbb2177116103465780636c0360eb116102ff5780636c0360eb14610a225780636db69a9114610a3757806370a0823114610a57578063715018a614610a775780637cb6475914610a8c5780638462151c14610aac57600080fd5b80635bbb2177146109755780635ef9432a146109a257806360ac9819146109b75780636352211e146109cc578063682a3ad6146109ec5780636a98de4c14610a0257600080fd5b80634ac1415b116103985780634ac1415b146108bc5780634d1a264f146108d65780634e533572146108e9578063518302271461091657806355cda8981461093057806355f804b31461095557600080fd5b80633ccfd60b14610827578063426a2c541461083c57806342842e0e1461085c57806344a0d68a1461087c57806344ad71061461089c57600080fd5b806323b872dd1161047857806332cb6b0c1161043157806332cb6b0c1461077b578063357844f11461079157806336568abe146107b157806337b562ea146107d157806338bd2961146107e757806339940b4a1461080757600080fd5b806323b872dd14610696578063248a9ca3146106b65780632a55205a146106e65780632eb4a7ab146107255780632f2ff15d1461073b57806331faafb41461075b57600080fd5b80630829eebb116104ca5780630829eebb146105cd578063095ea7b3146105ed5780630dbc2ce01461060d578063122e04a81461062d57806313faede61461065557806318160ddd1461067957600080fd5b806301ffc9a71461050757806306d254da1461053c57806306fdde031461055e578063081812fc14610580578063081c8c44146105b8575b600080fd5b34801561051357600080fd5b50610527610522366004614487565b6110ab565b60405190151581526020015b60405180910390f35b34801561054857600080fd5b5061055c6105573660046144b9565b61110c565b005b34801561056a57600080fd5b5061057361115d565b604051610533919061452e565b34801561058c57600080fd5b506105a061059b366004614541565b6111ef565b6040516001600160a01b039091168152602001610533565b3480156105c457600080fd5b50610573611233565b3480156105d957600080fd5b506105276105e8366004614541565b6112c1565b3480156105f957600080fd5b5061055c61060836600461455a565b6112ff565b34801561061957600080fd5b5061055c610628366004614631565b611442565b34801561063957600080fd5b506105a073664d4e1e7e0deb51932985f0a727d4dfb09fb62181565b34801561066157600080fd5b5061066b60065481565b604051908152602001610533565b34801561068557600080fd5b50601754601654036000190161066b565b3480156106a257600080fd5b5061055c6106b1366004614679565b611463565b3480156106c257600080fd5b5061066b6106d1366004614541565b60009081526015602052604090206001015490565b3480156106f257600080fd5b506107066107013660046146ba565b61148e565b604080516001600160a01b039093168352602083019190915201610533565b34801561073157600080fd5b5061066b600c5481565b34801561074757600080fd5b5061055c6107563660046146dc565b61153c565b34801561076757600080fd5b5061055c61077636600461470c565b611561565b34801561078757600080fd5b5061066b611dd981565b34801561079d57600080fd5b506105276107ac366004614779565b6115aa565b3480156107bd57600080fd5b5061055c6107cc3660046146dc565b61161d565b3480156107dd57600080fd5b5061066b600d5481565b3480156107f357600080fd5b5061055c6108023660046147f0565b611697565b34801561081357600080fd5b5061055c610822366004614541565b6116bb565b34801561083357600080fd5b5061055c6116ca565b34801561084857600080fd5b5061055c61085736600461480d565b61173d565b34801561086857600080fd5b5061055c610877366004614679565b611785565b34801561088857600080fd5b5061055c610897366004614541565b6117aa565b3480156108a857600080fd5b5061055c6108b736600461480d565b6117b9565b3480156108c857600080fd5b506014546105279060ff1681565b61055c6108e43660046148cd565b611851565b3480156108f557600080fd5b5061066b610904366004614541565b60136020526000908152604090205481565b34801561092257600080fd5b50600a546105279060ff1681565b34801561093c57600080fd5b506014546105a09061010090046001600160a01b031681565b34801561096157600080fd5b5061055c610970366004614631565b611b51565b34801561098157600080fd5b5061099561099036600461480d565b611b6e565b6040516105339190614975565b3480156109ae57600080fd5b5061055c611c20565b3480156109c357600080fd5b50610573611c8e565b3480156109d857600080fd5b506105a06109e7366004614541565b611c9b565b3480156109f857600080fd5b5061066b60045481565b348015610a0e57600080fd5b506001546105a0906001600160a01b031681565b348015610a2e57600080fd5b50610573611ca6565b348015610a4357600080fd5b5061055c610a5236600461480d565b611cb3565b348015610a6357600080fd5b5061066b610a723660046144b9565b611cef565b348015610a8357600080fd5b5061055c611d3d565b348015610a9857600080fd5b5061055c610aa7366004614541565b611d51565b348015610ab857600080fd5b50610acc610ac73660046144b9565b611d60565b60405161053391906149b7565b348015610ae557600080fd5b5061055c610af4366004614541565b611e46565b348015610b0557600080fd5b5061055c610b143660046147f0565b611e55565b348015610b2557600080fd5b506000546001600160a01b03166105a0565b348015610b4357600080fd5b50610527610b523660046146dc565b611e77565b348015610b6357600080fd5b50610573611ea2565b348015610b7857600080fd5b50610acc610b873660046149ef565b611eb1565b348015610b9857600080fd5b5061055c610ba7366004614541565b612038565b348015610bb857600080fd5b5061066b600081565b348015610bcd57600080fd5b5061055c610bdc366004614a24565b612047565b348015610bed57600080fd5b506012546105279060ff1681565b348015610c0757600080fd5b50600f546105a09061010090046001600160a01b031681565b348015610c2c57600080fd5b506020546105a0906001600160a01b031681565b348015610c4c57600080fd5b50600f54610c5a9060ff1681565b6040516105339190614a68565b348015610c7357600080fd5b5061055c610c82366004614a90565b612127565b348015610c9357600080fd5b5061055c6122ad565b348015610ca857600080fd5b5061066b612336565b348015610cbd57600080fd5b506002546105a0906001600160a01b031681565b348015610cdd57600080fd5b5061055c610cec366004614af8565b612341565b348015610cfd57600080fd5b50601054610d11906001600160601b031681565b6040516001600160601b039091168152602001610533565b348015610d3557600080fd5b5061055c610d443660046144b9565b612367565b61055c610d57366004614b77565b6123df565b348015610d6857600080fd5b5061055c610d77366004614bba565b612765565b348015610d8857600080fd5b5061055c610d973660046144b9565b612796565b348015610da857600080fd5b5061066b610db7366004614779565b6127c2565b348015610dc857600080fd5b50610ddc610dd7366004614541565b61285d565b6040516105339190614bdb565b348015610df557600080fd5b506105736128ad565b348015610e0a57600080fd5b5061066b610e19366004614779565b6128ba565b348015610e2a57600080fd5b50610573610e39366004614541565b612926565b348015610e4a57600080fd5b5061066b600e5481565b348015610e6057600080fd5b5061055c610e6f3660046147f0565b612ada565b348015610e8057600080fd5b5061066b60115481565b348015610e9657600080fd5b5061055c610ea53660046144b9565b612af7565b348015610eb657600080fd5b5061055c610ec53660046146dc565b612b23565b348015610ed657600080fd5b5061055c610ee5366004614631565b612b48565b348015610ef657600080fd5b5060125461052790610100900460ff1681565b348015610f1557600080fd5b5061055c610f243660046147f0565b612b65565b348015610f3557600080fd5b5061066b60055481565b348015610f4b57600080fd5b50610527610f5a366004614be9565b6001600160a01b039182166000908152601d6020908152604080832093909416825291909152205460ff1690565b348015610f9457600080fd5b5060205461052790600160a01b900460ff1681565b348015610fb557600080fd5b5061055c610fc4366004614631565b612b82565b348015610fd557600080fd5b5061055c610fe43660046144b9565b612b9f565b348015610ff557600080fd5b506003546105a0906001600160a01b031681565b34801561101557600080fd5b5061055c6110243660046144b9565b612c15565b34801561103557600080fd5b506110496110443660046144b9565b612c47565b6040516105339190614c17565b34801561106257600080fd5b5061055c612d3e565b34801561107757600080fd5b5061055c6110863660046144b9565b612dc7565b34801561109757600080fd5b5061055c6110a636600461480d565b612df3565b60006001600160e01b03198216637965db0b60e01b14806110dc57506001600160e01b0319821663184371e560e31b145b806110f757506001600160e01b03198216632baae9fd60e01b145b80611106575061110682612ee5565b92915050565b6111166000612f0a565b600f8054610100600160a81b0319166101006001600160a01b038481168202929092179283905560105461115a9391909104909116906001600160601b0316612f14565b50565b60606018805461116c90614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461119890614c51565b80156111e55780601f106111ba576101008083540402835291602001916111e5565b820191906000526020600020905b8154815290600101906020018083116111c857829003601f168201915b5050505050905090565b60006111fa82613011565b611217576040516333d1c03960e21b815260040160405180910390fd5b506000908152601c60205260409020546001600160a01b031690565b600b805461124090614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461126c90614c51565b80156112b95780601f1061128e576101008083540402835291602001916112b9565b820191906000526020600020905b81548152906001019060200180831161129c57829003601f168201915b505050505081565b60006112cc82613011565b15156001146112f65760405162461bcd60e51b81526004016112ed90614c8b565b60405180910390fd5b61110682613046565b8161130981613089565b6002546001600160a01b0316156113d557600254601154604051630f8350ed60e41b81526001600160a01b038681166004830152602482019290925291169063f8350ed090604401602060405180830381865afa15801561136e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113929190614caf565b15156001146113d55760405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b60448201526064016112ed565b60125460ff161515600103611433576113ed82613046565b156114335760405162461bcd60e51b81526020600482015260166024820152751d1a1a5cc81d1bdad95b9259081a5cc81b1bd8dad95960521b60448201526064016112ed565b61143d83836130a3565b505050565b61144c6000612f0a565b805161145f9060089060208401906143b1565b5050565b826001600160a01b038116331461147d5761147d33613089565b611488848484613143565b50505050565b6000828152601f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291611503575060408051808201909152601e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611522906001600160601b031687614ce2565b61152c9190614d17565b91519350909150505b9250929050565b60008281526015602052604090206001015461155781612f0a565b61143d83836132ed565b61156b6000612f0a565b601080546bffffffffffffffffffffffff19166001600160601b038316908117909155600f5461115a916101009091046001600160a01b031690612f14565b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260548101849052600090819081906074016040516020818303038152906040528051906020012090506116048585600c5484613373565b151560010361161257600191505b509695505050505050565b6001600160a01b038116331461168d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016112ed565b61145f828261338b565b6116a16000612f0a565b601280549115156101000261ff0019909216919091179055565b6116c56000612f0a565b601155565b6116d46000612f0a565b60405160009073664d4e1e7e0deb51932985f0a727d4dfb09fb6219047908381818185875af1925050503d806000811461172a576040519150601f19603f3d011682016040523d82523d6000602084013e61172f565b606091505b505090508061115a57600080fd5b6117476000612f0a565b60005b8181101561143d5761177383838381811061176757611767614d2b565b905060200201356133f2565b8061177d81614d41565b91505061174a565b826001600160a01b038116331461179f5761179f33613089565b6114888484846134bd565b6117b46000612f0a565b600655565b6003546001600160a01b031633146118135760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920737065636966696320636f6e74726f6c20636f6e7472616374000060448201526064016112ed565b60005b8181101561143d5761183f83838381811061183357611833614d2b565b905060200201356134d8565b8061184981614d41565b915050611816565b6002600f5460ff16600281111561186a5761186a614a52565b146118ac5760405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b60448201526064016112ed565b6005548311156118f15760405162461bcd60e51b815260206004820152601060248201526f06e6f74207461726765742067726f75760841b60448201526064016112ed565b3233146119405760405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c65720060448201526064016112ed565b61194d33858585856115aa565b151560011461199e5760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520612077686974656c69737421000000000060448201526064016112ed565b60008551116119bf5760405162461bcd60e51b81526004016112ed90614d5a565b6119c833613598565b6119d533858585856127c2565b85511115611a205760405162461bcd60e51b815260206004820152601860248201527718db185a5b481a5cc81bdd995c881b585e08185b5bdd5b9d60421b60448201526064016112ed565b6004546017548651611a329190614d91565b1115611a785760405162461bcd60e51b81526020600482015260156024820152741bdd995c881d1bdd185b08189d5c9b8818dbdd5b9d605a1b60448201526064016112ed565b8451600654611a879190614ce2565b341015611ac75760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064016112ed565b611ad233865161363a565b60005b8551811015611b3e576000868281518110611af257611af2614d2b565b60200260200101519050611b0581611c9b565b6001600160a01b0316336001600160a01b031614611b2257600080fd5b611b2b8161364e565b5080611b3681614d41565b915050611ad5565b50611b4a338651613659565b5050505050565b611b5b6000612f0a565b805161145f9060079060208401906143b1565b6060816000816001600160401b03811115611b8b57611b8b614586565b604051908082528060200260200182016040528015611bc457816020015b611bb1614435565b815260200190600190039081611ba95790505b50905060005b828114611c1757611bf2868683818110611be657611be6614d2b565b9050602002013561285d565b828281518110611c0457611c04614d2b565b6020908102919091010152600101611bca565b50949350505050565b6000546001600160a01b03163314611c4b57604051635fc483c560e01b815260040160405180910390fd5b602054600160a01b900460ff1615611c7657604051631551a48f60e11b815260040160405180910390fd5b602080546001600160a81b031916600160a01b179055565b6008805461124090614c51565b600061110682613673565b6007805461124090614c51565b611cbd6000612f0a565b60005b8181101561143d57611cdd83838381811061183357611833614d2b565b80611ce781614d41565b915050611cc0565b60006001600160a01b038216611d18576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601b60205260409020546001600160401b031690565b611d456136e2565b611d4f600061373c565b565b611d5b6000612f0a565b600c55565b60606000806000611d7085611cef565b90506000816001600160401b03811115611d8c57611d8c614586565b604051908082528060200260200182016040528015611db5578160200160208202803683370190505b509050611dc0614435565b60015b838614611e3a57611dd38161378c565b91508160400151611e325781516001600160a01b031615611df357815194505b876001600160a01b0316856001600160a01b031603611e325780838780600101985081518110611e2557611e25614d2b565b6020026020010181815250505b600101611dc3565b50909695505050505050565b611e506000612f0a565b600555565b611e5f6000612f0a565b6012805460ff1916911515919091179055565b905090565b60009182526015602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606019805461116c90614c51565b6060818310611ed357604051631960ccad60e11b815260040160405180910390fd5b600080611edf60165490565b90506001851015611eef57600194505b80841115611efb578093505b6000611f0687611cef565b905084861015611f255785850381811015611f1f578091505b50611f29565b5060005b6000816001600160401b03811115611f4357611f43614586565b604051908082528060200260200182016040528015611f6c578160200160208202803683370190505b50905081600003611f8257935061203192505050565b6000611f8d8861285d565b905060008160400151611f9e575080515b885b888114158015611fb05750848714155b1561202557611fbe8161378c565b9250826040015161201d5782516001600160a01b031615611fde57825191505b8a6001600160a01b0316826001600160a01b03160361201d578084888060010199508151811061201057612010614d2b565b6020026020010181815250505b600101611fa0565b50505092835250909150505b9392505050565b6120426000612f0a565b600455565b8161205181613089565b6002546001600160a01b03161561211d57600254601154604051630f8350ed60e41b81526001600160a01b038681166004830152602482019290925291169063f8350ed090604401602060405180830381865afa1580156120b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120da9190614caf565b151560011461211d5760405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b60448201526064016112ed565b61143d83836137ac565b6121316000612f0a565b6000805b82518110156121775782818151811061215057612150614d2b565b6020026020010151826121639190614d91565b91508061216f81614d41565b915050612135565b50600081116121985760405162461bcd60e51b81526004016112ed90614d5a565b601754601654611dd9919003600019016121b29083614d91565b11156122005760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c790000000060448201526064016112ed565b815183146122465760405162461bcd60e51b81526020600482015260136024820152720c2e4e4c2f240d8cadccee8d040eadcdaeac6d606b1b60448201526064016112ed565b60005b8251811015611b4a5761229b85858381811061226757612267614d2b565b905060200201602081019061227c91906144b9565b84838151811061228e5761228e614d2b565b6020026020010151613659565b806122a581614d41565b915050612249565b6122b76000612f0a565b6000600f5460ff1660028111156122d0576122d0614a52565b146122ed5760405162461bcd60e51b81526004016112ed90614da9565b61ffff600d541061232b5760405162461bcd60e51b81526020600482015260086024820152671b9bc815985b1a5960c21b60448201526064016112ed565b600d80546001019055565b6000611e7260175490565b836001600160a01b038116331461235b5761235b33613089565b611b4a85858585613841565b6000546001600160a01b0316331461239257604051635fc483c560e01b815260040160405180910390fd5b602054600160a01b900460ff16156123bd57604051631551a48f60e11b815260040160405180910390fd5b602080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600f5460ff1660028111156123f8576123f8614a52565b1461243a5760405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b60448201526064016112ed565b60055483111561247f5760405162461bcd60e51b815260206004820152601060248201526f06e6f74207461726765742067726f75760841b60448201526064016112ed565b3233146124ce5760405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c65720060448201526064016112ed565b6124db33858585856115aa565b151560011461252c5760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520612077686974656c69737421000000000060448201526064016112ed565b6000851161254c5760405162461bcd60e51b81526004016112ed90614d5a565b61255533613885565b61256233858585856128ba565b8511156125ac5760405162461bcd60e51b815260206004820152601860248201527718db185a5b481a5cc81bdd995c881b585e08185b5bdd5b9d60421b60448201526064016112ed565b601754601654611dd9919003600019016125c69087614d91565b11156126145760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c790000000060448201526064016112ed565b846006546126229190614ce2565b3410156126625760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064016112ed565b60145460ff161515600103612751576014546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa1580156126bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e19190614deb565b6000036127515760145460405163133f311360e31b8152336004820152600160248201526101009091046001600160a01b0316906399f9889890604401600060405180830381600087803b15801561273857600080fd5b505af115801561274c573d6000803e3d6000fd5b505050505b61275b33866138e5565b611b4a3386613659565b61276f6000612f0a565b600f805482919060ff1916600183600281111561278e5761278e614a52565b021790555050565b6127a06000612f0a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806002600f5460ff1660028111156127de576127de614a52565b03612853576127f087878787876115aa565b151560010361285357600e54612819600261280a8a6138f9565b6001600160401b031690613917565b6001600160401b0316101561282f575084612853565b61283d600361280a896138f9565b612850906001600160401b031687614e04565b90505b9695505050505050565b612865614435565b61286d614435565b600183108061287e57506016548310155b156128895792915050565b6128928361378c565b90508060400151156128a45792915050565b61203183613949565b6009805461124090614c51565b6000806001600f5460ff1660028111156128d6576128d6614a52565b03612853576128e887878787876115aa565b151560010361285357600d54612902600061280a8a6138f9565b6001600160401b03161015612918575084612853565b61283d600161280a896138f9565b600a5460609060ff1615156000036129ca57600b805461294590614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461297190614c51565b80156129be5780601f10612993576101008083540402835291602001916129be565b820191906000526020600020905b8154815290600101906020018083116129a157829003601f168201915b50505050509050919050565b6001546001600160a01b0316612a545760125460ff61010090910416151560011480156129fe575060125460ff1615156001145b8015612a145750612a0e82613046565b15156001145b15612a4b57612a2282613962565b6009604051602001612a35929190614eb4565b6040516020818303038152906040529050919050565b612a22826139d1565b6001546001600160a01b031663338c3fc483612a6f81613046565b6040516001600160e01b031960e085901b168152600481019290925215156024820152604401600060405180830381865afa158015612ab2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111069190810190614edb565b612ae46000612f0a565b6014805460ff1916911515919091179055565b612b016000612f0a565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260156020526040902060010154612b3e81612f0a565b61143d838361338b565b612b526000612f0a565b805161145f9060099060208401906143b1565b612b6f6000612f0a565b600a805460ff1916911515919091179055565b612b8c6000612f0a565b805161145f90600b9060208401906143b1565b612ba76136e2565b6001600160a01b038116612c0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016112ed565b61115a8161373c565b612c1f6000612f0a565b601480546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60606000806000612c5785611cef565b90506000816001600160401b03811115612c7357612c73614586565b604051908082528060200260200182016040528015612c9c578160200160208202803683370190505b509050612ca7614435565b60015b838614611e3a57612cba8161378c565b91508160400151612d365781516001600160a01b031615612cda57815194505b876001600160a01b0316856001600160a01b031603612d36576000612cfe82613046565b1515600103612d0b575060015b80848880600101995081518110612d2457612d24614d2b565b91151560209283029190910190910152505b600101612caa565b612d486000612f0a565b6000600f5460ff166002811115612d6157612d61614a52565b14612d7e5760405162461bcd60e51b81526004016112ed90614da9565b61ffff600e5410612dbc5760405162461bcd60e51b81526020600482015260086024820152671b9bc815985b1a5960c21b60448201526064016112ed565b600e80546001019055565b612dd16000612f0a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314612e4d5760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920737065636966696320636f6e74726f6c20636f6e7472616374000060448201526064016112ed565b60005b8181101561143d57612e6d83838381811061176757611767614d2b565b80612e7781614d41565b915050612e50565b60006101008210612e8f57600080fd5b60006001831b84168015612ea257600191505b509392505050565b60006101008310612eba57600080fd5b811515600003612ed357826001901b1984169350612edd565b826001901b841793505b509192915050565b60006001600160e01b0319821663152a902d60e11b1480611106575061110682613a54565b61115a8133613aa2565b6127106001600160601b0382161115612f825760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016112ed565b6001600160a01b038216612fd85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016112ed565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601e55565b600081600111158015613025575060165482105b80156111065750506000908152601a6020526040902054600160e01b161590565b60008061305561010084614d17565b9050600061306561010085614f48565b6000838152601360205260409020549091506130819082612e7f565b949350505050565b6020546001600160a01b03161561115a5761115a81613b06565b60006130ae82611c9b565b9050336001600160a01b038216146130e7576130ca8133610f5a565b6130e7576040516367d9dca160e11b815260040160405180910390fd5b6000828152601c602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061314e82613673565b9050836001600160a01b0316816001600160a01b0316146131815760405162a1148160e81b815260040160405180910390fd5b6000828152601c6020526040902080546131ad8187335b6001600160a01b039081169116811491141790565b6131d8576131bb8633610f5a565b6131d857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166131ff57604051633a954ecd60e21b815260040160405180910390fd5b61320c8686866001613bc8565b801561321757600082555b6001600160a01b038681166000908152601b60205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152601a6020526040812091909155600160e11b841690036132a957600184016000818152601a602052604081205490036132a75760165481146132a7576000818152601a602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206150b383398151915260405160405180910390a46132e58686866001613c3b565b505050505050565b6132f78282611e77565b61145f5760008281526015602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561332f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082613381868685613c6d565b1495945050505050565b6133958282611e77565b1561145f5760008281526015602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6133fb81613011565b151560011461341c5760405162461bcd60e51b81526004016112ed90614c8b565b61342581613046565b15156001146134635760405162461bcd60e51b815260206004820152600a602482015269139bdd081cdd185ad95960b21b60448201526064016112ed565b61346e816000613cb0565b8061347882611c9b565b6001600160a01b03167f9189d183a350917f72dfcc613565f69dc58b49f760a6bebfc1fd1181ffe0be01426040516134b291815260200190565b60405180910390a350565b61143d83838360405180602001604052806000815250612341565b6134e181613011565b15156001146135025760405162461bcd60e51b81526004016112ed90614c8b565b61350b81613046565b156135495760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481cdd185ad95960921b60448201526064016112ed565b613554816001613cb0565b8061355e82611c9b565b6001600160a01b03167fabac8d0f19908587ad342f25ebeb82910468501232b3b1c97074ded4e5369605426040516134b291815260200190565b60006135a3826138f9565b600e549091506135bd6001600160401b0383166002613917565b6001600160401b0316101561145f5761145f82613608600360006135f86002600e54886001600160401b0316613d039092919063ffffffff16565b6001600160401b03169190613d03565b6001600160a01b039091166000908152601b6020526040902080546001600160c01b031660c09290921b919091179055565b61145f828261364885613d61565b01613d7a565b61115a816000613d96565b61145f828260405180602001604052806000815250613eeb565b600081806001116136c9576016548110156136c9576000818152601a602052604081205490600160e01b821690036136c7575b806000036120315750600019016000818152601a60205260409020546136a6565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b03163314611d4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112ed565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613794614435565b6000828152601a602052604090205461110690613f51565b336001600160a01b038316036137d55760405163b06307db60e01b815260040160405180910390fd5b336000818152601d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61384c848484611463565b6001600160a01b0383163b156114885761386884848484613f94565b611488576040516368d2bf6b60e11b815260040160405180910390fd5b6000613890826138f9565b600d549091506138aa6001600160401b0383166000613917565b6001600160401b0316101561145f5761145f82613608600160006135f86000600d54886001600160401b0316613d039092919063ffffffff16565b61145f82826138f38561407c565b01614095565b6001600160a01b03166000908152601b602052604090205460c01c90565b60006004821061392657600080fd5b61ffff613934836010614ce2565b846001600160401b0316901c16905092915050565b613951614435565b61110661395d83613673565b613f51565b606061396d82613011565b61398a57604051630a14c4b560e41b815260040160405180910390fd5b6008805461399790614c51565b90506000036139b55760405180602001604052806000815250611106565b60086139c0836140b1565b604051602001612a35929190614f5c565b60606139dc82613011565b6139f957604051630a14c4b560e41b815260040160405180910390fd5b6000613a036140e9565b90508051600003613a235760405180602001604052806000815250612031565b80613a2d846140b1565b604051602001613a3e929190614f81565b6040516020818303038152906040529392505050565b60006301ffc9a760e01b6001600160e01b031983161480613a8557506380ac58cd60e01b6001600160e01b03198316145b806111065750506001600160e01b031916635b5e139f60e01b1490565b613aac8282611e77565b61145f57613ac4816001600160a01b031660146140f8565b613acf8360206140f8565b604051602001613ae0929190614fa7565b60408051601f198184030181529082905262461bcd60e51b82526112ed9160040161452e565b6020546001600160a01b03168015801590613b2b57506000816001600160a01b03163b115b1561145f57604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015613b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba09190614caf565b61145f57604051633b79c77360e21b81526001600160a01b03831660048201526024016112ed565b60125460ff1615156001148015613be757506001600160a01b03841615155b1561148857613bf582613046565b156114885760405162461bcd60e51b81526020600482015260166024820152751d1a1a5cc81d1bdad95b9259081a5cc81b1bd8dad95960521b60448201526064016112ed565b6001600160a01b03841615801590613c5d5750613c5782613046565b15156001145b1561148857611488826000613cb0565b600081815b84811015611c1757613c9c82878784818110613c9057613c90614d2b565b90506020020135614293565b915080613ca881614d41565b915050613c72565b6000613cbe61010084614d17565b90506000613cce61010085614f48565b600083815260136020526040902054909150613ceb908285612eaa565b60009283526013602052604090922091909155505050565b600060048310613d1257600080fd5b6000613d1f84601061501c565b61ffff6001600160401b03919091161b19851690506000613d4185601061501c565b61ffff85166001600160401b03919091161b919091179150509392505050565b6000613d6c82613598565b611106600361280a846138f9565b613d8382613598565b61145f826136086003846135f8876138f9565b6000613da183613673565b905080600080613dbf866000908152601c6020526040902080549091565b915091508415613dff57613dd4818433613198565b613dff57613de28333610f5a565b613dff57604051632ce44b5f60e11b815260040160405180910390fd5b613e0d836000886001613bc8565b8015613e1857600082555b6001600160a01b0383166000818152601b6020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152601a6020526040812091909155600160e11b85169003613ea657600186016000818152601a60205260408120549003613ea4576016548114613ea4576000818152601a602052604090208590555b505b60405186906000906001600160a01b038616906000805160206150b3833981519152908390a4613eda836000886001613c3b565b505060178054600101905550505050565b613ef583836142c2565b6001600160a01b0383163b1561143d576016548281035b613f1f6000868380600101945086613f94565b613f3c576040516368d2bf6b60e11b815260040160405180910390fd5b818110613f0c578160165414611b4a57600080fd5b613f59614435565b6001600160a01b03821681526001600160401b0360a083901c166020820152600160e01b82161515604082015260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613fc990339089908890889060040161504b565b6020604051808303816000875af1925050508015614004575060408051601f3d908101601f191682019092526140019181019061507e565b60015b614062573d808015614032576040519150601f19603f3d011682016040523d82523d6000602084013e614037565b606091505b50805160000361405a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613081565b600061408782613885565b611106600161280a846138f9565b61409e82613885565b61145f826136086001846135f8876138f9565b604080516080019081905280825b600183039250600a81066030018353600a9004806140bf5750819003601f19909101908152919050565b60606007805461116c90614c51565b60606000614107836002614ce2565b614112906002614d91565b6001600160401b0381111561412957614129614586565b6040519080825280601f01601f191660200182016040528015614153576020820181803683370190505b509050600360fc1b8160008151811061416e5761416e614d2b565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061419d5761419d614d2b565b60200101906001600160f81b031916908160001a90535060006141c1846002614ce2565b6141cc906001614d91565b90505b6001811115614244576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061420057614200614d2b565b1a60f81b82828151811061421657614216614d2b565b60200101906001600160f81b031916908160001a90535060049490941c9361423d8161509b565b90506141cf565b5083156120315760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016112ed565b60008183106142af576000828152602084905260409020612031565b6000838152602083905260409020612031565b60165460008290036142e75760405163b562e8dd60e01b815260040160405180910390fd5b6142f46000848385613bc8565b6001600160a01b0383166000818152601b602090815260408083208054680100000000000000018802019055848352601a90915281206001851460e11b4260a01b178317905582840190839083906000805160206150b38339815191528180a4600183015b81811461437f57808360006000805160206150b3833981519152600080a4600101614359565b50816000036143a057604051622e076360e81b815260040160405180910390fd5b6016555061143d6000848385613c3b565b8280546143bd90614c51565b90600052602060002090601f0160209004810192826143df5760008555614425565b82601f106143f857805160ff1916838001178555614425565b82800160010185558215614425579182015b8281111561442557825182559160200191906001019061440a565b5061443192915061445c565b5090565b60408051608081018252600080825260208201819052918101829052606081019190915290565b5b80821115614431576000815560010161445d565b6001600160e01b03198116811461115a57600080fd5b60006020828403121561449957600080fd5b813561203181614471565b6001600160a01b038116811461115a57600080fd5b6000602082840312156144cb57600080fd5b8135612031816144a4565b60005b838110156144f15781810151838201526020016144d9565b838111156114885750506000910152565b6000815180845261451a8160208601602086016144d6565b601f01601f19169290920160200192915050565b6020815260006120316020830184614502565b60006020828403121561455357600080fd5b5035919050565b6000806040838503121561456d57600080fd5b8235614578816144a4565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145c4576145c4614586565b604052919050565b60006001600160401b038211156145e5576145e5614586565b50601f01601f191660200190565b6000614606614601846145cc565b61459c565b905082815283838301111561461a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561464357600080fd5b81356001600160401b0381111561465957600080fd5b8201601f8101841361466a57600080fd5b613081848235602084016145f3565b60008060006060848603121561468e57600080fd5b8335614699816144a4565b925060208401356146a9816144a4565b929592945050506040919091013590565b600080604083850312156146cd57600080fd5b50508035926020909101359150565b600080604083850312156146ef57600080fd5b823591506020830135614701816144a4565b809150509250929050565b60006020828403121561471e57600080fd5b81356001600160601b038116811461203157600080fd5b60008083601f84011261474757600080fd5b5081356001600160401b0381111561475e57600080fd5b6020830191508360208260051b850101111561153557600080fd5b60008060008060006080868803121561479157600080fd5b853561479c816144a4565b9450602086013593506040860135925060608601356001600160401b038111156147c557600080fd5b6147d188828901614735565b969995985093965092949392505050565b801515811461115a57600080fd5b60006020828403121561480257600080fd5b8135612031816147e2565b6000806020838503121561482057600080fd5b82356001600160401b0381111561483657600080fd5b61484285828601614735565b90969095509350505050565b600082601f83011261485f57600080fd5b813560206001600160401b0382111561487a5761487a614586565b8160051b61488982820161459c565b92835284810182019282810190878511156148a357600080fd5b83870192505b848310156148c2578235825291830191908301906148a9565b979650505050505050565b6000806000806000608086880312156148e557600080fd5b85356001600160401b03808211156148fc57600080fd5b61490889838a0161484e565b96506020880135955060408801359450606088013591508082111561492c57600080fd5b506147d188828901614735565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015611e3a576149a4838551614939565b9284019260809290920191600101614991565b6020808252825182820181905260009190848201906040850190845b81811015611e3a578351835292840192918401916001016149d3565b600080600060608486031215614a0457600080fd5b8335614a0f816144a4565b95602085013595506040909401359392505050565b60008060408385031215614a3757600080fd5b8235614a42816144a4565b91506020830135614701816147e2565b634e487b7160e01b600052602160045260246000fd5b6020810160038310614a8a57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600060408486031215614aa557600080fd5b83356001600160401b0380821115614abc57600080fd5b614ac887838801614735565b90955093506020860135915080821115614ae157600080fd5b50614aee8682870161484e565b9150509250925092565b60008060008060808587031215614b0e57600080fd5b8435614b19816144a4565b93506020850135614b29816144a4565b92506040850135915060608501356001600160401b03811115614b4b57600080fd5b8501601f81018713614b5c57600080fd5b614b6b878235602084016145f3565b91505092959194509250565b600080600080600060808688031215614b8f57600080fd5b85359450602086013593506040860135925060608601356001600160401b038111156147c557600080fd5b600060208284031215614bcc57600080fd5b81356003811061203157600080fd5b608081016111068284614939565b60008060408385031215614bfc57600080fd5b8235614c07816144a4565b91506020830135614701816144a4565b6020808252825182820181905260009190848201906040850190845b81811015611e3a578351151583529284019291840191600101614c33565b600181811c90821680614c6557607f821691505b602082108103614c8557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a90820152696e6f742065786973747360b01b604082015260600190565b600060208284031215614cc157600080fd5b8151612031816147e2565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614cfc57614cfc614ccc565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614d2657614d26614d01565b500490565b634e487b7160e01b600052603260045260246000fd5b600060018201614d5357614d53614ccc565b5060010190565b6020808252601b908201527f6e65656420746f206d696e74206174206c656173742031204e46540000000000604082015260600190565b60008219821115614da457614da4614ccc565b500190565b60208082526022908201527f6f75742d6f662d73636f706520706861736520746861742063616e2062652073604082015261195d60f21b606082015260800190565b600060208284031215614dfd57600080fd5b5051919050565b600082821015614e1657614e16614ccc565b500390565b8054600090600181811c9080831680614e3557607f831692505b60208084108203614e5657634e487b7160e01b600052602260045260246000fd5b818015614e6a5760018114614e7b57614ea8565b60ff19861689528489019650614ea8565b60008881526020902060005b86811015614ea05781548b820152908501908301614e87565b505084890196505b50505050505092915050565b60008351614ec68184602088016144d6565b614ed281840185614e1b565b95945050505050565b600060208284031215614eed57600080fd5b81516001600160401b03811115614f0357600080fd5b8201601f81018413614f1457600080fd5b8051614f22614601826145cc565b818152856020838501011115614f3757600080fd5b614ed28260208301602086016144d6565b600082614f5757614f57614d01565b500690565b6000614f688285614e1b565b8351614f788183602088016144d6565b01949350505050565b60008351614f938184602088016144d6565b835190830190614f788183602088016144d6565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614fdf8160178501602088016144d6565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150108160288401602088016144d6565b01602801949350505050565b60006001600160401b038083168185168183048111821515161561504257615042614ccc565b02949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061285390830184614502565b60006020828403121561509057600080fd5b815161203181614471565b6000816150aa576150aa614ccc565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212201321bcf85599e720532250ec643f7bb0eb14cd5b085bb373fa74e286950e79c864736f6c634300080d0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x6080604052600436106105025760003560e01c8063860bc37f11610297578063c0ca39ae11610165578063e0a80853116100cc578063f36922cd11610085578063f36922cd14610fe9578063f58f9c6614611009578063f77322fa14611029578063fac81a5314611056578063fe9ba2fb1461106b578063febd1b121461108b57600080fd5b8063e0a8085314610f09578063e7a4bd1514610f29578063e985e9c514610f3f578063ecba222a14610f88578063f2c4ce1e14610fa9578063f2fde38b14610fc957600080fd5b8063ca40c7ae1161011e578063ca40c7ae14610e54578063cc835a8814610e74578063d4d2609a14610e8a578063d547741f14610eaa578063da3ef23f14610eca578063dda475e314610eea57600080fd5b8063c0ca39ae14610d9c578063c23dc68f14610dbc578063c668286214610de9578063c79668a814610dfe578063c87b56dd14610e1e578063ca2b435414610e3e57600080fd5b8063b0ccc31e11610209578063b88d4fde116101c2578063b88d4fde14610cd1578063b8997a9714610cf1578063b8d1e53214610d29578063c0035b2a14610d49578063c03afb5914610d5c578063c0c2e0a314610d7c57600080fd5b8063b0ccc31e14610c20578063b1c9fe6e14610c40578063b3a0663014610c67578063b414a56f14610c87578063b55cd04b14610c9c578063b7c738f414610cb157600080fd5b806399a2557a1161025b57806399a2557a14610b6c578063a210c80414610b8c578063a217fddf14610bac578063a22cb46514610bc1578063a4e2d63414610be1578063ad2f852a14610bfb57600080fd5b8063860bc37f14610ad95780638c8fae4014610af95780638da5cb5b14610b1957806391d1485414610b3757806395d89b4114610b5757600080fd5b80633ccfd60b116103d45780635bbb2177116103465780636c0360eb116102ff5780636c0360eb14610a225780636db69a9114610a3757806370a0823114610a57578063715018a614610a775780637cb6475914610a8c5780638462151c14610aac57600080fd5b80635bbb2177146109755780635ef9432a146109a257806360ac9819146109b75780636352211e146109cc578063682a3ad6146109ec5780636a98de4c14610a0257600080fd5b80634ac1415b116103985780634ac1415b146108bc5780634d1a264f146108d65780634e533572146108e9578063518302271461091657806355cda8981461093057806355f804b31461095557600080fd5b80633ccfd60b14610827578063426a2c541461083c57806342842e0e1461085c57806344a0d68a1461087c57806344ad71061461089c57600080fd5b806323b872dd1161047857806332cb6b0c1161043157806332cb6b0c1461077b578063357844f11461079157806336568abe146107b157806337b562ea146107d157806338bd2961146107e757806339940b4a1461080757600080fd5b806323b872dd14610696578063248a9ca3146106b65780632a55205a146106e65780632eb4a7ab146107255780632f2ff15d1461073b57806331faafb41461075b57600080fd5b80630829eebb116104ca5780630829eebb146105cd578063095ea7b3146105ed5780630dbc2ce01461060d578063122e04a81461062d57806313faede61461065557806318160ddd1461067957600080fd5b806301ffc9a71461050757806306d254da1461053c57806306fdde031461055e578063081812fc14610580578063081c8c44146105b8575b600080fd5b34801561051357600080fd5b50610527610522366004614487565b6110ab565b60405190151581526020015b60405180910390f35b34801561054857600080fd5b5061055c6105573660046144b9565b61110c565b005b34801561056a57600080fd5b5061057361115d565b604051610533919061452e565b34801561058c57600080fd5b506105a061059b366004614541565b6111ef565b6040516001600160a01b039091168152602001610533565b3480156105c457600080fd5b50610573611233565b3480156105d957600080fd5b506105276105e8366004614541565b6112c1565b3480156105f957600080fd5b5061055c61060836600461455a565b6112ff565b34801561061957600080fd5b5061055c610628366004614631565b611442565b34801561063957600080fd5b506105a073664d4e1e7e0deb51932985f0a727d4dfb09fb62181565b34801561066157600080fd5b5061066b60065481565b604051908152602001610533565b34801561068557600080fd5b50601754601654036000190161066b565b3480156106a257600080fd5b5061055c6106b1366004614679565b611463565b3480156106c257600080fd5b5061066b6106d1366004614541565b60009081526015602052604090206001015490565b3480156106f257600080fd5b506107066107013660046146ba565b61148e565b604080516001600160a01b039093168352602083019190915201610533565b34801561073157600080fd5b5061066b600c5481565b34801561074757600080fd5b5061055c6107563660046146dc565b61153c565b34801561076757600080fd5b5061055c61077636600461470c565b611561565b34801561078757600080fd5b5061066b611dd981565b34801561079d57600080fd5b506105276107ac366004614779565b6115aa565b3480156107bd57600080fd5b5061055c6107cc3660046146dc565b61161d565b3480156107dd57600080fd5b5061066b600d5481565b3480156107f357600080fd5b5061055c6108023660046147f0565b611697565b34801561081357600080fd5b5061055c610822366004614541565b6116bb565b34801561083357600080fd5b5061055c6116ca565b34801561084857600080fd5b5061055c61085736600461480d565b61173d565b34801561086857600080fd5b5061055c610877366004614679565b611785565b34801561088857600080fd5b5061055c610897366004614541565b6117aa565b3480156108a857600080fd5b5061055c6108b736600461480d565b6117b9565b3480156108c857600080fd5b506014546105279060ff1681565b61055c6108e43660046148cd565b611851565b3480156108f557600080fd5b5061066b610904366004614541565b60136020526000908152604090205481565b34801561092257600080fd5b50600a546105279060ff1681565b34801561093c57600080fd5b506014546105a09061010090046001600160a01b031681565b34801561096157600080fd5b5061055c610970366004614631565b611b51565b34801561098157600080fd5b5061099561099036600461480d565b611b6e565b6040516105339190614975565b3480156109ae57600080fd5b5061055c611c20565b3480156109c357600080fd5b50610573611c8e565b3480156109d857600080fd5b506105a06109e7366004614541565b611c9b565b3480156109f857600080fd5b5061066b60045481565b348015610a0e57600080fd5b506001546105a0906001600160a01b031681565b348015610a2e57600080fd5b50610573611ca6565b348015610a4357600080fd5b5061055c610a5236600461480d565b611cb3565b348015610a6357600080fd5b5061066b610a723660046144b9565b611cef565b348015610a8357600080fd5b5061055c611d3d565b348015610a9857600080fd5b5061055c610aa7366004614541565b611d51565b348015610ab857600080fd5b50610acc610ac73660046144b9565b611d60565b60405161053391906149b7565b348015610ae557600080fd5b5061055c610af4366004614541565b611e46565b348015610b0557600080fd5b5061055c610b143660046147f0565b611e55565b348015610b2557600080fd5b506000546001600160a01b03166105a0565b348015610b4357600080fd5b50610527610b523660046146dc565b611e77565b348015610b6357600080fd5b50610573611ea2565b348015610b7857600080fd5b50610acc610b873660046149ef565b611eb1565b348015610b9857600080fd5b5061055c610ba7366004614541565b612038565b348015610bb857600080fd5b5061066b600081565b348015610bcd57600080fd5b5061055c610bdc366004614a24565b612047565b348015610bed57600080fd5b506012546105279060ff1681565b348015610c0757600080fd5b50600f546105a09061010090046001600160a01b031681565b348015610c2c57600080fd5b506020546105a0906001600160a01b031681565b348015610c4c57600080fd5b50600f54610c5a9060ff1681565b6040516105339190614a68565b348015610c7357600080fd5b5061055c610c82366004614a90565b612127565b348015610c9357600080fd5b5061055c6122ad565b348015610ca857600080fd5b5061066b612336565b348015610cbd57600080fd5b506002546105a0906001600160a01b031681565b348015610cdd57600080fd5b5061055c610cec366004614af8565b612341565b348015610cfd57600080fd5b50601054610d11906001600160601b031681565b6040516001600160601b039091168152602001610533565b348015610d3557600080fd5b5061055c610d443660046144b9565b612367565b61055c610d57366004614b77565b6123df565b348015610d6857600080fd5b5061055c610d77366004614bba565b612765565b348015610d8857600080fd5b5061055c610d973660046144b9565b612796565b348015610da857600080fd5b5061066b610db7366004614779565b6127c2565b348015610dc857600080fd5b50610ddc610dd7366004614541565b61285d565b6040516105339190614bdb565b348015610df557600080fd5b506105736128ad565b348015610e0a57600080fd5b5061066b610e19366004614779565b6128ba565b348015610e2a57600080fd5b50610573610e39366004614541565b612926565b348015610e4a57600080fd5b5061066b600e5481565b348015610e6057600080fd5b5061055c610e6f3660046147f0565b612ada565b348015610e8057600080fd5b5061066b60115481565b348015610e9657600080fd5b5061055c610ea53660046144b9565b612af7565b348015610eb657600080fd5b5061055c610ec53660046146dc565b612b23565b348015610ed657600080fd5b5061055c610ee5366004614631565b612b48565b348015610ef657600080fd5b5060125461052790610100900460ff1681565b348015610f1557600080fd5b5061055c610f243660046147f0565b612b65565b348015610f3557600080fd5b5061066b60055481565b348015610f4b57600080fd5b50610527610f5a366004614be9565b6001600160a01b039182166000908152601d6020908152604080832093909416825291909152205460ff1690565b348015610f9457600080fd5b5060205461052790600160a01b900460ff1681565b348015610fb557600080fd5b5061055c610fc4366004614631565b612b82565b348015610fd557600080fd5b5061055c610fe43660046144b9565b612b9f565b348015610ff557600080fd5b506003546105a0906001600160a01b031681565b34801561101557600080fd5b5061055c6110243660046144b9565b612c15565b34801561103557600080fd5b506110496110443660046144b9565b612c47565b6040516105339190614c17565b34801561106257600080fd5b5061055c612d3e565b34801561107757600080fd5b5061055c6110863660046144b9565b612dc7565b34801561109757600080fd5b5061055c6110a636600461480d565b612df3565b60006001600160e01b03198216637965db0b60e01b14806110dc57506001600160e01b0319821663184371e560e31b145b806110f757506001600160e01b03198216632baae9fd60e01b145b80611106575061110682612ee5565b92915050565b6111166000612f0a565b600f8054610100600160a81b0319166101006001600160a01b038481168202929092179283905560105461115a9391909104909116906001600160601b0316612f14565b50565b60606018805461116c90614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461119890614c51565b80156111e55780601f106111ba576101008083540402835291602001916111e5565b820191906000526020600020905b8154815290600101906020018083116111c857829003601f168201915b5050505050905090565b60006111fa82613011565b611217576040516333d1c03960e21b815260040160405180910390fd5b506000908152601c60205260409020546001600160a01b031690565b600b805461124090614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461126c90614c51565b80156112b95780601f1061128e576101008083540402835291602001916112b9565b820191906000526020600020905b81548152906001019060200180831161129c57829003601f168201915b505050505081565b60006112cc82613011565b15156001146112f65760405162461bcd60e51b81526004016112ed90614c8b565b60405180910390fd5b61110682613046565b8161130981613089565b6002546001600160a01b0316156113d557600254601154604051630f8350ed60e41b81526001600160a01b038681166004830152602482019290925291169063f8350ed090604401602060405180830381865afa15801561136e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113929190614caf565b15156001146113d55760405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b60448201526064016112ed565b60125460ff161515600103611433576113ed82613046565b156114335760405162461bcd60e51b81526020600482015260166024820152751d1a1a5cc81d1bdad95b9259081a5cc81b1bd8dad95960521b60448201526064016112ed565b61143d83836130a3565b505050565b61144c6000612f0a565b805161145f9060089060208401906143b1565b5050565b826001600160a01b038116331461147d5761147d33613089565b611488848484613143565b50505050565b6000828152601f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291611503575060408051808201909152601e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611522906001600160601b031687614ce2565b61152c9190614d17565b91519350909150505b9250929050565b60008281526015602052604090206001015461155781612f0a565b61143d83836132ed565b61156b6000612f0a565b601080546bffffffffffffffffffffffff19166001600160601b038316908117909155600f5461115a916101009091046001600160a01b031690612f14565b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260548101849052600090819081906074016040516020818303038152906040528051906020012090506116048585600c5484613373565b151560010361161257600191505b509695505050505050565b6001600160a01b038116331461168d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016112ed565b61145f828261338b565b6116a16000612f0a565b601280549115156101000261ff0019909216919091179055565b6116c56000612f0a565b601155565b6116d46000612f0a565b60405160009073664d4e1e7e0deb51932985f0a727d4dfb09fb6219047908381818185875af1925050503d806000811461172a576040519150601f19603f3d011682016040523d82523d6000602084013e61172f565b606091505b505090508061115a57600080fd5b6117476000612f0a565b60005b8181101561143d5761177383838381811061176757611767614d2b565b905060200201356133f2565b8061177d81614d41565b91505061174a565b826001600160a01b038116331461179f5761179f33613089565b6114888484846134bd565b6117b46000612f0a565b600655565b6003546001600160a01b031633146118135760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920737065636966696320636f6e74726f6c20636f6e7472616374000060448201526064016112ed565b60005b8181101561143d5761183f83838381811061183357611833614d2b565b905060200201356134d8565b8061184981614d41565b915050611816565b6002600f5460ff16600281111561186a5761186a614a52565b146118ac5760405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b60448201526064016112ed565b6005548311156118f15760405162461bcd60e51b815260206004820152601060248201526f06e6f74207461726765742067726f75760841b60448201526064016112ed565b3233146119405760405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c65720060448201526064016112ed565b61194d33858585856115aa565b151560011461199e5760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520612077686974656c69737421000000000060448201526064016112ed565b60008551116119bf5760405162461bcd60e51b81526004016112ed90614d5a565b6119c833613598565b6119d533858585856127c2565b85511115611a205760405162461bcd60e51b815260206004820152601860248201527718db185a5b481a5cc81bdd995c881b585e08185b5bdd5b9d60421b60448201526064016112ed565b6004546017548651611a329190614d91565b1115611a785760405162461bcd60e51b81526020600482015260156024820152741bdd995c881d1bdd185b08189d5c9b8818dbdd5b9d605a1b60448201526064016112ed565b8451600654611a879190614ce2565b341015611ac75760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064016112ed565b611ad233865161363a565b60005b8551811015611b3e576000868281518110611af257611af2614d2b565b60200260200101519050611b0581611c9b565b6001600160a01b0316336001600160a01b031614611b2257600080fd5b611b2b8161364e565b5080611b3681614d41565b915050611ad5565b50611b4a338651613659565b5050505050565b611b5b6000612f0a565b805161145f9060079060208401906143b1565b6060816000816001600160401b03811115611b8b57611b8b614586565b604051908082528060200260200182016040528015611bc457816020015b611bb1614435565b815260200190600190039081611ba95790505b50905060005b828114611c1757611bf2868683818110611be657611be6614d2b565b9050602002013561285d565b828281518110611c0457611c04614d2b565b6020908102919091010152600101611bca565b50949350505050565b6000546001600160a01b03163314611c4b57604051635fc483c560e01b815260040160405180910390fd5b602054600160a01b900460ff1615611c7657604051631551a48f60e11b815260040160405180910390fd5b602080546001600160a81b031916600160a01b179055565b6008805461124090614c51565b600061110682613673565b6007805461124090614c51565b611cbd6000612f0a565b60005b8181101561143d57611cdd83838381811061183357611833614d2b565b80611ce781614d41565b915050611cc0565b60006001600160a01b038216611d18576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601b60205260409020546001600160401b031690565b611d456136e2565b611d4f600061373c565b565b611d5b6000612f0a565b600c55565b60606000806000611d7085611cef565b90506000816001600160401b03811115611d8c57611d8c614586565b604051908082528060200260200182016040528015611db5578160200160208202803683370190505b509050611dc0614435565b60015b838614611e3a57611dd38161378c565b91508160400151611e325781516001600160a01b031615611df357815194505b876001600160a01b0316856001600160a01b031603611e325780838780600101985081518110611e2557611e25614d2b565b6020026020010181815250505b600101611dc3565b50909695505050505050565b611e506000612f0a565b600555565b611e5f6000612f0a565b6012805460ff1916911515919091179055565b905090565b60009182526015602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606019805461116c90614c51565b6060818310611ed357604051631960ccad60e11b815260040160405180910390fd5b600080611edf60165490565b90506001851015611eef57600194505b80841115611efb578093505b6000611f0687611cef565b905084861015611f255785850381811015611f1f578091505b50611f29565b5060005b6000816001600160401b03811115611f4357611f43614586565b604051908082528060200260200182016040528015611f6c578160200160208202803683370190505b50905081600003611f8257935061203192505050565b6000611f8d8861285d565b905060008160400151611f9e575080515b885b888114158015611fb05750848714155b1561202557611fbe8161378c565b9250826040015161201d5782516001600160a01b031615611fde57825191505b8a6001600160a01b0316826001600160a01b03160361201d578084888060010199508151811061201057612010614d2b565b6020026020010181815250505b600101611fa0565b50505092835250909150505b9392505050565b6120426000612f0a565b600455565b8161205181613089565b6002546001600160a01b03161561211d57600254601154604051630f8350ed60e41b81526001600160a01b038681166004830152602482019290925291169063f8350ed090604401602060405180830381865afa1580156120b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120da9190614caf565b151560011461211d5760405162461bcd60e51b815260206004820152600f60248201526e1859191c995cdcc81b9bc81b1a5cdd608a1b60448201526064016112ed565b61143d83836137ac565b6121316000612f0a565b6000805b82518110156121775782818151811061215057612150614d2b565b6020026020010151826121639190614d91565b91508061216f81614d41565b915050612135565b50600081116121985760405162461bcd60e51b81526004016112ed90614d5a565b601754601654611dd9919003600019016121b29083614d91565b11156122005760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c790000000060448201526064016112ed565b815183146122465760405162461bcd60e51b81526020600482015260136024820152720c2e4e4c2f240d8cadccee8d040eadcdaeac6d606b1b60448201526064016112ed565b60005b8251811015611b4a5761229b85858381811061226757612267614d2b565b905060200201602081019061227c91906144b9565b84838151811061228e5761228e614d2b565b6020026020010151613659565b806122a581614d41565b915050612249565b6122b76000612f0a565b6000600f5460ff1660028111156122d0576122d0614a52565b146122ed5760405162461bcd60e51b81526004016112ed90614da9565b61ffff600d541061232b5760405162461bcd60e51b81526020600482015260086024820152671b9bc815985b1a5960c21b60448201526064016112ed565b600d80546001019055565b6000611e7260175490565b836001600160a01b038116331461235b5761235b33613089565b611b4a85858585613841565b6000546001600160a01b0316331461239257604051635fc483c560e01b815260040160405180910390fd5b602054600160a01b900460ff16156123bd57604051631551a48f60e11b815260040160405180910390fd5b602080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600f5460ff1660028111156123f8576123f8614a52565b1461243a5760405162461bcd60e51b815260206004820152601260248201527173616c65206973206e6f742061637469766560701b60448201526064016112ed565b60055483111561247f5760405162461bcd60e51b815260206004820152601060248201526f06e6f74207461726765742067726f75760841b60448201526064016112ed565b3233146124ce5760405162461bcd60e51b815260206004820152601f60248201527f7468652063616c6c657220697320616e6f7468657220636f6e74726f6c65720060448201526064016112ed565b6124db33858585856115aa565b151560011461252c5760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520612077686974656c69737421000000000060448201526064016112ed565b6000851161254c5760405162461bcd60e51b81526004016112ed90614d5a565b61255533613885565b61256233858585856128ba565b8511156125ac5760405162461bcd60e51b815260206004820152601860248201527718db185a5b481a5cc81bdd995c881b585e08185b5bdd5b9d60421b60448201526064016112ed565b601754601654611dd9919003600019016125c69087614d91565b11156126145760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c790000000060448201526064016112ed565b846006546126229190614ce2565b3410156126625760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064016112ed565b60145460ff161515600103612751576014546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa1580156126bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e19190614deb565b6000036127515760145460405163133f311360e31b8152336004820152600160248201526101009091046001600160a01b0316906399f9889890604401600060405180830381600087803b15801561273857600080fd5b505af115801561274c573d6000803e3d6000fd5b505050505b61275b33866138e5565b611b4a3386613659565b61276f6000612f0a565b600f805482919060ff1916600183600281111561278e5761278e614a52565b021790555050565b6127a06000612f0a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806002600f5460ff1660028111156127de576127de614a52565b03612853576127f087878787876115aa565b151560010361285357600e54612819600261280a8a6138f9565b6001600160401b031690613917565b6001600160401b0316101561282f575084612853565b61283d600361280a896138f9565b612850906001600160401b031687614e04565b90505b9695505050505050565b612865614435565b61286d614435565b600183108061287e57506016548310155b156128895792915050565b6128928361378c565b90508060400151156128a45792915050565b61203183613949565b6009805461124090614c51565b6000806001600f5460ff1660028111156128d6576128d6614a52565b03612853576128e887878787876115aa565b151560010361285357600d54612902600061280a8a6138f9565b6001600160401b03161015612918575084612853565b61283d600161280a896138f9565b600a5460609060ff1615156000036129ca57600b805461294590614c51565b80601f016020809104026020016040519081016040528092919081815260200182805461297190614c51565b80156129be5780601f10612993576101008083540402835291602001916129be565b820191906000526020600020905b8154815290600101906020018083116129a157829003601f168201915b50505050509050919050565b6001546001600160a01b0316612a545760125460ff61010090910416151560011480156129fe575060125460ff1615156001145b8015612a145750612a0e82613046565b15156001145b15612a4b57612a2282613962565b6009604051602001612a35929190614eb4565b6040516020818303038152906040529050919050565b612a22826139d1565b6001546001600160a01b031663338c3fc483612a6f81613046565b6040516001600160e01b031960e085901b168152600481019290925215156024820152604401600060405180830381865afa158015612ab2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111069190810190614edb565b612ae46000612f0a565b6014805460ff1916911515919091179055565b612b016000612f0a565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260156020526040902060010154612b3e81612f0a565b61143d838361338b565b612b526000612f0a565b805161145f9060099060208401906143b1565b612b6f6000612f0a565b600a805460ff1916911515919091179055565b612b8c6000612f0a565b805161145f90600b9060208401906143b1565b612ba76136e2565b6001600160a01b038116612c0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016112ed565b61115a8161373c565b612c1f6000612f0a565b601480546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60606000806000612c5785611cef565b90506000816001600160401b03811115612c7357612c73614586565b604051908082528060200260200182016040528015612c9c578160200160208202803683370190505b509050612ca7614435565b60015b838614611e3a57612cba8161378c565b91508160400151612d365781516001600160a01b031615612cda57815194505b876001600160a01b0316856001600160a01b031603612d36576000612cfe82613046565b1515600103612d0b575060015b80848880600101995081518110612d2457612d24614d2b565b91151560209283029190910190910152505b600101612caa565b612d486000612f0a565b6000600f5460ff166002811115612d6157612d61614a52565b14612d7e5760405162461bcd60e51b81526004016112ed90614da9565b61ffff600e5410612dbc5760405162461bcd60e51b81526020600482015260086024820152671b9bc815985b1a5960c21b60448201526064016112ed565b600e80546001019055565b612dd16000612f0a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314612e4d5760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920737065636966696320636f6e74726f6c20636f6e7472616374000060448201526064016112ed565b60005b8181101561143d57612e6d83838381811061176757611767614d2b565b80612e7781614d41565b915050612e50565b60006101008210612e8f57600080fd5b60006001831b84168015612ea257600191505b509392505050565b60006101008310612eba57600080fd5b811515600003612ed357826001901b1984169350612edd565b826001901b841793505b509192915050565b60006001600160e01b0319821663152a902d60e11b1480611106575061110682613a54565b61115a8133613aa2565b6127106001600160601b0382161115612f825760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016112ed565b6001600160a01b038216612fd85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016112ed565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601e55565b600081600111158015613025575060165482105b80156111065750506000908152601a6020526040902054600160e01b161590565b60008061305561010084614d17565b9050600061306561010085614f48565b6000838152601360205260409020549091506130819082612e7f565b949350505050565b6020546001600160a01b03161561115a5761115a81613b06565b60006130ae82611c9b565b9050336001600160a01b038216146130e7576130ca8133610f5a565b6130e7576040516367d9dca160e11b815260040160405180910390fd5b6000828152601c602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061314e82613673565b9050836001600160a01b0316816001600160a01b0316146131815760405162a1148160e81b815260040160405180910390fd5b6000828152601c6020526040902080546131ad8187335b6001600160a01b039081169116811491141790565b6131d8576131bb8633610f5a565b6131d857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166131ff57604051633a954ecd60e21b815260040160405180910390fd5b61320c8686866001613bc8565b801561321757600082555b6001600160a01b038681166000908152601b60205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152601a6020526040812091909155600160e11b841690036132a957600184016000818152601a602052604081205490036132a75760165481146132a7576000818152601a602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206150b383398151915260405160405180910390a46132e58686866001613c3b565b505050505050565b6132f78282611e77565b61145f5760008281526015602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561332f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082613381868685613c6d565b1495945050505050565b6133958282611e77565b1561145f5760008281526015602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6133fb81613011565b151560011461341c5760405162461bcd60e51b81526004016112ed90614c8b565b61342581613046565b15156001146134635760405162461bcd60e51b815260206004820152600a602482015269139bdd081cdd185ad95960b21b60448201526064016112ed565b61346e816000613cb0565b8061347882611c9b565b6001600160a01b03167f9189d183a350917f72dfcc613565f69dc58b49f760a6bebfc1fd1181ffe0be01426040516134b291815260200190565b60405180910390a350565b61143d83838360405180602001604052806000815250612341565b6134e181613011565b15156001146135025760405162461bcd60e51b81526004016112ed90614c8b565b61350b81613046565b156135495760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481cdd185ad95960921b60448201526064016112ed565b613554816001613cb0565b8061355e82611c9b565b6001600160a01b03167fabac8d0f19908587ad342f25ebeb82910468501232b3b1c97074ded4e5369605426040516134b291815260200190565b60006135a3826138f9565b600e549091506135bd6001600160401b0383166002613917565b6001600160401b0316101561145f5761145f82613608600360006135f86002600e54886001600160401b0316613d039092919063ffffffff16565b6001600160401b03169190613d03565b6001600160a01b039091166000908152601b6020526040902080546001600160c01b031660c09290921b919091179055565b61145f828261364885613d61565b01613d7a565b61115a816000613d96565b61145f828260405180602001604052806000815250613eeb565b600081806001116136c9576016548110156136c9576000818152601a602052604081205490600160e01b821690036136c7575b806000036120315750600019016000818152601a60205260409020546136a6565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b03163314611d4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112ed565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613794614435565b6000828152601a602052604090205461110690613f51565b336001600160a01b038316036137d55760405163b06307db60e01b815260040160405180910390fd5b336000818152601d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61384c848484611463565b6001600160a01b0383163b156114885761386884848484613f94565b611488576040516368d2bf6b60e11b815260040160405180910390fd5b6000613890826138f9565b600d549091506138aa6001600160401b0383166000613917565b6001600160401b0316101561145f5761145f82613608600160006135f86000600d54886001600160401b0316613d039092919063ffffffff16565b61145f82826138f38561407c565b01614095565b6001600160a01b03166000908152601b602052604090205460c01c90565b60006004821061392657600080fd5b61ffff613934836010614ce2565b846001600160401b0316901c16905092915050565b613951614435565b61110661395d83613673565b613f51565b606061396d82613011565b61398a57604051630a14c4b560e41b815260040160405180910390fd5b6008805461399790614c51565b90506000036139b55760405180602001604052806000815250611106565b60086139c0836140b1565b604051602001612a35929190614f5c565b60606139dc82613011565b6139f957604051630a14c4b560e41b815260040160405180910390fd5b6000613a036140e9565b90508051600003613a235760405180602001604052806000815250612031565b80613a2d846140b1565b604051602001613a3e929190614f81565b6040516020818303038152906040529392505050565b60006301ffc9a760e01b6001600160e01b031983161480613a8557506380ac58cd60e01b6001600160e01b03198316145b806111065750506001600160e01b031916635b5e139f60e01b1490565b613aac8282611e77565b61145f57613ac4816001600160a01b031660146140f8565b613acf8360206140f8565b604051602001613ae0929190614fa7565b60408051601f198184030181529082905262461bcd60e51b82526112ed9160040161452e565b6020546001600160a01b03168015801590613b2b57506000816001600160a01b03163b115b1561145f57604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015613b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba09190614caf565b61145f57604051633b79c77360e21b81526001600160a01b03831660048201526024016112ed565b60125460ff1615156001148015613be757506001600160a01b03841615155b1561148857613bf582613046565b156114885760405162461bcd60e51b81526020600482015260166024820152751d1a1a5cc81d1bdad95b9259081a5cc81b1bd8dad95960521b60448201526064016112ed565b6001600160a01b03841615801590613c5d5750613c5782613046565b15156001145b1561148857611488826000613cb0565b600081815b84811015611c1757613c9c82878784818110613c9057613c90614d2b565b90506020020135614293565b915080613ca881614d41565b915050613c72565b6000613cbe61010084614d17565b90506000613cce61010085614f48565b600083815260136020526040902054909150613ceb908285612eaa565b60009283526013602052604090922091909155505050565b600060048310613d1257600080fd5b6000613d1f84601061501c565b61ffff6001600160401b03919091161b19851690506000613d4185601061501c565b61ffff85166001600160401b03919091161b919091179150509392505050565b6000613d6c82613598565b611106600361280a846138f9565b613d8382613598565b61145f826136086003846135f8876138f9565b6000613da183613673565b905080600080613dbf866000908152601c6020526040902080549091565b915091508415613dff57613dd4818433613198565b613dff57613de28333610f5a565b613dff57604051632ce44b5f60e11b815260040160405180910390fd5b613e0d836000886001613bc8565b8015613e1857600082555b6001600160a01b0383166000818152601b6020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152601a6020526040812091909155600160e11b85169003613ea657600186016000818152601a60205260408120549003613ea4576016548114613ea4576000818152601a602052604090208590555b505b60405186906000906001600160a01b038616906000805160206150b3833981519152908390a4613eda836000886001613c3b565b505060178054600101905550505050565b613ef583836142c2565b6001600160a01b0383163b1561143d576016548281035b613f1f6000868380600101945086613f94565b613f3c576040516368d2bf6b60e11b815260040160405180910390fd5b818110613f0c578160165414611b4a57600080fd5b613f59614435565b6001600160a01b03821681526001600160401b0360a083901c166020820152600160e01b82161515604082015260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613fc990339089908890889060040161504b565b6020604051808303816000875af1925050508015614004575060408051601f3d908101601f191682019092526140019181019061507e565b60015b614062573d808015614032576040519150601f19603f3d011682016040523d82523d6000602084013e614037565b606091505b50805160000361405a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613081565b600061408782613885565b611106600161280a846138f9565b61409e82613885565b61145f826136086001846135f8876138f9565b604080516080019081905280825b600183039250600a81066030018353600a9004806140bf5750819003601f19909101908152919050565b60606007805461116c90614c51565b60606000614107836002614ce2565b614112906002614d91565b6001600160401b0381111561412957614129614586565b6040519080825280601f01601f191660200182016040528015614153576020820181803683370190505b509050600360fc1b8160008151811061416e5761416e614d2b565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061419d5761419d614d2b565b60200101906001600160f81b031916908160001a90535060006141c1846002614ce2565b6141cc906001614d91565b90505b6001811115614244576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061420057614200614d2b565b1a60f81b82828151811061421657614216614d2b565b60200101906001600160f81b031916908160001a90535060049490941c9361423d8161509b565b90506141cf565b5083156120315760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016112ed565b60008183106142af576000828152602084905260409020612031565b6000838152602083905260409020612031565b60165460008290036142e75760405163b562e8dd60e01b815260040160405180910390fd5b6142f46000848385613bc8565b6001600160a01b0383166000818152601b602090815260408083208054680100000000000000018802019055848352601a90915281206001851460e11b4260a01b178317905582840190839083906000805160206150b38339815191528180a4600183015b81811461437f57808360006000805160206150b3833981519152600080a4600101614359565b50816000036143a057604051622e076360e81b815260040160405180910390fd5b6016555061143d6000848385613c3b565b8280546143bd90614c51565b90600052602060002090601f0160209004810192826143df5760008555614425565b82601f106143f857805160ff1916838001178555614425565b82800160010185558215614425579182015b8281111561442557825182559160200191906001019061440a565b5061443192915061445c565b5090565b60408051608081018252600080825260208201819052918101829052606081019190915290565b5b80821115614431576000815560010161445d565b6001600160e01b03198116811461115a57600080fd5b60006020828403121561449957600080fd5b813561203181614471565b6001600160a01b038116811461115a57600080fd5b6000602082840312156144cb57600080fd5b8135612031816144a4565b60005b838110156144f15781810151838201526020016144d9565b838111156114885750506000910152565b6000815180845261451a8160208601602086016144d6565b601f01601f19169290920160200192915050565b6020815260006120316020830184614502565b60006020828403121561455357600080fd5b5035919050565b6000806040838503121561456d57600080fd5b8235614578816144a4565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145c4576145c4614586565b604052919050565b60006001600160401b038211156145e5576145e5614586565b50601f01601f191660200190565b6000614606614601846145cc565b61459c565b905082815283838301111561461a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561464357600080fd5b81356001600160401b0381111561465957600080fd5b8201601f8101841361466a57600080fd5b613081848235602084016145f3565b60008060006060848603121561468e57600080fd5b8335614699816144a4565b925060208401356146a9816144a4565b929592945050506040919091013590565b600080604083850312156146cd57600080fd5b50508035926020909101359150565b600080604083850312156146ef57600080fd5b823591506020830135614701816144a4565b809150509250929050565b60006020828403121561471e57600080fd5b81356001600160601b038116811461203157600080fd5b60008083601f84011261474757600080fd5b5081356001600160401b0381111561475e57600080fd5b6020830191508360208260051b850101111561153557600080fd5b60008060008060006080868803121561479157600080fd5b853561479c816144a4565b9450602086013593506040860135925060608601356001600160401b038111156147c557600080fd5b6147d188828901614735565b969995985093965092949392505050565b801515811461115a57600080fd5b60006020828403121561480257600080fd5b8135612031816147e2565b6000806020838503121561482057600080fd5b82356001600160401b0381111561483657600080fd5b61484285828601614735565b90969095509350505050565b600082601f83011261485f57600080fd5b813560206001600160401b0382111561487a5761487a614586565b8160051b61488982820161459c565b92835284810182019282810190878511156148a357600080fd5b83870192505b848310156148c2578235825291830191908301906148a9565b979650505050505050565b6000806000806000608086880312156148e557600080fd5b85356001600160401b03808211156148fc57600080fd5b61490889838a0161484e565b96506020880135955060408801359450606088013591508082111561492c57600080fd5b506147d188828901614735565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015611e3a576149a4838551614939565b9284019260809290920191600101614991565b6020808252825182820181905260009190848201906040850190845b81811015611e3a578351835292840192918401916001016149d3565b600080600060608486031215614a0457600080fd5b8335614a0f816144a4565b95602085013595506040909401359392505050565b60008060408385031215614a3757600080fd5b8235614a42816144a4565b91506020830135614701816147e2565b634e487b7160e01b600052602160045260246000fd5b6020810160038310614a8a57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600060408486031215614aa557600080fd5b83356001600160401b0380821115614abc57600080fd5b614ac887838801614735565b90955093506020860135915080821115614ae157600080fd5b50614aee8682870161484e565b9150509250925092565b60008060008060808587031215614b0e57600080fd5b8435614b19816144a4565b93506020850135614b29816144a4565b92506040850135915060608501356001600160401b03811115614b4b57600080fd5b8501601f81018713614b5c57600080fd5b614b6b878235602084016145f3565b91505092959194509250565b600080600080600060808688031215614b8f57600080fd5b85359450602086013593506040860135925060608601356001600160401b038111156147c557600080fd5b600060208284031215614bcc57600080fd5b81356003811061203157600080fd5b608081016111068284614939565b60008060408385031215614bfc57600080fd5b8235614c07816144a4565b91506020830135614701816144a4565b6020808252825182820181905260009190848201906040850190845b81811015611e3a578351151583529284019291840191600101614c33565b600181811c90821680614c6557607f821691505b602082108103614c8557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a90820152696e6f742065786973747360b01b604082015260600190565b600060208284031215614cc157600080fd5b8151612031816147e2565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614cfc57614cfc614ccc565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614d2657614d26614d01565b500490565b634e487b7160e01b600052603260045260246000fd5b600060018201614d5357614d53614ccc565b5060010190565b6020808252601b908201527f6e65656420746f206d696e74206174206c656173742031204e46540000000000604082015260600190565b60008219821115614da457614da4614ccc565b500190565b60208082526022908201527f6f75742d6f662d73636f706520706861736520746861742063616e2062652073604082015261195d60f21b606082015260800190565b600060208284031215614dfd57600080fd5b5051919050565b600082821015614e1657614e16614ccc565b500390565b8054600090600181811c9080831680614e3557607f831692505b60208084108203614e5657634e487b7160e01b600052602260045260246000fd5b818015614e6a5760018114614e7b57614ea8565b60ff19861689528489019650614ea8565b60008881526020902060005b86811015614ea05781548b820152908501908301614e87565b505084890196505b50505050505092915050565b60008351614ec68184602088016144d6565b614ed281840185614e1b565b95945050505050565b600060208284031215614eed57600080fd5b81516001600160401b03811115614f0357600080fd5b8201601f81018413614f1457600080fd5b8051614f22614601826145cc565b818152856020838501011115614f3757600080fd5b614ed28260208301602086016144d6565b600082614f5757614f57614d01565b500690565b6000614f688285614e1b565b8351614f788183602088016144d6565b01949350505050565b60008351614f938184602088016144d6565b835190830190614f788183602088016144d6565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614fdf8160178501602088016144d6565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150108160288401602088016144d6565b01602801949350505050565b60006001600160401b038083168185168183048111821515161561504257615042614ccc565b02949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061285390830184614502565b60006020828403121561509057600080fd5b815161203181614471565b6000816150aa576150aa614ccc565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212201321bcf85599e720532250ec643f7bb0eb14cd5b085bb373fa74e286950e79c864736f6c634300080d0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.