ERC-721
NFT
Overview
Max Total Supply
700 MEMEWHALES
Holders
464
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 MEMEWHALESLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MemeWhales
Compiler Version
v0.8.18+commit.87f61d96
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.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "./erc721x/contracts/ERC721X.sol"; import "./libraries/TokenStake.sol"; import "./interfaces/INftCollection.sol"; /** * @title MemeWhales * @notice MemeWhales ERC721X NFT collection */ contract MemeWhales is Ownable, RevokableDefaultOperatorFilterer, ERC721X, Pausable, IERC2981, TokenStake { using SafeMath for uint256; using SafeERC20 for IERC20; using Strings for uint256; IERC20 public USDT; // USDT token bool public isMetadataLocked; bool public isMaxSupplyLocked; uint256 public maxSupply = 700; uint256 private BatchSize = 200; string public baseTokenURI; address public royalties; uint256 public royaltiesPercentage; uint256 public NFT_PRICE = 10000; uint256 public TokenDecimal = 1000000; uint256 public saleStage = 0; uint256 private publicSaleKey; uint256 public CurrentMintIndex = 0; uint256 public EndRoundMintIndex = 250; uint256 public MaxMintIndex = 400; address public immutable withdrawWallet1 = 0x4Da56C7c284d56094b21fCC56888BeeaCac53365; address public immutable withdrawWallet2 = 0xac488462d5Ed9a904842e8946290698694B2391f; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); event LockMetadata(); event LockMaxSupply(); constructor(uint256 _CallerPublicSaleKey) ERC721X("MemeWhales", "MEMEWHALES", BatchSize, maxSupply) { publicSaleKey = _CallerPublicSaleKey; } modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract"); _; } /** * @notice Allows the owner to lock the contract * @dev Callable by owner */ function lockMetadata() external onlyOwner { require(!isMetadataLocked, "Contract is locked"); require(bytes(baseTokenURI).length > 0, "BaseUri not set"); isMetadataLocked = true; emit LockMetadata(); } /** * @notice Allows the owner to lock the max supply * @dev Callable by owner */ function lockMaxSupply() external onlyOwner { require(!isMaxSupplyLocked, "Max supply is locked"); require(maxSupply > 0, "Max supply not set"); isMaxSupplyLocked = true; emit LockMaxSupply(); } function mint(uint256 _quantity, uint256 _CallerPublicSaleKey) external callerIsUser whenNotPaused { uint256 userBalance = USDT.balanceOf(msg.sender); uint256 costToMint = NFT_PRICE * TokenDecimal * _quantity; require(totalSupply().add(_quantity) <= maxSupply, "NFT: Total supply reached"); require(totalSupply().add(_quantity) <= MaxMintIndex, "Total supply reached max mint supply"); require(totalSupply().add(_quantity) <= EndRoundMintIndex, "Your quantity is over than limit"); require(publicSaleKey == _CallerPublicSaleKey, "Called with incorrect public sale key"); require(costToMint <= userBalance, "User balance is not enough"); require(saleStage > 0, "Sale is not active at the moment"); require(CurrentMintIndex + _quantity <= EndRoundMintIndex, "Supply over the swap supply limit"); USDT.safeTransferFrom(msg.sender, address(this), costToMint); _userMints[msg.sender] = _userMints[msg.sender] + _quantity; CurrentMintIndex = CurrentMintIndex + _quantity; _safeMint(msg.sender, _quantity); } function ownerMintBulk(address[] memory _accounts, uint256[] memory _quantity) external onlyOwner{ require(_accounts.length == _quantity.length,"arrays must have same length"); for (uint256 i = 0; i < _accounts.length; i++) { require(totalSupply().add(_quantity[i]) <= maxSupply, "NFT: Total supply reached"); CurrentMintIndex = CurrentMintIndex + _quantity[i]; _safeMint(_accounts[i], _quantity[i]); } } function setMaxSupply(uint256 _maxSupply) external onlyOwner { require(!isMaxSupplyLocked, "Operations: Max supply is locked"); setCollectionSize(_maxSupply); maxSupply = _maxSupply; } /** * @notice Allows the owner to set the base URI to be used for all token IDs * @param _uri: base URI * @dev Callable by owner */ function setBaseURI(string memory _uri) external onlyOwner { require(!isMetadataLocked, "Operations: Contract is locked"); baseTokenURI = _uri; } /** * @notice Returns the Uniform Resource Identifier (URI) for a token ID * @param tokenId: token ID */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Invalid tokenId"); return bytes(baseTokenURI).length > 0 ? string(abi.encodePacked(baseTokenURI, tokenId.toString(), ".json")) : ""; } function setRoyalties(address _royalties) public onlyOwner { royalties = _royalties; } function setRoyaltiesPercentage(uint256 _percentage) public onlyOwner { royaltiesPercentage = _percentage; } function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address, uint256 royaltyAmount) { _tokenId; // silence solc warning royaltyAmount = (_salePrice / 100) * royaltiesPercentage; return (royalties, royaltyAmount); } function setUSDTAddress(IERC20 _address) external onlyOwner { USDT = _address; } function setTokenDecimal(uint256 _tokenDecimal) external onlyOwner { TokenDecimal = _tokenDecimal; } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function _withdraw(uint256 amount) private { require(amount <= USDT.balanceOf(address(this)), "amount > balance"); require(amount > 0, "Empty amount"); uint256 amount1 = amount.mul(50).div(100); uint256 amount2 = amount.mul(50).div(100); USDT.safeTransfer(withdrawWallet1, amount1); USDT.safeTransfer(withdrawWallet2, amount2); emit Withdraw(amount); } function withdraw(uint256 amount) external onlyOwner { _withdraw(amount); } function withdrawAll() external onlyOwner { _withdraw(USDT.balanceOf(address(this))); } function setMintPrice(uint256 _MintPrice) external onlyOwner { NFT_PRICE = _MintPrice; } function setCurrentMintIndex(uint256 _Index) external onlyOwner { CurrentMintIndex = _Index; } function setEndRoundMintIndex(uint256 _Index) external onlyOwner { EndRoundMintIndex = _Index; } function setMaxMintIndex(uint256 _Index) external onlyOwner { MaxMintIndex = _Index; } function setSaleStage(uint256 _SaleStage, uint256 _price, uint256 _endIndex) external onlyOwner { saleStage = _SaleStage; NFT_PRICE = _price; EndRoundMintIndex = _endIndex; } function setPublicSaleKey(uint256 _PublicSaleKey) external onlyOwner { publicSaleKey = _PublicSaleKey; } /// ============ OPERATOR FILTER REGISTRY ============ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) whenTokenNotStaked(tokenId){ super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) whenTokenNotStaked(tokenId){ super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) whenTokenNotStaked(tokenId) { super.safeTransferFrom(from, to, tokenId, data); } function owner() public view override(UpdatableOperatorFilterer, Ownable) returns (address) { return Ownable.owner(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface INftCollection { /** * @dev Stake Token */ function stakeToken(uint256 tokenId) external; /** * @dev Unstake Token */ function unstakeToken(uint256 tokenId) external; /** * @dev return Token stake status */ function isTokenStaked(uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./../erc721x/contracts/ERC721X.sol"; abstract contract TokenStake is Ownable, ERC721X { using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _tokenStakers; mapping(uint256 => address) private _stakedTokens; event TokenStaked(address indexed tokenStaker, uint256 tokenId); event TokenUnstaked(address indexed tokenStaker, uint256 tokenId); event TokenRecoverUnstaked(uint256 tokenId); event BatchUpdateTokenStaked(address indexed newTokenStaker, uint256[] tokenIds); event TokenStakerAdded(address indexed tokenStaker); event TokenStakerRemoved(address indexed tokenStaker); modifier tokenStakersOnly() { require(_tokenStakers.contains(_msgSender()), "TokenStake: Not staker"); _; } modifier whenTokenNotStaked(uint256 tokenId) { require(_stakedTokens[tokenId] == address(0), "TokenStake: Token is staked"); _; } modifier whenTokenStaked(uint256 tokenId) { require(_stakedTokens[tokenId] != address(0), "TokenStake: Token is not staked"); _; } /** * @notice Returns `true` if token is staked and can't be transfered */ function isTokenStaked(uint256 tokenId) public view returns (bool) { return _stakedTokens[tokenId] != address(0); } /** * @notice Returns the address of the staker for a specific `tokenId`` * Returns 0x0 if token is not staked */ function stakerForToken(uint256 tokenId) public view returns (address) { return _stakedTokens[tokenId]; } /** * @notice Lock a token for staking * only callable by members of the `tokenStakers` list * The owner of the token must approve the staking contract prior to call this method */ function stakeToken(uint256 tokenId) external tokenStakersOnly whenTokenNotStaked(tokenId) { require(_isApprovedOrOwner(_msgSender(), tokenId), "TokenStake: Staker not approved"); _stakedTokens[tokenId] = _msgSender(); emit TokenStaked(_msgSender(), tokenId); } /** * @notice Lock a token for staking * only callable by the staker */ function unstakeToken(uint256 tokenId) external whenTokenStaked(tokenId) { require(_msgSender() == _stakedTokens[tokenId], "TokenStake: Token not stake by account"); require(_msgSender() != address(0), "TokenStake: can't unstake from zero address"); _stakedTokens[tokenId] = address(0); emit TokenUnstaked(_msgSender(), tokenId); } /** * @notice Recover a staked token * only callable by the owner */ function recoverStakeToken(uint256 tokenId) external onlyOwner whenTokenStaked(tokenId) { _stakedTokens[tokenId] = address(0); emit TokenRecoverUnstaked(tokenId); } /** * @dev Change the token staker for a list of tokenIds * only callable by the owner * this is usefull if the staker contract must be updated * if `newStaker` is set to 0x0, tokens will be unstaked */ function batchUpdateTokenStake(address newStaker, uint256[] calldata tokenIds) external onlyOwner { for (uint256 i = 0; i < tokenIds.length; i++) { require(_stakedTokens[tokenIds[i]] != address(0), "TokenStake: not restakeable"); if (newStaker != address(0)) { require(_isApprovedOrOwner(newStaker, tokenIds[i]), "TokenStake: Staker not approved"); } _stakedTokens[tokenIds[i]] = newStaker; } emit BatchUpdateTokenStaked(newStaker, tokenIds); } /** * @dev returns true if `account` is a member of the staker group */ function isTokenStaker(address account) public view returns (bool) { return _tokenStakers.contains(account); } /** * @dev Add `tokenStaker` to the list of allowed stakers * only callable by the owner */ function addTokenStaker(address tokenStaker) external onlyOwner { require(!_tokenStakers.contains(tokenStaker), "TokenStake: Already TokenStaker"); _tokenStakers.add(tokenStaker); emit TokenStakerAdded(tokenStaker); } /** * @dev Remove `tokenStaker` from the list of allowed stakers * only callable by the owner */ function removeTokenStaker(address tokenStaker) external onlyOwner { require(_tokenStakers.contains(tokenStaker), "TokenStake: Not TokenStaker"); _tokenStakers.remove(tokenStaker); emit TokenStakerRemoved(tokenStaker); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128. * * Does not support burning tokens to address(0). */ contract ERC721X is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint64 balance; uint64 numberMinted; } uint256 private currentIndex = 0; uint256 private burnedIndex = 0; uint256 internal collectionSize; uint256 internal maxBatchSize; // 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 ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev * `maxBatchSize` refers to how much a minter can mint at a time. * `collectionSize_` refers to how many tokens are in the collection. */ constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { require(collectionSize_ > 0, "ERC721X: collection must have a nonzero supply"); require(maxBatchSize_ > 0, "ERC721X: max batch size must be nonzero"); _name = name_; _symbol = symbol_; maxBatchSize = maxBatchSize_; collectionSize = collectionSize_; } /** * @dev See Remove store data in IERC721Enumerable {IERC721Enumerable-totalSupply}. */ function totalSupply() public view returns (uint256) { return currentIndex - burnedIndex; } /** * @dev See Remove store data in IERC721Enumerable {IERC721Enumerable-totalSupply}. */ function setCollectionSize(uint256 _collectionSize) internal { collectionSize = _collectionSize; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721X: balance query for the zero address"); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require(owner != address(0), "ERC721X: number minted query for the zero address"); return uint256(_addressData[owner].numberMinted); } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { require(_exists(tokenId), "ERC721X: owner query for nonexistent token"); uint256 lowestTokenToCheck; if (tokenId >= maxBatchSize) { lowestTokenToCheck = tokenId - maxBatchSize + 1; } for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } revert("ERC721X: unable to determine the owner of token"); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")): ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721X.ownerOf(tokenId); require(to != owner, "ERC721X: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),"ERC721X: approve caller is not owner nor approved for all"); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), "ERC721X: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721X: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool){ return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721X: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < currentIndex; } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721X: operator query for nonexistent token"); TokenOwnership memory prevOwnership = ownershipOf(tokenId); return(spender == prevOwnership.addr || getApproved(tokenId) == spender || isApprovedForAll(prevOwnership.addr, spender)); //return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - there must be `quantity` tokens remaining unminted in the total collection. * - `to` cannot be the zero address. * - `quantity` cannot be larger than the max batch size. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = currentIndex; require(to != address(0), "ERC721X: mint to the zero address"); require(!_exists(startTokenId), "ERC721X: token already minted"); require(quantity <= maxBatchSize, "ERC721X: quantity to mint over than max batch size"); _beforeTokenTransfers(address(0), to, startTokenId, quantity); unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp)); uint256 updatedIndex = startTokenId; for (uint256 i = 0; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); require(_checkOnERC721Received(address(0), to, updatedIndex, _data), "ERC721X: transfer to non ERC721Receiver implementer"); updatedIndex++; } currentIndex = updatedIndex; _afterTokenTransfers(address(0), to, startTokenId, quantity); } } /** * @dev burn function Transfers `tokenId` from `from` to `unused address`. * * Requirements: * * - `to` cannot be the zero address and fix to unused address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _burn( address from, uint256 tokenId ) internal virtual { address to = 0x000000000000000000000000000000000000dEaD; TokenOwnership memory prevOwnership = ownershipOf(tokenId); //bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || //getApproved(tokenId) == _msgSender() || //isApprovedForAll(prevOwnership.addr, _msgSender())); require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721X: burn caller is not owner nor approved"); require(prevOwnership.addr == from, "ERC721X: burn from incorrect owner"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp)); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId] = TokenOwnership( prevOwnership.addr, prevOwnership.startTimestamp ); } } emit Transfer(from, to, tokenId); burnedIndex++; _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { TokenOwnership memory prevOwnership = ownershipOf(tokenId); //bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || //getApproved(tokenId) == _msgSender() || //isApprovedForAll(prevOwnership.addr, _msgSender())); require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721X: transfer caller is not owner nor approved"); require(prevOwnership.addr == from, "ERC721X: transfer from incorrect owner"); require(to != address(0), "ERC721X: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp)); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId] = TokenOwnership( prevOwnership.addr, prevOwnership.startTimestamp ); } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } uint256 public nextOwnerToExplicitlySet = 0; /** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet; require(quantity > 0, "quantity must be nonzero"); uint256 endIndex = oldNextOwnerToSet + quantity - 1; if (endIndex > collectionSize - 1) { endIndex = collectionSize - 1; } // We know if the last one in the group exists, all in the group exist, due to serial ordering. require(_exists(endIndex), "not enough minted yet for this cleanup"); for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) { if (_ownerships[i].addr == address(0)) { TokenOwnership memory ownership = ownershipOf(i); _ownerships[i] = TokenOwnership( ownership.addr, ownership.startTimestamp ); } } nextOwnerToExplicitlySet = endIndex + 1; } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721X: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * 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`. */ 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. * * 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` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {RevokableOperatorFilterer} from "./RevokableOperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION, CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title RevokableDefaultOperatorFilterer * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription. * Note that OpenSea will disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() RevokableOperatorFilterer(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS, CANONICAL_CORI_SUBSCRIPTION, true) {} }
// 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 earnings 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 { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); /// @dev Emitted when someone other than the owner is trying to call an only owner function. error OnlyOwner(); event OperatorFilterRegistryAddressUpdated(address newRegistry); IOperatorFilterRegistry public operatorFilterRegistry; /// @dev The constructor that is called when the contract is being deployed. 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)); } } } } /** * @dev A helper function to check if the operator is allowed. */ 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); } _; } /** * @dev A helper function to check if the operator approval is allowed. */ 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); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract. */ function owner() public view virtual returns (address); /** * @dev A helper function to check if the operator is allowed. */ 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) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!registry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// 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 earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer { /// @dev Emitted when the registry has already been revoked. error RegistryHasBeenRevoked(); /// @dev Emitted when the initial registry address is attempted to be set to the zero address. error InitialRegistryAddressCannotBeZeroAddress(); event OperatorFilterRegistryRevoked(); bool public isOperatorFilterRegistryRevoked; /// @dev The constructor that is called when the contract is being deployed. 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(); } } /** * @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); emit OperatorFilterRegistryAddressUpdated(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; emit OperatorFilterRegistryRevoked(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_CallerPublicSaleKey","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InitialRegistryAddressCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"RegistryHasBeenRevoked","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":"address","name":"newTokenStaker","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BatchUpdateTokenStaked","type":"event"},{"anonymous":false,"inputs":[],"name":"LockMaxSupply","type":"event"},{"anonymous":false,"inputs":[],"name":"LockMetadata","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRegistry","type":"address"}],"name":"OperatorFilterRegistryAddressUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"OperatorFilterRegistryRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenRecoverUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"}],"name":"TokenStakerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"}],"name":"TokenStakerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CurrentMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EndRoundMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TokenDecimal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenStaker","type":"address"}],"name":"addTokenStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newStaker","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchUpdateTokenStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"isMaxSupplyLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperatorFilterRegistryRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTokenStaker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_CallerPublicSaleKey","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address[]","name":"_accounts","type":"address[]"},{"internalType":"uint256[]","name":"_quantity","type":"uint256[]"}],"name":"ownerMintBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"recoverStakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenStaker","type":"address"}],"name":"removeTokenStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalties","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltiesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"royaltyAmount","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":"saleStage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setCurrentMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setEndRoundMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setMaxMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_PublicSaleKey","type":"uint256"}],"name":"setPublicSaleKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royalties","type":"address"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setRoyaltiesPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_SaleStage","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_endIndex","type":"uint256"}],"name":"setSaleStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenDecimal","type":"uint256"}],"name":"setTokenDecimal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_address","type":"address"}],"name":"setUSDTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakerForToken","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":[],"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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawWallet1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawWallet2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c0604052600060028190556003819055600c8190556102bc60125560c8601355612710601755620f42406018556019819055601b5560fa601c55610190601d55734da56c7c284d56094b21fcc56888beeacac5336560805273ac488462d5ed9a904842e8946290698694b2391f60a0523480156200007d57600080fd5b506040516200451038038062004510833981016040819052620000a091620003ee565b604080518082018252600a808252694d656d655768616c657360b01b6020808401919091528351808501909452908352694d454d455748414c455360b01b90830152601354601254600080546001600160a01b0319166daaeb6d7670e522a718067333cd4e908117909155929392733cc6cdda760b79bafa08df41ecfa224f810dceb6600182828282803b1562000243578115620001a257604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b600060405180830381600087803b1580156200018357600080fd5b505af115801562000198573d6000803e3d6000fd5b5050505062000243565b6001600160a01b03831615620001e75760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af29039060440162000168565b604051632210724360e11b81523060048201526001600160a01b03821690634420e48690602401600060405180830381600087803b1580156200022957600080fd5b505af11580156200023e573d6000803e3d6000fd5b505050505b5050506001600160a01b0384169050620002705760405163c49d17ad60e01b815260040160405180910390fd5b5050506200028d620002876200039860201b60201c565b6200039c565b60008111620002fa5760405162461bcd60e51b815260206004820152602e60248201527f455243373231583a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b600082116200035c5760405162461bcd60e51b815260206004820152602760248201527f455243373231583a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b6064820152608401620002f1565b60066200036a8582620004ad565b506007620003798482620004ad565b506005919091556004555050600d805460ff19169055601a5562000579565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200040157600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200043357607f821691505b6020821081036200045457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004a857600081815260208120601f850160051c81016020861015620004835750805b601f850160051c820191505b81811015620004a4578281556001016200048f565b5050505b505050565b81516001600160401b03811115620004c957620004c962000408565b620004e181620004da84546200041e565b846200045a565b602080601f831160018114620005195760008415620005005750858301515b600019600386901b1c1916600185901b178555620004a4565b600085815260208120601f198616915b828110156200054a5788860151825594840194600190910190840162000529565b5085821015620005695787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a051613f63620005ad600039600081816108c7015261249d0152600081816107c301526124660152613f636000f3fe608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638456cb5911610215578063cb4644ff11610125578063ecba222a116100b8578063f2fde38b11610087578063f2fde38b1461088b578063f4a0a5281461089e578063f8d8b8d8146108b1578063fca76c26146108ba578063ffeea273146108c257600080fd5b8063ecba222a14610826578063f053dc5c1461083a578063f0a524241461084d578063f2b916c31461087857600080fd5b8063d5abeb01116100f4578063d5abeb01146107ed578063d7224ba0146107f6578063d7e45cd7146107ff578063e985e9c51461081357600080fd5b8063cb4644ff14610798578063cda6b847146107ab578063ce3be6bb146107be578063d547cfb7146107e557600080fd5b8063a969d1de116101a8578063b8d1e53211610177578063b8d1e53214610742578063b8ffc96214610755578063c54e44eb14610769578063c87b56dd1461077c578063cafa8dfe1461078f57600080fd5b8063a969d1de14610700578063b0916f0314610709578063b0ccc31e1461071c578063b88d4fde1461072f57600080fd5b80639466d206116101e45780639466d206146106ca57806395d89b41146106dd578063989bdbb6146106e5578063a22cb465146106ed57600080fd5b80638456cb591461069f578063853828b6146106a75780638da5cb5b146106af5780638db29eb2146106b757600080fd5b80633ba230b11161031057806355f804b3116102a35780636352211e116102725780636352211e14610655578063676dd563146106685780636f8b44b01461067157806370a0823114610684578063715018a61461069757600080fd5b806355f804b31461061c5780635c975abb1461062f5780635ec73fdc1461063a5780635ef9432a1461064d57600080fd5b806342842e0e116102df57806342842e0e146105da5780634aaca86d146105ed5780634f1afc4e146105f657806355eba8681461060957600080fd5b80633ba230b11461058d5780633cda6147146105a05780633f4ba83a146105a95780634125062c146105b157600080fd5b806323b872dd116103935780632cfb6688116103625780632cfb6688146105385780632e1a7d4d1461054b57806330581d8a1461055e578063396f650d146105715780633a07e8401461058457600080fd5b806323b872dd146104cd5780632a09f2f2146104e05780632a55205a146104f35780632a9e63c61461052557600080fd5b80630cd9c899116103cf5780630cd9c8991461047e5780631134cfff1461049157806318160ddd146104a45780631b2ef1ca146104ba57600080fd5b806301ffc9a71461040157806306fdde0314610429578063081812fc1461043e578063095ea7b314610469575b600080fd5b61041461040f3660046135a2565b6108e9565b60405190151581526020015b60405180910390f35b61043161093b565b604051610420919061360f565b61045161044c366004613622565b6109cd565b6040516001600160a01b039091168152602001610420565b61047c610477366004613650565b610a5d565b005b61041461048c36600461367c565b610a76565b61047c61049f366004613622565b610a83565b6104ac610a90565b604051908152602001610420565b61047c6104c8366004613699565b610aa7565b61047c6104db3660046136bb565b610e7f565b61047c6104ee366004613622565b610ee2565b610506610501366004613699565b610eef565b604080516001600160a01b039093168352602083019190915201610420565b61047c61053336600461367c565b610f22565b61047c610546366004613622565b610f4c565b61047c610559366004613622565b6110f4565b61047c61056c366004613622565b611108565b61047c61057f36600461367c565b611115565b6104ac601d5481565b61047c61059b366004613622565b6111b8565b6104ac601b5481565b61047c6111c5565b6104516105bf366004613622565b6000908152601060205260409020546001600160a01b031690565b61047c6105e83660046136bb565b6111d7565b6104ac60195481565b61047c6106043660046136fc565b611233565b61047c61061736600461367c565b611249565b61047c61062a3660046137c5565b611273565b600d5460ff16610414565b61047c61064836600461389b565b6112e5565b61047c611437565b610451610663366004613622565b6114da565b6104ac60175481565b61047c61067f366004613622565b6114ec565b6104ac61069236600461367c565b61155c565b61047c6115ed565b61047c6115ff565b61047c61160f565b61045161168a565b61047c6106c5366004613622565b61169e565b61047c6106d8366004613622565b6116ab565b6104316116b8565b61047c6116c7565b61047c6106fb36600461396a565b6117ac565b6104ac60185481565b61047c610717366004613622565b6117c0565b600054610451906001600160a01b031681565b61047c61073d3660046139a3565b611888565b61047c61075036600461367c565b6118ed565b60115461041490600160a81b900460ff1681565b601154610451906001600160a01b031681565b61043161078a366004613622565b6119a5565b6104ac60165481565b61047c6107a636600461367c565b611a4c565b61047c6107b9366004613622565b611aee565b6104517f000000000000000000000000000000000000000000000000000000000000000081565b610431611c1e565b6104ac60125481565b6104ac600c5481565b60115461041490600160a01b900460ff1681565b610414610821366004613a22565b611cac565b60005461041490600160a01b900460ff1681565b601554610451906001600160a01b031681565b61041461085b366004613622565b6000908152601060205260409020546001600160a01b0316151590565b61047c610886366004613a50565b611cda565b61047c61089936600461367c565b611e9d565b61047c6108ac366004613622565b611f13565b6104ac601c5481565b61047c611f20565b6104517f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b031982166380ac58cd60e01b148061091a57506001600160e01b03198216635b5e139f60e01b145b8061093557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606006805461094a90613ad7565b80601f016020809104026020016040519081016040528092919081815260200182805461097690613ad7565b80156109c35780601f10610998576101008083540402835291602001916109c3565b820191906000526020600020905b8154815290600101906020018083116109a657829003601f168201915b5050505050905090565b60006109da826002541190565b610a415760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b81610a6781611ffe565b610a7183836120c0565b505050565b6000610935600e836121d2565b610a8b6121f7565b601c55565b6000600354600254610aa29190613b27565b905090565b323314610af65760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610a38565b610afe612256565b6011546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6b9190613b3a565b9050600083601854601754610b809190613b53565b610b8a9190613b53565b9050601254610ba185610b9b610a90565b9061229c565b1115610beb5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610a38565b601d54610bfa85610b9b610a90565b1115610c545760405162461bcd60e51b8152602060048201526024808201527f546f74616c20737570706c792072656163686564206d6178206d696e7420737560448201526370706c7960e01b6064820152608401610a38565b601c54610c6385610b9b610a90565b1115610cb15760405162461bcd60e51b815260206004820181905260248201527f596f7572207175616e74697479206973206f766572207468616e206c696d69746044820152606401610a38565b82601a5414610d105760405162461bcd60e51b815260206004820152602560248201527f43616c6c6564207769746820696e636f7272656374207075626c69632073616c60448201526465206b657960d81b6064820152608401610a38565b81811115610d605760405162461bcd60e51b815260206004820152601a60248201527f557365722062616c616e6365206973206e6f7420656e6f7567680000000000006044820152606401610a38565b600060195411610db25760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e746044820152606401610a38565b601c5484601b54610dc39190613b6a565b1115610e1b5760405162461bcd60e51b815260206004820152602160248201527f537570706c79206f76657220746865207377617020737570706c79206c696d696044820152601d60fa1b6064820152608401610a38565b601154610e33906001600160a01b03163330846122a8565b336000908152601e6020526040902054610e4e908590613b6a565b336000908152601e6020526040902055601b54610e6c908590613b6a565b601b55610e793385612313565b50505050565b826001600160a01b0381163314610e9957610e9933611ffe565b60008281526010602052604090205482906001600160a01b031615610ed05760405162461bcd60e51b8152600401610a3890613b7d565b610edb85858561232d565b5050505050565b610eea6121f7565b601a55565b600080601654606484610f029190613bb4565b610f0c9190613b53565b6015546001600160a01b03169590945092505050565b610f2a6121f7565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526010602052604090205481906001600160a01b0316610fb25760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610a38565b6000828152601060205260409020546001600160a01b0316336001600160a01b0316146110305760405162461bcd60e51b815260206004820152602660248201527f546f6b656e5374616b653a20546f6b656e206e6f74207374616b65206279206160448201526518d8dbdd5b9d60d21b6064820152608401610a38565b336110915760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e5374616b653a2063616e277420756e7374616b652066726f6d207a60448201526a65726f206164647265737360a81b6064820152608401610a38565b600082815260106020526040902080546001600160a01b0319169055336001600160a01b03167ff0dbb2abe50e936f0d3720a39c0debe7706007b2c50286a913f24298e9be36ba836040516110e891815260200190565b60405180910390a25050565b6110fc6121f7565b61110581612338565b50565b6111106121f7565b601855565b61111d6121f7565b611128600e826121d2565b156111755760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20416c726561647920546f6b656e5374616b6572006044820152606401610a38565b611180600e826124fa565b506040516001600160a01b038216907fb0d0a630f2db36143e1613d24b818312e1b0f13888e8dae939d016cc81c1c91490600090a250565b6111c06121f7565b601b55565b6111cd6121f7565b6111d561250f565b565b826001600160a01b03811633146111f1576111f133611ffe565b60008281526010602052604090205482906001600160a01b0316156112285760405162461bcd60e51b8152600401610a3890613b7d565b610edb858585612561565b61123b6121f7565b601992909255601755601c55565b6112516121f7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b61127b6121f7565b601154600160a01b900460ff16156112d55760405162461bcd60e51b815260206004820152601e60248201527f4f7065726174696f6e733a20436f6e7472616374206973206c6f636b656400006044820152606401610a38565b60146112e18282613c1c565b5050565b6112ed6121f7565b805182511461133e5760405162461bcd60e51b815260206004820152601c60248201527f617272617973206d75737420686176652073616d65206c656e677468000000006044820152606401610a38565b60005b8251811015610a715760125461137283838151811061136257611362613cdb565b6020026020010151610b9b610a90565b11156113bc5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610a38565b8181815181106113ce576113ce613cdb565b6020026020010151601b546113e39190613b6a565b601b819055506114258382815181106113fe576113fe613cdb565b602002602001015183838151811061141857611418613cdb565b6020026020010151612313565b8061142f81613cf1565b915050611341565b61143f61168a565b6001600160a01b0316336001600160a01b03161461147057604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561149b57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a81b031916600160a01b1781556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad169190a1565b60006114e58261257c565b5192915050565b6114f46121f7565b601154600160a81b900460ff161561154e5760405162461bcd60e51b815260206004820181905260248201527f4f7065726174696f6e733a204d617820737570706c79206973206c6f636b65646044820152606401610a38565b61155781600455565b601255565b60006001600160a01b0382166115c85760405162461bcd60e51b815260206004820152602b60248201527f455243373231583a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610a38565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b6115f56121f7565b6111d560006126ea565b6116076121f7565b6111d561273c565b6116176121f7565b6011546040516370a0823160e01b81523060048201526111d5916001600160a01b0316906370a0823190602401602060405180830381865afa158015611661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116859190613b3a565b612338565b6000610aa26001546001600160a01b031690565b6116a66121f7565b601d55565b6116b36121f7565b601655565b60606007805461094a90613ad7565b6116cf6121f7565b601154600160a01b900460ff161561171e5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610a38565b60006014805461172d90613ad7565b90501161176e5760405162461bcd60e51b815260206004820152600f60248201526e10985cd9555c9a481b9bdd081cd95d608a1b6044820152606401610a38565b6011805460ff60a01b1916600160a01b1790556040517f95a231e0e633252fd44273c53079a71e951df22e856f058d0114c54c6430e81c90600090a1565b816117b681611ffe565b610a718383612779565b6117c86121f7565b60008181526010602052604090205481906001600160a01b031661182e5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610a38565b6000828152601060205260409081902080546001600160a01b0319169055517f27862ebdcaf1c94ba2342cdeb5d6c140b8fde6b95a3921802445834577312ef49061187c9084815260200190565b60405180910390a15050565b836001600160a01b03811633146118a2576118a233611ffe565b60008381526010602052604090205483906001600160a01b0316156118d95760405162461bcd60e51b8152600401610a3890613b7d565b6118e58686868661283d565b505050505050565b6118f561168a565b6001600160a01b0316336001600160a01b03161461192657604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561195157604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b60606119b2826002541190565b6119f05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610a38565b6000601480546119ff90613ad7565b905011611a1b5760405180602001604052806000815250610935565b6014611a2683612870565b604051602001611a37929190613d0a565b60405160208183030381529060405292915050565b611a546121f7565b611a5f600e826121d2565b611aab5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a204e6f7420546f6b656e5374616b657200000000006044820152606401610a38565b611ab6600e82612902565b506040516001600160a01b038216907f1d1e5fd08acb9bc25c0dd45c0561cfb6e086312e6960eb801333c3ae19eda07c90600090a250565b611af9600e336121d2565b611b3e5760405162461bcd60e51b81526020600482015260166024820152752a37b5b2b729ba30b5b29d102737ba1039ba30b5b2b960511b6044820152606401610a38565b60008181526010602052604090205481906001600160a01b031615611b755760405162461bcd60e51b8152600401610a3890613b7d565b611b80335b83612917565b611bcc5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610a38565b60008281526010602090815260409182902080546001600160a01b0319163390811790915591518481527f1fdab8a8457aaf782e4b6217d6ffa6f5006eda7e50922dd092b2e1524275d77491016110e8565b60148054611c2b90613ad7565b80601f0160208091040260200160405190810160405280929190818152602001828054611c5790613ad7565b8015611ca45780601f10611c7957610100808354040283529160200191611ca4565b820191906000526020600020905b815481529060010190602001808311611c8757829003601f168201915b505050505081565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b611ce26121f7565b60005b81811015611e54576000601081858585818110611d0457611d04613cdb565b60209081029290920135835250810191909152604001600020546001600160a01b031603611d745760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a206e6f742072657374616b6561626c6500000000006044820152606401610a38565b6001600160a01b03841615611df157611da584848484818110611d9957611d99613cdb565b90506020020135612917565b611df15760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610a38565b8360106000858585818110611e0857611e08613cdb565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508080611e4c90613cf1565b915050611ce5565b50826001600160a01b03167f43b05a7e48dc5c22c2f56fa403cb8271d8a4e97f09548d2161cdd7bb3f9c7cbc8383604051611e90929190613da1565b60405180910390a2505050565b611ea56121f7565b6001600160a01b038116611f0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a38565b611105816126ea565b611f1b6121f7565b601755565b611f286121f7565b601154600160a81b900460ff1615611f795760405162461bcd60e51b815260206004820152601460248201527313585e081cdd5c1c1b1e481a5cc81b1bd8dad95960621b6044820152606401610a38565b600060125411611fc05760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481b9bdd081cd95d60721b6044820152606401610a38565b6011805460ff60a81b1916600160a81b1790556040517fcb05127102e959540e425cdbe8127c6ae5cdff90f0ba6763e98b7ddc818f7fb890600090a1565b6000546001600160a01b0316801580159061202357506000816001600160a01b03163b115b156112e157604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015612074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120989190613dda565b6112e157604051633b79c77360e21b81526001600160a01b0383166004820152602401610a38565b60006120cb826114da565b9050806001600160a01b0316836001600160a01b0316036121395760405162461bcd60e51b815260206004820152602260248201527f455243373231583a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610a38565b336001600160a01b038216148061215557506121558133611cac565b6121c75760405162461bcd60e51b815260206004820152603960248201527f455243373231583a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610a38565b610a718383836129ea565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b3361220061168a565b6001600160a01b0316146111d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a38565b600d5460ff16156111d55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a38565b60006121f08284613b6a565b6040516001600160a01b0380851660248301528316604482015260648101829052610e799085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612a46565b6112e1828260405180602001604052806000815250612b1b565b610a71838383612d7b565b6011546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a49190613b3a565b8111156123e65760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b6044820152606401610a38565b600081116124255760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610a38565b600061243d60646124378460326130b6565b906130c2565b9050600061245160646124378560326130b6565b60115490915061248b906001600160a01b03167f0000000000000000000000000000000000000000000000000000000000000000846130ce565b6011546124c2906001600160a01b03167f0000000000000000000000000000000000000000000000000000000000000000836130ce565b6040518381527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a1505050565b60006121f0836001600160a01b0384166130fe565b61251761314d565b600d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a7183838360405180602001604052806000815250611888565b604080518082019091526000808252602082015261259b826002541190565b6125fa5760405162461bcd60e51b815260206004820152602a60248201527f455243373231583a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610a38565b60006005548310612620576005546126129084613b27565b61261d906001613b6a565b90505b825b818110612689576000818152600860209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561267657949350505050565b508061268181613df7565b915050612622565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231583a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610a38565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612744612256565b600d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125443390565b336001600160a01b038316036127d15760405162461bcd60e51b815260206004820152601a60248201527f455243373231583a20617070726f766520746f2063616c6c65720000000000006044820152606401610a38565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612848848484612d7b565b61285484848484613196565b610e795760405162461bcd60e51b8152600401610a3890613e0e565b6060600061287d83613297565b60010190506000816001600160401b0381111561289c5761289c613728565b6040519080825280601f01601f1916602001820160405280156128c6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846128d057509392505050565b60006121f0836001600160a01b03841661336f565b6000612924826002541190565b6129865760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a206f70657261746f7220717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610a38565b60006129918361257c565b905080600001516001600160a01b0316846001600160a01b031614806129d05750836001600160a01b03166129c5846109cd565b6001600160a01b0316145b806129e2575080516129e29085611cac565b949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612a9b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134699092919063ffffffff16565b9050805160001480612abc575080806020019051810190612abc9190613dda565b610a715760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a38565b6002546001600160a01b038416612b7e5760405162461bcd60e51b815260206004820152602160248201527f455243373231583a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610a38565b612b89816002541190565b15612bd65760405162461bcd60e51b815260206004820152601d60248201527f455243373231583a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610a38565b600554831115612c435760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207175616e7469747920746f206d696e74206f766572207460448201527168616e206d61782062617463682073697a6560701b6064820152608401610a38565b6001600160a01b0380851660008181526009602090815260408083208054680100000000000000006001600160401b038083168c01811667ffffffffffffffff198416811783900482168d0182169092026fffffffffffffffffffffffffffffffff1990931690911791909117909155815180830183529485524281168584019081528785526008909352908320935184549251909116600160a01b026001600160e01b031990921694169390931792909217905581905b84811015612d705760405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612d486000878487613196565b612d645760405162461bcd60e51b8152600401610a3890613e0e565b60019182019101612cfb565b506002819055610edb565b6000612d868261257c565b9050612d9133611b7a565b612df85760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610a38565b836001600160a01b031681600001516001600160a01b031614612e6c5760405162461bcd60e51b815260206004820152602660248201527f455243373231583a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610a38565b6001600160a01b038316612ed05760405162461bcd60e51b815260206004820152602560248201527f455243373231583a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a38565b612ee060008383600001516129ea565b6001600160a01b0384166000908152600960205260408120805460019290612f129084906001600160401b0316613e61565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b03851660009081526009602052604081208054600194509092612f5e91859116613e81565b82546101009290920a6001600160401b038181021990931691831602179091556040805180820182526001600160a01b03878116825242841660208084019182526000898152600890915293842092518354915192166001600160e01b031990911617600160a01b9190941602929092179091559050612fdf836001613b6a565b6000818152600860205260409020549091506001600160a01b031661307057613009816002541190565b156130705760408051808201825283516001600160a01b0390811682526020808601516001600160401b039081168285019081526000878152600890935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610edb565b60006121f08284613b53565b60006121f08284613bb4565b6040516001600160a01b038316602482015260448101829052610a7190849063a9059cbb60e01b906064016122dc565b600081815260018301602052604081205461314557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610935565b506000610935565b600d5460ff166111d55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a38565b60006001600160a01b0384163b1561328c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131da903390899088908890600401613ea1565b6020604051808303816000875af1925050508015613215575060408051601f3d908101601f1916820190925261321291810190613ede565b60015b613272573d808015613243576040519150601f19603f3d011682016040523d82523d6000602084013e613248565b606091505b50805160000361326a5760405162461bcd60e51b8152600401610a3890613e0e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506129e2565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106132d65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613302576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061332057662386f26fc10000830492506010015b6305f5e1008310613338576305f5e100830492506008015b612710831061334c57612710830492506004015b6064831061335e576064830492506002015b600a83106109355760010192915050565b60008181526001830160205260408120548015613458576000613393600183613b27565b85549091506000906133a790600190613b27565b905081811461340c5760008660000182815481106133c7576133c7613cdb565b90600052602060002001549050808760000184815481106133ea576133ea613cdb565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061341d5761341d613efb565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610935565b6000915050610935565b5092915050565b60606129e2848460008585600080866001600160a01b031685876040516134909190613f11565b60006040518083038185875af1925050503d80600081146134cd576040519150601f19603f3d011682016040523d82523d6000602084013e6134d2565b606091505b50915091506134e3878383876134ee565b979650505050505050565b6060831561355d578251600003613556576001600160a01b0385163b6135565760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a38565b50816129e2565b6129e283838151156135725781518083602001fd5b8060405162461bcd60e51b8152600401610a38919061360f565b6001600160e01b03198116811461110557600080fd5b6000602082840312156135b457600080fd5b81356121f08161358c565b60005b838110156135da5781810151838201526020016135c2565b50506000910152565b600081518084526135fb8160208601602086016135bf565b601f01601f19169290920160200192915050565b6020815260006121f060208301846135e3565b60006020828403121561363457600080fd5b5035919050565b6001600160a01b038116811461110557600080fd5b6000806040838503121561366357600080fd5b823561366e8161363b565b946020939093013593505050565b60006020828403121561368e57600080fd5b81356121f08161363b565b600080604083850312156136ac57600080fd5b50508035926020909101359150565b6000806000606084860312156136d057600080fd5b83356136db8161363b565b925060208401356136eb8161363b565b929592945050506040919091013590565b60008060006060848603121561371157600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561376657613766613728565b604052919050565b60006001600160401b0383111561378757613787613728565b61379a601f8401601f191660200161373e565b90508281528383830111156137ae57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156137d757600080fd5b81356001600160401b038111156137ed57600080fd5b8201601f810184136137fe57600080fd5b6129e28482356020840161376e565b60006001600160401b0382111561382657613826613728565b5060051b60200190565b600082601f83011261384157600080fd5b813560206138566138518361380d565b61373e565b82815260059290921b8401810191818101908684111561387557600080fd5b8286015b848110156138905780358352918301918301613879565b509695505050505050565b600080604083850312156138ae57600080fd5b82356001600160401b03808211156138c557600080fd5b818501915085601f8301126138d957600080fd5b813560206138e96138518361380d565b82815260059290921b8401810191818101908984111561390857600080fd5b948201945b8386101561392f5785356139208161363b565b8252948201949082019061390d565b9650508601359250508082111561394557600080fd5b5061395285828601613830565b9150509250929050565b801515811461110557600080fd5b6000806040838503121561397d57600080fd5b82356139888161363b565b915060208301356139988161395c565b809150509250929050565b600080600080608085870312156139b957600080fd5b84356139c48161363b565b935060208501356139d48161363b565b92506040850135915060608501356001600160401b038111156139f657600080fd5b8501601f81018713613a0757600080fd5b613a168782356020840161376e565b91505092959194509250565b60008060408385031215613a3557600080fd5b8235613a408161363b565b915060208301356139988161363b565b600080600060408486031215613a6557600080fd5b8335613a708161363b565b925060208401356001600160401b0380821115613a8c57600080fd5b818601915086601f830112613aa057600080fd5b813581811115613aaf57600080fd5b8760208260051b8501011115613ac457600080fd5b6020830194508093505050509250925092565b600181811c90821680613aeb57607f821691505b602082108103613b0b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561093557610935613b11565b600060208284031215613b4c57600080fd5b5051919050565b808202811582820484141761093557610935613b11565b8082018082111561093557610935613b11565b6020808252601b908201527f546f6b656e5374616b653a20546f6b656e206973207374616b65640000000000604082015260600190565b600082613bd157634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610a7157600081815260208120601f850160051c81016020861015613bfd5750805b601f850160051c820191505b818110156118e557828155600101613c09565b81516001600160401b03811115613c3557613c35613728565b613c4981613c438454613ad7565b84613bd6565b602080601f831160018114613c7e5760008415613c665750858301515b600019600386901b1c1916600185901b1785556118e5565b600085815260208120601f198616915b82811015613cad57888601518255948401946001909101908401613c8e565b5085821015613ccb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060018201613d0357613d03613b11565b5060010190565b6000808454613d1881613ad7565b60018281168015613d305760018114613d4557613d74565b60ff1984168752821515830287019450613d74565b8860005260208060002060005b85811015613d6b5781548a820152908401908201613d52565b50505082870194505b505050508351613d888183602088016135bf565b64173539b7b760d91b9101908152600501949350505050565b6020808252810182905260006001600160fb1b03831115613dc157600080fd5b8260051b80856040850137919091016040019392505050565b600060208284031215613dec57600080fd5b81516121f08161395c565b600081613e0657613e06613b11565b506000190190565b60208082526033908201527f455243373231583a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6001600160401b0382811682821603908082111561346257613462613b11565b6001600160401b0381811683821601908082111561346257613462613b11565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ed4908301846135e3565b9695505050505050565b600060208284031215613ef057600080fd5b81516121f08161358c565b634e487b7160e01b600052603160045260246000fd5b60008251613f238184602087016135bf565b919091019291505056fea26469706673582212200a0da45714bd4074ebbee7873b6e92985bc0c94303761aeb691834244081725f64736f6c634300081200330000000000000000000000000000000000000000000000000000002f1eb9e22c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638456cb5911610215578063cb4644ff11610125578063ecba222a116100b8578063f2fde38b11610087578063f2fde38b1461088b578063f4a0a5281461089e578063f8d8b8d8146108b1578063fca76c26146108ba578063ffeea273146108c257600080fd5b8063ecba222a14610826578063f053dc5c1461083a578063f0a524241461084d578063f2b916c31461087857600080fd5b8063d5abeb01116100f4578063d5abeb01146107ed578063d7224ba0146107f6578063d7e45cd7146107ff578063e985e9c51461081357600080fd5b8063cb4644ff14610798578063cda6b847146107ab578063ce3be6bb146107be578063d547cfb7146107e557600080fd5b8063a969d1de116101a8578063b8d1e53211610177578063b8d1e53214610742578063b8ffc96214610755578063c54e44eb14610769578063c87b56dd1461077c578063cafa8dfe1461078f57600080fd5b8063a969d1de14610700578063b0916f0314610709578063b0ccc31e1461071c578063b88d4fde1461072f57600080fd5b80639466d206116101e45780639466d206146106ca57806395d89b41146106dd578063989bdbb6146106e5578063a22cb465146106ed57600080fd5b80638456cb591461069f578063853828b6146106a75780638da5cb5b146106af5780638db29eb2146106b757600080fd5b80633ba230b11161031057806355f804b3116102a35780636352211e116102725780636352211e14610655578063676dd563146106685780636f8b44b01461067157806370a0823114610684578063715018a61461069757600080fd5b806355f804b31461061c5780635c975abb1461062f5780635ec73fdc1461063a5780635ef9432a1461064d57600080fd5b806342842e0e116102df57806342842e0e146105da5780634aaca86d146105ed5780634f1afc4e146105f657806355eba8681461060957600080fd5b80633ba230b11461058d5780633cda6147146105a05780633f4ba83a146105a95780634125062c146105b157600080fd5b806323b872dd116103935780632cfb6688116103625780632cfb6688146105385780632e1a7d4d1461054b57806330581d8a1461055e578063396f650d146105715780633a07e8401461058457600080fd5b806323b872dd146104cd5780632a09f2f2146104e05780632a55205a146104f35780632a9e63c61461052557600080fd5b80630cd9c899116103cf5780630cd9c8991461047e5780631134cfff1461049157806318160ddd146104a45780631b2ef1ca146104ba57600080fd5b806301ffc9a71461040157806306fdde0314610429578063081812fc1461043e578063095ea7b314610469575b600080fd5b61041461040f3660046135a2565b6108e9565b60405190151581526020015b60405180910390f35b61043161093b565b604051610420919061360f565b61045161044c366004613622565b6109cd565b6040516001600160a01b039091168152602001610420565b61047c610477366004613650565b610a5d565b005b61041461048c36600461367c565b610a76565b61047c61049f366004613622565b610a83565b6104ac610a90565b604051908152602001610420565b61047c6104c8366004613699565b610aa7565b61047c6104db3660046136bb565b610e7f565b61047c6104ee366004613622565b610ee2565b610506610501366004613699565b610eef565b604080516001600160a01b039093168352602083019190915201610420565b61047c61053336600461367c565b610f22565b61047c610546366004613622565b610f4c565b61047c610559366004613622565b6110f4565b61047c61056c366004613622565b611108565b61047c61057f36600461367c565b611115565b6104ac601d5481565b61047c61059b366004613622565b6111b8565b6104ac601b5481565b61047c6111c5565b6104516105bf366004613622565b6000908152601060205260409020546001600160a01b031690565b61047c6105e83660046136bb565b6111d7565b6104ac60195481565b61047c6106043660046136fc565b611233565b61047c61061736600461367c565b611249565b61047c61062a3660046137c5565b611273565b600d5460ff16610414565b61047c61064836600461389b565b6112e5565b61047c611437565b610451610663366004613622565b6114da565b6104ac60175481565b61047c61067f366004613622565b6114ec565b6104ac61069236600461367c565b61155c565b61047c6115ed565b61047c6115ff565b61047c61160f565b61045161168a565b61047c6106c5366004613622565b61169e565b61047c6106d8366004613622565b6116ab565b6104316116b8565b61047c6116c7565b61047c6106fb36600461396a565b6117ac565b6104ac60185481565b61047c610717366004613622565b6117c0565b600054610451906001600160a01b031681565b61047c61073d3660046139a3565b611888565b61047c61075036600461367c565b6118ed565b60115461041490600160a81b900460ff1681565b601154610451906001600160a01b031681565b61043161078a366004613622565b6119a5565b6104ac60165481565b61047c6107a636600461367c565b611a4c565b61047c6107b9366004613622565b611aee565b6104517f0000000000000000000000004da56c7c284d56094b21fcc56888beeacac5336581565b610431611c1e565b6104ac60125481565b6104ac600c5481565b60115461041490600160a01b900460ff1681565b610414610821366004613a22565b611cac565b60005461041490600160a01b900460ff1681565b601554610451906001600160a01b031681565b61041461085b366004613622565b6000908152601060205260409020546001600160a01b0316151590565b61047c610886366004613a50565b611cda565b61047c61089936600461367c565b611e9d565b61047c6108ac366004613622565b611f13565b6104ac601c5481565b61047c611f20565b6104517f000000000000000000000000ac488462d5ed9a904842e8946290698694b2391f81565b60006001600160e01b031982166380ac58cd60e01b148061091a57506001600160e01b03198216635b5e139f60e01b145b8061093557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606006805461094a90613ad7565b80601f016020809104026020016040519081016040528092919081815260200182805461097690613ad7565b80156109c35780601f10610998576101008083540402835291602001916109c3565b820191906000526020600020905b8154815290600101906020018083116109a657829003601f168201915b5050505050905090565b60006109da826002541190565b610a415760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b81610a6781611ffe565b610a7183836120c0565b505050565b6000610935600e836121d2565b610a8b6121f7565b601c55565b6000600354600254610aa29190613b27565b905090565b323314610af65760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610a38565b610afe612256565b6011546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6b9190613b3a565b9050600083601854601754610b809190613b53565b610b8a9190613b53565b9050601254610ba185610b9b610a90565b9061229c565b1115610beb5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610a38565b601d54610bfa85610b9b610a90565b1115610c545760405162461bcd60e51b8152602060048201526024808201527f546f74616c20737570706c792072656163686564206d6178206d696e7420737560448201526370706c7960e01b6064820152608401610a38565b601c54610c6385610b9b610a90565b1115610cb15760405162461bcd60e51b815260206004820181905260248201527f596f7572207175616e74697479206973206f766572207468616e206c696d69746044820152606401610a38565b82601a5414610d105760405162461bcd60e51b815260206004820152602560248201527f43616c6c6564207769746820696e636f7272656374207075626c69632073616c60448201526465206b657960d81b6064820152608401610a38565b81811115610d605760405162461bcd60e51b815260206004820152601a60248201527f557365722062616c616e6365206973206e6f7420656e6f7567680000000000006044820152606401610a38565b600060195411610db25760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e746044820152606401610a38565b601c5484601b54610dc39190613b6a565b1115610e1b5760405162461bcd60e51b815260206004820152602160248201527f537570706c79206f76657220746865207377617020737570706c79206c696d696044820152601d60fa1b6064820152608401610a38565b601154610e33906001600160a01b03163330846122a8565b336000908152601e6020526040902054610e4e908590613b6a565b336000908152601e6020526040902055601b54610e6c908590613b6a565b601b55610e793385612313565b50505050565b826001600160a01b0381163314610e9957610e9933611ffe565b60008281526010602052604090205482906001600160a01b031615610ed05760405162461bcd60e51b8152600401610a3890613b7d565b610edb85858561232d565b5050505050565b610eea6121f7565b601a55565b600080601654606484610f029190613bb4565b610f0c9190613b53565b6015546001600160a01b03169590945092505050565b610f2a6121f7565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526010602052604090205481906001600160a01b0316610fb25760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610a38565b6000828152601060205260409020546001600160a01b0316336001600160a01b0316146110305760405162461bcd60e51b815260206004820152602660248201527f546f6b656e5374616b653a20546f6b656e206e6f74207374616b65206279206160448201526518d8dbdd5b9d60d21b6064820152608401610a38565b336110915760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e5374616b653a2063616e277420756e7374616b652066726f6d207a60448201526a65726f206164647265737360a81b6064820152608401610a38565b600082815260106020526040902080546001600160a01b0319169055336001600160a01b03167ff0dbb2abe50e936f0d3720a39c0debe7706007b2c50286a913f24298e9be36ba836040516110e891815260200190565b60405180910390a25050565b6110fc6121f7565b61110581612338565b50565b6111106121f7565b601855565b61111d6121f7565b611128600e826121d2565b156111755760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20416c726561647920546f6b656e5374616b6572006044820152606401610a38565b611180600e826124fa565b506040516001600160a01b038216907fb0d0a630f2db36143e1613d24b818312e1b0f13888e8dae939d016cc81c1c91490600090a250565b6111c06121f7565b601b55565b6111cd6121f7565b6111d561250f565b565b826001600160a01b03811633146111f1576111f133611ffe565b60008281526010602052604090205482906001600160a01b0316156112285760405162461bcd60e51b8152600401610a3890613b7d565b610edb858585612561565b61123b6121f7565b601992909255601755601c55565b6112516121f7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b61127b6121f7565b601154600160a01b900460ff16156112d55760405162461bcd60e51b815260206004820152601e60248201527f4f7065726174696f6e733a20436f6e7472616374206973206c6f636b656400006044820152606401610a38565b60146112e18282613c1c565b5050565b6112ed6121f7565b805182511461133e5760405162461bcd60e51b815260206004820152601c60248201527f617272617973206d75737420686176652073616d65206c656e677468000000006044820152606401610a38565b60005b8251811015610a715760125461137283838151811061136257611362613cdb565b6020026020010151610b9b610a90565b11156113bc5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610a38565b8181815181106113ce576113ce613cdb565b6020026020010151601b546113e39190613b6a565b601b819055506114258382815181106113fe576113fe613cdb565b602002602001015183838151811061141857611418613cdb565b6020026020010151612313565b8061142f81613cf1565b915050611341565b61143f61168a565b6001600160a01b0316336001600160a01b03161461147057604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561149b57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a81b031916600160a01b1781556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad169190a1565b60006114e58261257c565b5192915050565b6114f46121f7565b601154600160a81b900460ff161561154e5760405162461bcd60e51b815260206004820181905260248201527f4f7065726174696f6e733a204d617820737570706c79206973206c6f636b65646044820152606401610a38565b61155781600455565b601255565b60006001600160a01b0382166115c85760405162461bcd60e51b815260206004820152602b60248201527f455243373231583a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610a38565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b6115f56121f7565b6111d560006126ea565b6116076121f7565b6111d561273c565b6116176121f7565b6011546040516370a0823160e01b81523060048201526111d5916001600160a01b0316906370a0823190602401602060405180830381865afa158015611661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116859190613b3a565b612338565b6000610aa26001546001600160a01b031690565b6116a66121f7565b601d55565b6116b36121f7565b601655565b60606007805461094a90613ad7565b6116cf6121f7565b601154600160a01b900460ff161561171e5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610a38565b60006014805461172d90613ad7565b90501161176e5760405162461bcd60e51b815260206004820152600f60248201526e10985cd9555c9a481b9bdd081cd95d608a1b6044820152606401610a38565b6011805460ff60a01b1916600160a01b1790556040517f95a231e0e633252fd44273c53079a71e951df22e856f058d0114c54c6430e81c90600090a1565b816117b681611ffe565b610a718383612779565b6117c86121f7565b60008181526010602052604090205481906001600160a01b031661182e5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610a38565b6000828152601060205260409081902080546001600160a01b0319169055517f27862ebdcaf1c94ba2342cdeb5d6c140b8fde6b95a3921802445834577312ef49061187c9084815260200190565b60405180910390a15050565b836001600160a01b03811633146118a2576118a233611ffe565b60008381526010602052604090205483906001600160a01b0316156118d95760405162461bcd60e51b8152600401610a3890613b7d565b6118e58686868661283d565b505050505050565b6118f561168a565b6001600160a01b0316336001600160a01b03161461192657604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561195157604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b60606119b2826002541190565b6119f05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610a38565b6000601480546119ff90613ad7565b905011611a1b5760405180602001604052806000815250610935565b6014611a2683612870565b604051602001611a37929190613d0a565b60405160208183030381529060405292915050565b611a546121f7565b611a5f600e826121d2565b611aab5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a204e6f7420546f6b656e5374616b657200000000006044820152606401610a38565b611ab6600e82612902565b506040516001600160a01b038216907f1d1e5fd08acb9bc25c0dd45c0561cfb6e086312e6960eb801333c3ae19eda07c90600090a250565b611af9600e336121d2565b611b3e5760405162461bcd60e51b81526020600482015260166024820152752a37b5b2b729ba30b5b29d102737ba1039ba30b5b2b960511b6044820152606401610a38565b60008181526010602052604090205481906001600160a01b031615611b755760405162461bcd60e51b8152600401610a3890613b7d565b611b80335b83612917565b611bcc5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610a38565b60008281526010602090815260409182902080546001600160a01b0319163390811790915591518481527f1fdab8a8457aaf782e4b6217d6ffa6f5006eda7e50922dd092b2e1524275d77491016110e8565b60148054611c2b90613ad7565b80601f0160208091040260200160405190810160405280929190818152602001828054611c5790613ad7565b8015611ca45780601f10611c7957610100808354040283529160200191611ca4565b820191906000526020600020905b815481529060010190602001808311611c8757829003601f168201915b505050505081565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b611ce26121f7565b60005b81811015611e54576000601081858585818110611d0457611d04613cdb565b60209081029290920135835250810191909152604001600020546001600160a01b031603611d745760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a206e6f742072657374616b6561626c6500000000006044820152606401610a38565b6001600160a01b03841615611df157611da584848484818110611d9957611d99613cdb565b90506020020135612917565b611df15760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610a38565b8360106000858585818110611e0857611e08613cdb565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508080611e4c90613cf1565b915050611ce5565b50826001600160a01b03167f43b05a7e48dc5c22c2f56fa403cb8271d8a4e97f09548d2161cdd7bb3f9c7cbc8383604051611e90929190613da1565b60405180910390a2505050565b611ea56121f7565b6001600160a01b038116611f0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a38565b611105816126ea565b611f1b6121f7565b601755565b611f286121f7565b601154600160a81b900460ff1615611f795760405162461bcd60e51b815260206004820152601460248201527313585e081cdd5c1c1b1e481a5cc81b1bd8dad95960621b6044820152606401610a38565b600060125411611fc05760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481b9bdd081cd95d60721b6044820152606401610a38565b6011805460ff60a81b1916600160a81b1790556040517fcb05127102e959540e425cdbe8127c6ae5cdff90f0ba6763e98b7ddc818f7fb890600090a1565b6000546001600160a01b0316801580159061202357506000816001600160a01b03163b115b156112e157604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015612074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120989190613dda565b6112e157604051633b79c77360e21b81526001600160a01b0383166004820152602401610a38565b60006120cb826114da565b9050806001600160a01b0316836001600160a01b0316036121395760405162461bcd60e51b815260206004820152602260248201527f455243373231583a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610a38565b336001600160a01b038216148061215557506121558133611cac565b6121c75760405162461bcd60e51b815260206004820152603960248201527f455243373231583a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610a38565b610a718383836129ea565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b3361220061168a565b6001600160a01b0316146111d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a38565b600d5460ff16156111d55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a38565b60006121f08284613b6a565b6040516001600160a01b0380851660248301528316604482015260648101829052610e799085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612a46565b6112e1828260405180602001604052806000815250612b1b565b610a71838383612d7b565b6011546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a49190613b3a565b8111156123e65760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b6044820152606401610a38565b600081116124255760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610a38565b600061243d60646124378460326130b6565b906130c2565b9050600061245160646124378560326130b6565b60115490915061248b906001600160a01b03167f0000000000000000000000004da56c7c284d56094b21fcc56888beeacac53365846130ce565b6011546124c2906001600160a01b03167f000000000000000000000000ac488462d5ed9a904842e8946290698694b2391f836130ce565b6040518381527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a1505050565b60006121f0836001600160a01b0384166130fe565b61251761314d565b600d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610a7183838360405180602001604052806000815250611888565b604080518082019091526000808252602082015261259b826002541190565b6125fa5760405162461bcd60e51b815260206004820152602a60248201527f455243373231583a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610a38565b60006005548310612620576005546126129084613b27565b61261d906001613b6a565b90505b825b818110612689576000818152600860209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561267657949350505050565b508061268181613df7565b915050612622565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231583a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610a38565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612744612256565b600d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125443390565b336001600160a01b038316036127d15760405162461bcd60e51b815260206004820152601a60248201527f455243373231583a20617070726f766520746f2063616c6c65720000000000006044820152606401610a38565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612848848484612d7b565b61285484848484613196565b610e795760405162461bcd60e51b8152600401610a3890613e0e565b6060600061287d83613297565b60010190506000816001600160401b0381111561289c5761289c613728565b6040519080825280601f01601f1916602001820160405280156128c6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846128d057509392505050565b60006121f0836001600160a01b03841661336f565b6000612924826002541190565b6129865760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a206f70657261746f7220717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610a38565b60006129918361257c565b905080600001516001600160a01b0316846001600160a01b031614806129d05750836001600160a01b03166129c5846109cd565b6001600160a01b0316145b806129e2575080516129e29085611cac565b949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612a9b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134699092919063ffffffff16565b9050805160001480612abc575080806020019051810190612abc9190613dda565b610a715760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a38565b6002546001600160a01b038416612b7e5760405162461bcd60e51b815260206004820152602160248201527f455243373231583a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610a38565b612b89816002541190565b15612bd65760405162461bcd60e51b815260206004820152601d60248201527f455243373231583a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610a38565b600554831115612c435760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207175616e7469747920746f206d696e74206f766572207460448201527168616e206d61782062617463682073697a6560701b6064820152608401610a38565b6001600160a01b0380851660008181526009602090815260408083208054680100000000000000006001600160401b038083168c01811667ffffffffffffffff198416811783900482168d0182169092026fffffffffffffffffffffffffffffffff1990931690911791909117909155815180830183529485524281168584019081528785526008909352908320935184549251909116600160a01b026001600160e01b031990921694169390931792909217905581905b84811015612d705760405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612d486000878487613196565b612d645760405162461bcd60e51b8152600401610a3890613e0e565b60019182019101612cfb565b506002819055610edb565b6000612d868261257c565b9050612d9133611b7a565b612df85760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610a38565b836001600160a01b031681600001516001600160a01b031614612e6c5760405162461bcd60e51b815260206004820152602660248201527f455243373231583a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610a38565b6001600160a01b038316612ed05760405162461bcd60e51b815260206004820152602560248201527f455243373231583a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a38565b612ee060008383600001516129ea565b6001600160a01b0384166000908152600960205260408120805460019290612f129084906001600160401b0316613e61565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b03851660009081526009602052604081208054600194509092612f5e91859116613e81565b82546101009290920a6001600160401b038181021990931691831602179091556040805180820182526001600160a01b03878116825242841660208084019182526000898152600890915293842092518354915192166001600160e01b031990911617600160a01b9190941602929092179091559050612fdf836001613b6a565b6000818152600860205260409020549091506001600160a01b031661307057613009816002541190565b156130705760408051808201825283516001600160a01b0390811682526020808601516001600160401b039081168285019081526000878152600890935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610edb565b60006121f08284613b53565b60006121f08284613bb4565b6040516001600160a01b038316602482015260448101829052610a7190849063a9059cbb60e01b906064016122dc565b600081815260018301602052604081205461314557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610935565b506000610935565b600d5460ff166111d55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a38565b60006001600160a01b0384163b1561328c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131da903390899088908890600401613ea1565b6020604051808303816000875af1925050508015613215575060408051601f3d908101601f1916820190925261321291810190613ede565b60015b613272573d808015613243576040519150601f19603f3d011682016040523d82523d6000602084013e613248565b606091505b50805160000361326a5760405162461bcd60e51b8152600401610a3890613e0e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506129e2565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106132d65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613302576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061332057662386f26fc10000830492506010015b6305f5e1008310613338576305f5e100830492506008015b612710831061334c57612710830492506004015b6064831061335e576064830492506002015b600a83106109355760010192915050565b60008181526001830160205260408120548015613458576000613393600183613b27565b85549091506000906133a790600190613b27565b905081811461340c5760008660000182815481106133c7576133c7613cdb565b90600052602060002001549050808760000184815481106133ea576133ea613cdb565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061341d5761341d613efb565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610935565b6000915050610935565b5092915050565b60606129e2848460008585600080866001600160a01b031685876040516134909190613f11565b60006040518083038185875af1925050503d80600081146134cd576040519150601f19603f3d011682016040523d82523d6000602084013e6134d2565b606091505b50915091506134e3878383876134ee565b979650505050505050565b6060831561355d578251600003613556576001600160a01b0385163b6135565760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a38565b50816129e2565b6129e283838151156135725781518083602001fd5b8060405162461bcd60e51b8152600401610a38919061360f565b6001600160e01b03198116811461110557600080fd5b6000602082840312156135b457600080fd5b81356121f08161358c565b60005b838110156135da5781810151838201526020016135c2565b50506000910152565b600081518084526135fb8160208601602086016135bf565b601f01601f19169290920160200192915050565b6020815260006121f060208301846135e3565b60006020828403121561363457600080fd5b5035919050565b6001600160a01b038116811461110557600080fd5b6000806040838503121561366357600080fd5b823561366e8161363b565b946020939093013593505050565b60006020828403121561368e57600080fd5b81356121f08161363b565b600080604083850312156136ac57600080fd5b50508035926020909101359150565b6000806000606084860312156136d057600080fd5b83356136db8161363b565b925060208401356136eb8161363b565b929592945050506040919091013590565b60008060006060848603121561371157600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561376657613766613728565b604052919050565b60006001600160401b0383111561378757613787613728565b61379a601f8401601f191660200161373e565b90508281528383830111156137ae57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156137d757600080fd5b81356001600160401b038111156137ed57600080fd5b8201601f810184136137fe57600080fd5b6129e28482356020840161376e565b60006001600160401b0382111561382657613826613728565b5060051b60200190565b600082601f83011261384157600080fd5b813560206138566138518361380d565b61373e565b82815260059290921b8401810191818101908684111561387557600080fd5b8286015b848110156138905780358352918301918301613879565b509695505050505050565b600080604083850312156138ae57600080fd5b82356001600160401b03808211156138c557600080fd5b818501915085601f8301126138d957600080fd5b813560206138e96138518361380d565b82815260059290921b8401810191818101908984111561390857600080fd5b948201945b8386101561392f5785356139208161363b565b8252948201949082019061390d565b9650508601359250508082111561394557600080fd5b5061395285828601613830565b9150509250929050565b801515811461110557600080fd5b6000806040838503121561397d57600080fd5b82356139888161363b565b915060208301356139988161395c565b809150509250929050565b600080600080608085870312156139b957600080fd5b84356139c48161363b565b935060208501356139d48161363b565b92506040850135915060608501356001600160401b038111156139f657600080fd5b8501601f81018713613a0757600080fd5b613a168782356020840161376e565b91505092959194509250565b60008060408385031215613a3557600080fd5b8235613a408161363b565b915060208301356139988161363b565b600080600060408486031215613a6557600080fd5b8335613a708161363b565b925060208401356001600160401b0380821115613a8c57600080fd5b818601915086601f830112613aa057600080fd5b813581811115613aaf57600080fd5b8760208260051b8501011115613ac457600080fd5b6020830194508093505050509250925092565b600181811c90821680613aeb57607f821691505b602082108103613b0b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561093557610935613b11565b600060208284031215613b4c57600080fd5b5051919050565b808202811582820484141761093557610935613b11565b8082018082111561093557610935613b11565b6020808252601b908201527f546f6b656e5374616b653a20546f6b656e206973207374616b65640000000000604082015260600190565b600082613bd157634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610a7157600081815260208120601f850160051c81016020861015613bfd5750805b601f850160051c820191505b818110156118e557828155600101613c09565b81516001600160401b03811115613c3557613c35613728565b613c4981613c438454613ad7565b84613bd6565b602080601f831160018114613c7e5760008415613c665750858301515b600019600386901b1c1916600185901b1785556118e5565b600085815260208120601f198616915b82811015613cad57888601518255948401946001909101908401613c8e565b5085821015613ccb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060018201613d0357613d03613b11565b5060010190565b6000808454613d1881613ad7565b60018281168015613d305760018114613d4557613d74565b60ff1984168752821515830287019450613d74565b8860005260208060002060005b85811015613d6b5781548a820152908401908201613d52565b50505082870194505b505050508351613d888183602088016135bf565b64173539b7b760d91b9101908152600501949350505050565b6020808252810182905260006001600160fb1b03831115613dc157600080fd5b8260051b80856040850137919091016040019392505050565b600060208284031215613dec57600080fd5b81516121f08161395c565b600081613e0657613e06613b11565b506000190190565b60208082526033908201527f455243373231583a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6001600160401b0382811682821603908082111561346257613462613b11565b6001600160401b0381811683821601908082111561346257613462613b11565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ed4908301846135e3565b9695505050505050565b600060208284031215613ef057600080fd5b81516121f08161358c565b634e487b7160e01b600052603160045260246000fd5b60008251613f238184602087016135bf565b919091019291505056fea26469706673582212200a0da45714bd4074ebbee7873b6e92985bc0c94303761aeb691834244081725f64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000002f1eb9e22c
-----Decoded View---------------
Arg [0] : _CallerPublicSaleKey (uint256): 202378961452
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000002f1eb9e22c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.