ERC-721
Overview
Max Total Supply
3,333 TYRANZ
Holders
979
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 TYRANZLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TyranzGenesis
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/*SPDX-License-Identifier: MIT _____ _____ _____ _____ _____ _____ /\ \ |\ \ /\ \ /\ \ /\ \ /\ \ /::\ \ |:\____\ /::\ \ /::\ \ /::\____\ /::\ \ \:::\ \ |::| | /::::\ \ /::::\ \ /::::| | \:::\ \ \:::\ \ |::| | /::::::\ \ /::::::\ \ /:::::| | \:::\ \ \:::\ \ |::| | /:::/\:::\ \ /:::/\:::\ \ /::::::| | \:::\ \ \:::\ \ |::| | /:::/__\:::\ \ /:::/__\:::\ \ /:::/|::| | \:::\ \ /::::\ \ |::| | /::::\ \:::\ \ /::::\ \:::\ \ /:::/ |::| | \:::\ \ /::::::\ \ |::|___|______ /::::::\ \:::\ \ /::::::\ \:::\ \ /:::/ |::| | _____ \:::\ \ /:::/\:::\ \ /::::::::\ \ /:::/\:::\ \:::\____\ /:::/\:::\ \:::\ \ /:::/ |::| |/\ \ \:::\ \ /:::/ \:::\____\ /::::::::::\____\/:::/ \:::\ \:::| |/:::/ \:::\ \:::\____\/:: / |::| /::\____\_______________\:::\____\ /:::/ \::/ / /:::/~~~~/~~ \::/ |::::\ /:::|____|\::/ \:::\ /:::/ /\::/ /|::| /:::/ /\::::::::::::::::::/ / /:::/ / \/____/ /:::/ / \/____|:::::\/:::/ / \/____/ \:::\/:::/ / \/____/ |::| /:::/ / \::::::::::::::::/____/ /:::/ / /:::/ / |:::::::::/ / \::::::/ / |::|/:::/ / \:::\~~~~\~~~~~~ /:::/ / /:::/ / |::|\::::/ / \::::/ / |::::::/ / \:::\ \ \::/ / \::/ / |::| \::/____/ /:::/ / |:::::/ / \:::\ \ \/____/ \/____/ |::| ~| /:::/ / |::::/ / \:::\ \ |::| | /:::/ / /:::/ / \:::\ \ \::| | /:::/ / /:::/ / \:::\____\ \:| | \::/ / \::/ / \::/ / \|___| \/____/ \/____/ \/____/ */ pragma solidity >=0.8.0 <0.9.0; import ".deps/ERC721F.sol"; import ".deps/IERC4906.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "contracts/Drill_1155.sol"; import ".deps/project_os/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract TyranzGenesis is ERC721FAT,ERC2981,IERC4906,Ownable,DefaultOperatorFilterer { using Strings for uint256; string public baseURI; string public notRevealedUri; string public legendURI; string public notRevLegendUri; string public InjectedURI; string public baseExtension = ".json"; uint256 public pre_maxSupply = 3168; uint256 public maxSupply = 3333; uint256 public cost = 0.033 ether; uint256 public maxMintAmount = 3; uint256 public nftPerAddressLimit = 3; uint256 public Infusion_cap; uint256 public Infusion_cost = 1000 ether; bool public presaleactive = false; bool public saleactive = false; bool public freemintactive = false; bool public revealed = false; bool public injecting = false; mapping(address => uint256) public addressMintedBalance; mapping(address => uint256) public addressMintedBalance_WL; mapping(address => uint256) public addressMintedTyranite; mapping (uint256 => bool) public legendary; mapping (uint256 => bool) public revlegendary; mapping(uint256 => bool) public Injected; bytes32 public root; bytes32 public free_root; TyraniteDrill public item; IERC20 public token; constructor(string memory _name, string memory _symbol, string memory _initNotRevealedUri, string memory _initNotRevLegendUri,address drillContract) ERC721FAT(_name, _symbol) { setNotRevealedURI(_initNotRevealedUri); setNotRevLegendURI(_initNotRevLegendUri); item = TyraniteDrill(drillContract); isLegendary(); } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721FAT,ERC2981,IERC165) returns (bool) { return super.supportsInterface(interfaceId); } //Metadata Service Functions function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function _legendURI() internal view virtual returns (string memory) { return legendURI; } function _notRevealedUri() internal view virtual returns (string memory) { return notRevealedUri; } function _notRevLegendUri() internal view virtual returns (string memory) { return notRevLegendUri; } function _InjectedURI() internal view virtual returns (string memory) { return InjectedURI; } function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; emit BatchMetadataUpdate(11,3333); } function setLegendURI(string memory _newLegendURI) public onlyOwner { legendURI = _newLegendURI; emit BatchMetadataUpdate(1,10); } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { notRevealedUri = _notRevealedURI; } function setNotRevLegendURI(string memory _notRevLegendURI) public onlyOwner { notRevLegendUri = _notRevLegendURI; } function setInjectedURI(string memory _InjectURI) public onlyOwner { InjectedURI = _InjectURI; } function bulk_metadata_refresh(uint256 startid,uint256 lastid) public onlyOwner { emit BatchMetadataUpdate(startid,lastid); } function sigle_metadata_refresh(uint256 tokenid) public onlyOwner { emit MetadataUpdate(tokenid); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (_exists(tokenId) == false) revert ("URI query for unexistent Token"); if(revealed == false && legendary[tokenId] == false) { return notRevealedUri; } if(revealed == false && legendary[tokenId] == true ) { return notRevLegendUri; } if(revealed == true && legendary[tokenId] == true && revlegendary[tokenId] == false ) { return notRevLegendUri; } if(revealed == true && Injected[tokenId] == true && legendary[tokenId] == false){ string memory currentInjectedURI = _InjectedURI(); return bytes(currentInjectedURI).length != 0 ? string(abi.encodePacked(InjectedURI,tokenId.toString(),baseExtension)) : ''; } if(revealed == true && legendary[tokenId] == true && revlegendary[tokenId] == true){ string memory currentlegendURI = _legendURI(); return bytes(currentlegendURI).length != 0 ? string(abi.encodePacked(legendURI,tokenId.toString(),baseExtension)) : ''; } string memory currentbaseURI = _baseURI(); return bytes(currentbaseURI).length != 0 ? string(abi.encodePacked(baseURI,tokenId.toString(),baseExtension)) : ''; } //Admin Service Function function active_Infusion(bool _state) public onlyOwner { injecting = _state; } function presale(bool _state) public onlyOwner { presaleactive = _state; } function freemint(bool _state) public onlyOwner { freemintactive = _state; } function publicsale(bool _state) public onlyOwner { saleactive = _state; } function sale_switch() public onlyOwner { presaleactive = false; saleactive = true; } function isLegendary() private onlyOwner { legendary[1] = true; legendary[2] = true; legendary[3] = true; legendary[4] = true; legendary[5] = true; legendary[6] = true; legendary[7] = true; legendary[8] = true; legendary[9] = true; legendary[10] = true; } function revLegendary(uint256 tokenId) public onlyOwner { revlegendary[tokenId] = true; emit MetadataUpdate(tokenId); } function reveal(string memory _newBaseURI) public onlyOwner { require (!revealed,"one time use Only be careful my Dev"); baseURI = _newBaseURI; revealed = true; emit BatchMetadataUpdate(11,3333); } function set_root(bytes32 new_root) public onlyOwner{ root = new_root; } function set_freeroot(bytes32 new_freeroot) public onlyOwner{ free_root = new_freeroot; } function Whitdraw(address Withdraw_Address) public onlyOwner { address payable to = payable(Withdraw_Address); to.transfer(address(this).balance); } function set_royalties(address receiver,uint96 feeNumerator) public onlyOwner{ _setDefaultRoyalty(receiver,feeNumerator); } function set_cost(uint256 new_cost) public onlyOwner{ cost = new_cost; } function set_Infusion_cost(uint256 new_Infusion_cost) public onlyOwner{ Infusion_cost = new_Infusion_cost; } function set_public_limits(uint256 new_nftPerAddressLimit,uint256 new_maxMintAmount) public onlyOwner{ maxMintAmount = new_nftPerAddressLimit; nftPerAddressLimit = new_maxMintAmount; } function airdrop(address beneficiary,uint256 amount) public onlyOwner{ uint256 supply = totalSupply(); if(supply + amount > maxSupply) revert ("Max Supply reached"); _safeMint(beneficiary,amount); } function set_tyranite_contract(address tyraniteContract) public onlyOwner{ token = IERC20(tyraniteContract); } //Minting Stage function public_sale(uint256 quantity) public payable { uint256 supply = totalSupply(); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; if(quantity <= 0) revert ("need to mint at least 1 NFT"); if(supply + quantity > maxSupply) revert ("Sold Out"); if (msg.sender != owner()) { if(supply + quantity > pre_maxSupply) revert ("Sold Out"); if(saleactive == false) revert ("Function Disabled"); if(ownerMintedCount + quantity > nftPerAddressLimit) revert ("max NFT per address exceeded"); if(quantity > maxMintAmount) revert ("max mint x session reached"); if(msg.value != cost * quantity) revert ("incorrect amount"); addressMintedBalance[msg.sender] += quantity; _safeMint(msg.sender,quantity); }else{ _safeMint(msg.sender,quantity); } } function pre_sale(uint256 quantity,bytes32[] memory proof) public payable { uint256 supply = totalSupply(); uint256 ownerMintedCount = addressMintedBalance_WL[msg.sender]; uint256 drills = item.balanceOf(msg.sender,1); uint256 pre_nftPerAddressLimit_WL = drills *3; uint256 nftPerAddressLimit_WL = 3 + pre_nftPerAddressLimit_WL; bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); if(presaleactive == false) revert ("Function Disabled"); if(MerkleProof.verify(proof,root,leaf) == false) revert ("user not Whitelisted"); if(quantity <= 0) revert ("need to mint at least 1 NFT"); if(supply + quantity > pre_maxSupply) revert ("Sold Out"); if(ownerMintedCount + quantity > nftPerAddressLimit_WL) revert ("max NFT per address exceeded"); if(quantity > 6) revert ("max mint x session reached"); if(msg.value != cost * quantity) revert ("incorrect amount"); addressMintedBalance_WL[msg.sender] += quantity; _safeMint(msg.sender,quantity); } function free_claim(uint256 quantity,bytes32[] memory proof) public { uint256 supply = totalSupply(); uint256 ownerMintedCount_free = addressMintedTyranite[msg.sender]; bytes32 leaf = keccak256(abi.encodePacked(msg.sender,quantity)); if(freemintactive == false) revert ("Function Disabled"); if(MerkleProof.verify(proof,free_root,leaf) == false) revert ("not eligible to claim"); if(ownerMintedCount_free > 0) revert ("Already Claimed"); if(quantity <= 0) revert ("need to mint at least 1 NFT"); if(supply + quantity > maxSupply) revert ("Sold Out"); for(uint256 i = 0; i < quantity; i++) { addressMintedTyranite[msg.sender]++; _safeMint(msg.sender,1); } } //OS operator filter function overrides//---------------------------------------------------- function setApprovalForAll(address operator, bool approved) public virtual override (ERC721FAT,IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public virtual override (ERC721FAT,IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public virtual override (ERC721FAT,IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override (ERC721FAT,IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override (ERC721FAT,IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } //DAPP METRICS---------------------------------------------------- function drill_of_Holder(address Holder) public view returns(uint256) { return item.balanceOf(Holder,1); } function Tyranite_Balance(address Staker) public view returns(uint256) { return token.balanceOf(Staker); } //Special Mechanics------------------------------------------------- function InfuseTyranite(uint256 tokenid) public { uint256 tyranitebalance = token.balanceOf(msg.sender); if(injecting == false) revert ("Function Disabled"); if(msg.sender != ownerOf(tokenid)) revert ("Sender must be Owner"); if(Infusion_cap >= 33) revert ("Infusion Cap Reached"); if(legendary[tokenid] == true) revert ("Can't Infuse Primals"); if(Injected[tokenid] == true) revert ("Already Infused"); if(tyranitebalance < Infusion_cost) revert ("Insufficent Tyranite"); Infusion_cap++; Injected[tokenid] = true; emit MetadataUpdate(tokenid); token.transferFrom(msg.sender,address(this),Infusion_cost); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./OperatorFilterer.sol"; import "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; pragma solidity >=0.8.0 <0.9.0; contract TyraniteDrill is ERC1155,Ownable,ERC2981 { string public name; string public symbol; uint public totalSupply = 0; uint public maxSupply = 165; uint public WhiteLimit = 1; uint public PublicLimit = 2; uint public maxMintAmount = 2; uint public cost = 0.05 ether; bool public publicsale = false; bool public onlyOG = false; mapping (uint => string) private tokenURI; mapping (address => uint) public AddressMintedBalance_WL; mapping (address => uint) public AddressMintedBalance_PB; bytes32 public root; constructor(string memory _name,string memory _symbol,string memory _baseURI) ERC1155("") { name = _name; symbol = _symbol; tokenURI[1] = _baseURI; } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC1155,ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function uri(uint _id) public view virtual override returns (string memory) { return tokenURI[_id]; } function _publicsale (bool _state) public onlyOwner { publicsale = _state; } function _onlyOG(bool _state) public onlyOwner { onlyOG = _state; } function set_root(bytes32 _root) public onlyOwner { root = _root; } function set_cost(uint256 new_cost) public onlyOwner { cost = new_cost; } function sale_switch() public onlyOwner { onlyOG = false; publicsale = true; } function set_uri(string memory new_tokenURI) public onlyOwner{ tokenURI[1] = new_tokenURI; } function set_royalties(address receiver,uint96 feeNumerator) public onlyOwner{ _setDefaultRoyalty(receiver,feeNumerator);// 1% = 100 } function publicmint(uint256 amount) public payable { if(totalSupply + amount > maxSupply) revert("Amount Exceeds Max Supply"); if(amount <= 0) revert("Mint at Least 1"); if(msg.sender != owner()){ if (publicsale == false) revert ("Function Disabled"); if (amount + AddressMintedBalance_PB[msg.sender] > PublicLimit) revert ("Address Limit Reached"); if(amount > maxMintAmount) revert ("Max Mint x Session Reached"); if (msg.value != cost * amount) revert ("Incorrect Amount"); } totalSupply += amount; AddressMintedBalance_PB[msg.sender]+= amount; _mint(msg.sender,1, amount ,"Thank You!!"); } function OGmint(bytes32[] memory proof) public payable { if (onlyOG == false) revert ("Function Disabled"); if(totalSupply == maxSupply) revert ("Sold Out"); if(AddressMintedBalance_WL[msg.sender] == WhiteLimit) revert ("Address Limit Reached"); if(msg.value != cost) revert ("Incorrect Amount"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); if (!MerkleProof.verify(proof,root,leaf)) revert ("User not Whitelisted"); totalSupply++; AddressMintedBalance_WL[msg.sender]++; _mint(msg.sender,1, 1 ,"Welcome aboard Pioneer!!"); } function Withdraw(address Withdraw_Address) public onlyOwner { address payable to = payable(Withdraw_Address); to.transfer(address(this).balance); //WITHDRAW ETH FROM THE SMARTCONTRACT TO A SPECIFIC ADDRESS// } function Airdrop (address to , uint256 amount) public onlyOwner{ if (totalSupply + amount > maxSupply) revert ("Amount Exceeds Max Supply"); _mint(to,1,amount,"This is a Gift for You!!"); totalSupply+= amount; //AIRDROP AMOUNT OF DRILLS TO A SPECIFIC ADDRESS// } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId,address receiver,uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.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"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error AuxQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721FAT is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev See {IERC721Enumerable-totalSupply}. * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { if (owner == address(0)) revert AuxQueryForZeroAddress(); return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { if (owner == address(0)) revert AuxQueryForZeroAddress(); _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @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 = ERC721FAT.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _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); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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 _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = 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)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn 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)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @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); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { 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 TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /// @dev Returns the tokenIds of the address. O(totalSupply) in complexity. function tokensOfOwner(address owner) external view returns (uint256[] memory) { unchecked { uint256[] memory a = new uint256[](balanceOf(owner)); uint256 end = _currentIndex; uint256 tokenIdsIdx; address currOwnershipAddr; for (uint256 i; i < end; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { a[tokenIdsIdx++] = i; } } return a; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// 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.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 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 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 "./IOperatorFilterRegistry.sol"; import "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @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. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // 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(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an 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 an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_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 (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// 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.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 (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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// 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.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 (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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initNotRevealedUri","type":"string"},{"internalType":"string","name":"_initNotRevLegendUri","type":"string"},{"internalType":"address","name":"drillContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenid","type":"uint256"}],"name":"InfuseTyranite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Infusion_cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Infusion_cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Injected","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"InjectedURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Staker","type":"address"}],"name":"Tyranite_Balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Withdraw_Address","type":"address"}],"name":"Whitdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"active_Infusion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedBalance_WL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedTyranite","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startid","type":"uint256"},{"internalType":"uint256","name":"lastid","type":"uint256"}],"name":"bulk_metadata_refresh","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Holder","type":"address"}],"name":"drill_of_Holder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"free_claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"free_root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"freemint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freemintactive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"injecting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"item","outputs":[{"internalType":"contract TyraniteDrill","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legendURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"legendary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftPerAddressLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevLegendUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pre_maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"pre_sale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"presale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"presaleactive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"public_sale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"publicsale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"revLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"revlegendary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sale_switch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleactive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_InjectURI","type":"string"}],"name":"setInjectedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newLegendURI","type":"string"}],"name":"setLegendURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevLegendURI","type":"string"}],"name":"setNotRevLegendURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"new_Infusion_cost","type":"uint256"}],"name":"set_Infusion_cost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"new_cost","type":"uint256"}],"name":"set_cost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"new_freeroot","type":"bytes32"}],"name":"set_freeroot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"new_nftPerAddressLimit","type":"uint256"},{"internalType":"uint256","name":"new_maxMintAmount","type":"uint256"}],"name":"set_public_limits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"new_root","type":"bytes32"}],"name":"set_root","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"set_royalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tyraniteContract","type":"address"}],"name":"set_tyranite_contract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenid","type":"uint256"}],"name":"sigle_metadata_refresh","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"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"}]
Contract Creation Code
60c06040526005608090815264173539b7b760d91b60a052601090620000269082620005af565b50610c60601155610d0560125566753d533d96800060135560036014819055601555683635c9adc5dea000006017556018805464ffffffffff191690553480156200007057600080fd5b50604051620055fd380380620055fd83398101604081905262000093916200072a565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600186866002620000ba8382620005af565b506003620000c98282620005af565b5050600160005550620000dc336200026a565b6daaeb6d7670e522a718067333cd4e3b15620002215780156200016f57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200015057600080fd5b505af115801562000165573d6000803e3d6000fd5b5050505062000221565b6001600160a01b03821615620001c05760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000135565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200020757600080fd5b505af11580156200021c573d6000803e3d6000fd5b505050505b506200022f905083620002bc565b6200023a82620002d8565b602180546001600160a01b0319166001600160a01b0383161790556200025f620002f0565b505050505062000807565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002c6620004a9565b600c620002d48282620005af565b5050565b620002e2620004a9565b600e620002d48282620005af565b620002fa620004a9565b601c6020527f6de76108811faf2f94afbe5ac6c98e8393206cd093932de1fbfd61bbeec43a028054600160ff1991821681179092557ff5b6e61a0c14f171ef1c86f003900ef0305e4159fff3317e4fb7c351f2050c8780548216831790557fb0deb225ecd3a242ef7d55f0f81ae3b924e0b6f9da8bc33b306fb32ca5f287f780548216831790557fadacb2ae086d090ae1cbb87d66774fa6d708dd14d5bdc5b6c1e455aa2020dfb780548216831790557f0de3fcd0b495fcf96d4f4ab29f8e12012b60a56d458f4c95fdde42b927ce97a080548216831790557fb2d730c3da277545f6c9f2c922ea3d0e9fcbd74e29d321b995a837ef61c283f080548216831790557ff83d70dc1f3bc56ae93d2f099ba46d689c41cc22a3494b582010b224cccab8fb80548216831790557ff9305512730c46154741e3ea28f09acb2323e8072d6a6e52c9ab9232e8f79b5380548216831790557f82381b488566200bc8ac07e6c827657cb515bed8173d1cbff7359566c5cb20ae8054821683179055600a6000527fe1bdc6374d0c60f1ea6340bad1b1efb6e5d43dacd7cf8a832c0e80db9e8cfbdd80549091169091179055565b600a546001600160a01b03163314620005085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200053557607f821691505b6020821081036200055657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005aa57600081815260208120601f850160051c81016020861015620005855750805b601f850160051c820191505b81811015620005a65782815560010162000591565b5050505b505050565b81516001600160401b03811115620005cb57620005cb6200050a565b620005e381620005dc845462000520565b846200055c565b602080601f8311600181146200061b5760008415620006025750858301515b600019600386901b1c1916600185901b178555620005a6565b600085815260208120601f198616915b828110156200064c578886015182559484019460019091019084016200062b565b50858210156200066b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f8301126200068d57600080fd5b81516001600160401b0380821115620006aa57620006aa6200050a565b604051601f8301601f19908116603f01168101908282118183101715620006d557620006d56200050a565b81604052838152602092508683858801011115620006f257600080fd5b600091505b83821015620007165785820183015181830184015290820190620006f7565b600093810190920192909252949350505050565b600080600080600060a086880312156200074357600080fd5b85516001600160401b03808211156200075b57600080fd5b6200076989838a016200067b565b965060208801519150808211156200078057600080fd5b6200078e89838a016200067b565b95506040880151915080821115620007a557600080fd5b620007b389838a016200067b565b94506060880151915080821115620007ca57600080fd5b50620007d9888289016200067b565b608088015190935090506001600160a01b0381168114620007f957600080fd5b809150509295509295909350565b614de680620008176000396000f3fe6080604052600436106105225760003560e01c8063742bdeb3116102af578063c668286211610179578063f2a4a82e116100d6578063fc0c546a1161008a578063fc97450e1161006f578063fc97450e14610ee6578063fe64d30214610f00578063fee1a6e814610f2057600080fd5b8063fc0c546a14610e99578063fc529de214610ec657600080fd5b8063f2fde38b116100bb578063f2fde38b14610e29578063f61f23d114610e49578063f7fc703814610e6957600080fd5b8063f2a4a82e14610ddc578063f2c4ce1e14610e0957600080fd5b8063e7da4abe1161012d578063ebf0c71711610112578063ebf0c71714610d76578063edc2fcfb14610d8c578063eeffbe4e14610dac57600080fd5b8063e7da4abe14610d00578063e985e9c514610d2057600080fd5b8063cb5154241161015e578063cb51542414610c9a578063cefeac2514610cba578063d5abeb0114610cea57600080fd5b8063c668286214610c65578063c87b56dd14610c7a57600080fd5b8063973fb3e911610227578063b88d4fde116101db578063ba7d2c76116101c0578063ba7d2c7614610c0c578063c1b2360f14610c22578063c5528d2d14610c3857600080fd5b8063b88d4fde14610bd6578063b9dfe97914610bf657600080fd5b80639ec652841161020c5780639ec6528414610b83578063a22cb46514610b96578063a4cc0e6f14610bb657600080fd5b8063973fb3e914610b435780639beda6c514610b6357600080fd5b80638462151c1161027e5780638ba4cc3c116102635780638ba4cc3c14610ae35780638da5cb5b14610b0357806395d89b4114610b2e57600080fd5b80638462151c14610aa1578063877ffd5714610ace57600080fd5b8063742bdeb314610a2a57806375a6d80c14610a4a57806375b860eb14610a6a57806380a2656b14610a7f57600080fd5b806341f43434116103f0578063562cd849116103685780636b7b4e491161031c57806370a082311161030157806370a08231146109d6578063715018a6146109f6578063726444be14610a0b57600080fd5b80636b7b4e49146109ae5780636c0360eb146109c157600080fd5b80636352211e1161034d5780636352211e1461094e57806366a2b4201461096e578063685365de1461098e57600080fd5b8063562cd849146109185780635b621f721461093857600080fd5b80634c261247116103bf57806351830227116103a457806351830227146108b757806353175838146108d857806355f804b3146108f857600080fd5b80634c261247146108775780634ec667d21461089757600080fd5b806341f434341461080057806342842e0e14610822578063457a1c84146108425780634b17fa871461085757600080fd5b806318160ddd1161049e578063239c70ae116104525780632a55205a116104375780632a55205a146107745780632d78c188146107c0578063353d12c1146107e057600080fd5b8063239c70ae1461073e57806323b872dd1461075457600080fd5b8063190c351611610483578063190c3516146106d15780631e8d0311146106f157806321ef55201461071157600080fd5b806318160ddd1461066957806318cae269146106a457600080fd5b8063081c8c44116104f55780630e93cad5116104da5780630e93cad51461061a5780630ee05cbb1461062f57806313faede61461065357600080fd5b8063081c8c44146105e5578063095ea7b3146105fa57600080fd5b806301ffc9a7146105275780630659793b1461055c57806306fdde031461057e578063081812fc146105a0575b600080fd5b34801561053357600080fd5b5061054761054236600461449e565b610f40565b60405190151581526020015b60405180910390f35b34801561056857600080fd5b5061057c610577366004614539565b610f51565b005b34801561058a57600080fd5b506105936112a1565b6040516105539190614659565b3480156105ac57600080fd5b506105c06105bb36600461466c565b611333565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610553565b3480156105f157600080fd5b5061059361139d565b34801561060657600080fd5b5061057c6106153660046146ae565b61142b565b34801561062657600080fd5b50610593611444565b34801561063b57600080fd5b5061064560205481565b604051908152602001610553565b34801561065f57600080fd5b5061064560135481565b34801561067557600080fd5b50600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610645565b3480156106b057600080fd5b506106456106bf3660046146d8565b60196020526000908152604090205481565b3480156106dd57600080fd5b5061057c6106ec3660046146d8565b611451565b3480156106fd57600080fd5b5061057c61070c36600461466c565b61149d565b34801561071d57600080fd5b5061064561072c3660046146d8565b601a6020526000908152604090205481565b34801561074a57600080fd5b5061064560145481565b34801561076057600080fd5b5061057c61076f3660046146f3565b6114aa565b34801561078057600080fd5b5061079461078f36600461472f565b6114e2565b6040805173ffffffffffffffffffffffffffffffffffffffff9093168352602083019190915201610553565b3480156107cc57600080fd5b506018546105479062010000900460ff1681565b3480156107ec57600080fd5b5061057c6107fb366004614751565b6115d9565b34801561080c57600080fd5b506105c06daaeb6d7670e522a718067333cd4e81565b34801561082e57600080fd5b5061057c61083d3660046146f3565b6115ef565b34801561084e57600080fd5b50610593611621565b34801561086357600080fd5b5061057c6108723660046146d8565b61162e565b34801561088357600080fd5b5061057c61089236600461480f565b61167d565b3480156108a357600080fd5b5061057c6108b2366004614866565b611799565b3480156108c357600080fd5b50601854610547906301000000900460ff1681565b3480156108e457600080fd5b5061057c6108f3366004614866565b6117db565b34801561090457600080fd5b5061057c61091336600461480f565b61181b565b34801561092457600080fd5b506106456109333660046146d8565b611868565b34801561094457600080fd5b5061064560115481565b34801561095a57600080fd5b506105c061096936600461466c565b611903565b34801561097a57600080fd5b5061057c61098936600461472f565b611915565b34801561099a57600080fd5b5061057c6109a936600461466c565b61195a565b61057c6109bc366004614539565b611992565b3480156109cd57600080fd5b50610593611e56565b3480156109e257600080fd5b506106456109f13660046146d8565b611e63565b348015610a0257600080fd5b5061057c611ee5565b348015610a1757600080fd5b5060185461054790610100900460ff1681565b348015610a3657600080fd5b5061057c610a4536600461466c565b611ef9565b348015610a5657600080fd5b50610645610a653660046146d8565b6123a2565b348015610a7657600080fd5b506105936123fb565b348015610a8b57600080fd5b5060185461054790640100000000900460ff1681565b348015610aad57600080fd5b50610ac1610abc3660046146d8565b612408565b6040516105539190614883565b348015610ada57600080fd5b5061057c612590565b348015610aef57600080fd5b5061057c610afe3660046146ae565b6125c6565b348015610b0f57600080fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff166105c0565b348015610b3a57600080fd5b50610593612683565b348015610b4f57600080fd5b5061057c610b5e36600461466c565b612692565b348015610b6f57600080fd5b5061057c610b7e36600461480f565b61269f565b61057c610b9136600461466c565b6126b3565b348015610ba257600080fd5b5061057c610bb13660046148c7565b612a6f565b348015610bc257600080fd5b5061057c610bd136600461466c565b612a83565b348015610be257600080fd5b5061057c610bf13660046148f3565b612a90565b348015610c0257600080fd5b5061064560165481565b348015610c1857600080fd5b5061064560155481565b348015610c2e57600080fd5b5061064560175481565b348015610c4457600080fd5b50610645610c533660046146d8565b601b6020526000908152604090205481565b348015610c7157600080fd5b50610593612aca565b348015610c8657600080fd5b50610593610c9536600461466c565b612ad7565b348015610ca657600080fd5b5061057c610cb536600461480f565b612e1a565b348015610cc657600080fd5b50610547610cd536600461466c565b601e6020526000908152604090205460ff1681565b348015610cf657600080fd5b5061064560125481565b348015610d0c57600080fd5b5061057c610d1b36600461480f565b612e2e565b348015610d2c57600080fd5b50610547610d3b36600461496f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610d8257600080fd5b50610645601f5481565b348015610d9857600080fd5b5061057c610da7366004614866565b612e7a565b348015610db857600080fd5b50610547610dc736600461466c565b601c6020526000908152604090205460ff1681565b348015610de857600080fd5b506021546105c09073ffffffffffffffffffffffffffffffffffffffff1681565b348015610e1557600080fd5b5061057c610e2436600461480f565b612eb3565b348015610e3557600080fd5b5061057c610e443660046146d8565b612ec7565b348015610e5557600080fd5b5061057c610e6436600461466c565b612f7e565b348015610e7557600080fd5b50610547610e8436600461466c565b601d6020526000908152604090205460ff1681565b348015610ea557600080fd5b506022546105c09073ffffffffffffffffffffffffffffffffffffffff1681565b348015610ed257600080fd5b5061057c610ee1366004614866565b612fef565b348015610ef257600080fd5b506018546105479060ff1681565b348015610f0c57600080fd5b5061057c610f1b36600461466c565b61302e565b348015610f2c57600080fd5b5061057c610f3b36600461472f565b61303b565b6000610f4b8261304e565b92915050565b6000610f846001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b336000818152601b60209081526040808320549051949550939192610fdd92909188910160609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168252601482015260340190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012060185490915062010000900460ff161515600003611092576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c656400000000000000000000000000000060448201526064015b60405180910390fd5b61109f84602054836130a4565b151560000361110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6f7420656c696769626c6520746f20636c61696d00000000000000000000006044820152606401611089565b8115611172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920436c61696d656400000000000000000000000000000000006044820152606401611089565b600085116111dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b6012546111e986856149d1565b1115611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b60005b8581101561129957336000908152601b60205260408120805491611277836149e4565b91905055506112873360016130ba565b80611291816149e4565b915050611254565b505050505050565b6060600280546112b090614a1c565b80601f01602080910402602001604051908101604052809291908181526020018280546112dc90614a1c565b80156113295780601f106112fe57610100808354040283529160200191611329565b820191906000526020600020905b81548152906001019060200180831161130c57829003601f168201915b5050505050905090565b600061133e826130d4565b611374576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600c80546113aa90614a1c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d690614a1c565b80156114235780601f106113f857610100808354040283529160200191611423565b820191906000526020600020905b81548152906001019060200180831161140657829003601f168201915b505050505081565b8161143581613126565b61143f838361322b565b505050565b600e80546113aa90614a1c565b611459613336565b604051819073ffffffffffffffffffffffffffffffffffffffff8216904780156108fc02916000818181858888f1935050505015801561143f573d6000803e3d6000fd5b6114a5613336565b601355565b8273ffffffffffffffffffffffffffffffffffffffff811633146114d1576114d133613126565b6114dc8484846133b7565b50505050565b600082815260096020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692820192909252829161159d57506040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b6020810151600090612710906115c1906bffffffffffffffffffffffff1687614a6f565b6115cb9190614a86565b915196919550909350505050565b6115e1613336565b6115eb82826133c2565b5050565b8273ffffffffffffffffffffffffffffffffffffffff811633146116165761161633613126565b6114dc84848461353b565b600d80546113aa90614a1c565b611636613336565b602280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611685613336565b6018546301000000900460ff161561171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f6f6e652074696d6520757365204f6e6c79206265206361726566756c206d792060448201527f44657600000000000000000000000000000000000000000000000000000000006064820152608401611089565b600b61172b8282614b07565b50601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff16630100000017905560408051600b8152610d0560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91015b60405180910390a150565b6117a1613336565b60188054911515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909216919091179055565b6117e3613336565b6018805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b611823613336565b600b61182f8282614b07565b5060408051600b8152610d0560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910161178e565b6021546040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015260016024830152600092169062fdd58e906044015b602060405180830381865afa1580156118df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4b9190614c21565b600061190e82613556565b5192915050565b61191d613336565b60408051838152602081018390527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910160405180910390a15050565b611962613336565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200161178e565b60006119c56001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b336000818152601a60205260408082205460215491517efdd58e000000000000000000000000000000000000000000000000000000008152600481019490945260016024850152939450909173ffffffffffffffffffffffffffffffffffffffff9091169062fdd58e90604401602060405180830381865afa158015611a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a739190614c21565b90506000611a82826003614a6f565b90506000611a918260036149d1565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152909150600090603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012060185490915060ff161515600003611b72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b611b7f87601f54836130a4565b1515600003611bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f75736572206e6f742057686974656c69737465640000000000000000000000006044820152606401611089565b60008811611c54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b601154611c6189886149d1565b1115611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b81611cd489876149d1565b1115611d3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401611089565b6006881115611da7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178206d696e7420782073657373696f6e20726561636865640000000000006044820152606401611089565b87601354611db59190614a6f565b3414611e1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f696e636f727265637420616d6f756e74000000000000000000000000000000006044820152606401611089565b336000908152601a6020526040812080548a9290611e3c9084906149d1565b90915550611e4c905033896130ba565b5050505050505050565b600b80546113aa90614a1c565b600073ffffffffffffffffffffffffffffffffffffffff8216611eb2576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b611eed613336565b611ef76000613731565b565b6022546040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611f68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8c9190614c21565b601854909150640100000000900460ff161515600003612008576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b61201182611903565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f53656e646572206d757374206265204f776e65720000000000000000000000006044820152606401611089565b602160165410612111576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e667573696f6e2043617020526561636865640000000000000000000000006044820152606401611089565b6000828152601c602052604090205460ff16151560010361218e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e277420496e66757365205072696d616c730000000000000000000000006044820152606401611089565b6000828152601e602052604090205460ff16151560010361220b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920496e667573656400000000000000000000000000000000006044820152606401611089565b601754811015612277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e737566666963656e7420547972616e6974650000000000000000000000006044820152606401611089565b60168054906000612287836149e4565b90915550506000828152601e60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7906122f59084815260200190565b60405180910390a16022546017546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019190915273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af115801561237e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143f9190614c3a565b6022546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015260009216906370a08231906024016118c2565b600f80546113aa90614a1c565b6060600061241583611e63565b67ffffffffffffffff81111561242d5761242d6144bb565b604051908082528060200260200182016040528015612456578160200160208202803683370190505b506000805491925080805b83811015612585576000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161580159282019290925290612500575061257d565b805173ffffffffffffffffffffffffffffffffffffffff161561252257805192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361257b578186858060010196508151811061256e5761256e614c57565b6020026020010181815250505b505b600101612461565b509295945050505050565b612598613336565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016610100179055565b6125ce613336565b60006126016001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b60125490915061261183836149d1565b1115612679576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4d617820537570706c79207265616368656400000000000000000000000000006044820152606401611089565b61143f83836130ba565b6060600380546112b090614a1c565b61269a613336565b601755565b6126a7613336565b600e6115eb8282614b07565b60006126e66001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b3360009081526019602052604090205490915082612760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b60125461276d84846149d1565b11156127d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b600a5473ffffffffffffffffffffffffffffffffffffffff163314612a655760115461280184846149d1565b1115612869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b601854610100900460ff1615156000036128df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b6015546128ec84836149d1565b1115612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401611089565b6014548311156129c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178206d696e7420782073657373696f6e20726561636865640000000000006044820152606401611089565b826013546129ce9190614a6f565b3414612a36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f696e636f727265637420616d6f756e74000000000000000000000000000000006044820152606401611089565b3360009081526019602052604081208054859290612a559084906149d1565b9091555061143f905033846130ba565b61143f33846130ba565b81612a7981613126565b61143f83836137a8565b612a8b613336565b602055565b8373ffffffffffffffffffffffffffffffffffffffff81163314612ab757612ab733613126565b612ac38585858561388e565b5050505050565b601080546113aa90614a1c565b6060612ae2826130d4565b1515600003612b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f55524920717565727920666f7220756e6578697374656e7420546f6b656e00006044820152606401611089565b6018546301000000900460ff16158015612b7657506000828152601c602052604090205460ff16155b15612c0d57600c8054612b8890614a1c565b80601f0160208091040260200160405190810160405280929190818152602001828054612bb490614a1c565b8015612c015780601f10612bd657610100808354040283529160200191612c01565b820191906000526020600020905b815481529060010190602001808311612be457829003601f168201915b50505050509050919050565b6018546301000000900460ff16158015612c3a57506000828152601c602052604090205460ff1615156001145b15612c4c57600e8054612b8890614a1c565b6018546301000000900460ff1615156001148015612c7d57506000828152601c602052604090205460ff1615156001145b8015612c9857506000828152601d602052604090205460ff16155b15612caa57600e8054612b8890614a1c565b6018546301000000900460ff1615156001148015612cdb57506000828152601e602052604090205460ff1615156001145b8015612cf657506000828152601c602052604090205460ff16155b15612d5b576000612d056138ff565b90508051600003612d255760405180602001604052806000815250612d54565b600f612d308461390e565b6010604051602001612d4493929190614d17565b6040516020818303038152906040525b9392505050565b6018546301000000900460ff1615156001148015612d8c57506000828152601c602052604090205460ff1615156001145b8015612dab57506000828152601d602052604090205460ff1615156001145b15612de5576000612dba6139cc565b90508051600003612dda5760405180602001604052806000815250612d54565b600d612d308461390e565b6000612def6139db565b90508051600003612e0f5760405180602001604052806000815250612d54565b600b612d308461390e565b612e22613336565b600f6115eb8282614b07565b612e36613336565b600d612e428282614b07565b506040805160018152600a60208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910161178e565b612e82613336565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b612ebb613336565b600c6115eb8282614b07565b612ecf613336565b73ffffffffffffffffffffffffffffffffffffffff8116612f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611089565b612f7b81613731565b50565b612f86613336565b6000818152601d60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79061178e9083815260200190565b612ff7613336565b60188054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b613036613336565b601f55565b613043613336565b601491909155601555565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610f4b5750610f4b826139ea565b6000826130b18584613acd565b14949350505050565b6115eb828260405180602001604052806000815250613b1a565b6000816001111580156130e8575060005482105b8015610f4b5750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b6daaeb6d7670e522a718067333cd4e3b15612f7b576040517fc617113400000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190614c3a565b612f7b576040517fede71dcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401611089565b600061323682611903565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361329d576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff8216148015906132f4575073ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff16155b1561332b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61143f838383613b27565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611089565b61143f838383613ba8565b6127106bffffffffffffffffffffffff82161115613462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401611089565b73ffffffffffffffffffffffffffffffffffffffff82166134df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401611089565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600855565b61143f83838360405180602001604052806000815250612a90565b60408051606081018252600080825260208201819052918101919091528180600111158015613586575060005481105b156136ff576000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906136fd57805173ffffffffffffffffffffffffffffffffffffffff161561363e579392505050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff16151592810192909252156136f8579392505050565b61363e565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3373ffffffffffffffffffffffffffffffffffffffff8316036137f7576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613899848484613ba8565b73ffffffffffffffffffffffffffffffffffffffff83163b151580156138c857506138c684848484613f3a565b155b156114dc576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600f80546112b090614a1c565b6060600061391b836140b4565b600101905060008167ffffffffffffffff81111561393b5761393b6144bb565b6040519080825280601f01601f191660200182016040528015613965576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461396f57509392505050565b6060600d80546112b090614a1c565b6060600b80546112b090614a1c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480613a7d57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610f4b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610f4b565b600081815b8451811015613b1257613afe82868381518110613af157613af1614c57565b6020026020010151614196565b915080613b0a816149e4565b915050613ad2565b509392505050565b61143f83838360016141c2565b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613bb382613556565b805190915060009073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613c255750815173ffffffffffffffffffffffffffffffffffffffff16600090815260076020908152604080832033845290915290205460ff165b80613c4d575033613c3584611333565b73ffffffffffffffffffffffffffffffffffffffff16145b905080613c86576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614613cef576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416613d3c576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613d4c6000848460000151613b27565b73ffffffffffffffffffffffffffffffffffffffff858116600090815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff9283167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080547fffffffff000000000000000000000000000000000000000000000000000000001690941774010000000000000000000000000000000000000000429092169190910217909255908601808352912054909116613ed957600054811015613ed9578251600082815260046020908152604090912080549186015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff909316929092171790555b50828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612ac3565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613f95903390899088908890600401614d4a565b6020604051808303816000875af1925050508015613fee575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613feb91810190614d93565b60015b614065573d80801561401c576040519150601f19603f3d011682016040523d82523d6000602084013e614021565b606091505b50805160000361405d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106140fd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614129576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061414757662386f26fc10000830492506010015b6305f5e100831061415f576305f5e100830492506008015b612710831061417357612710830492506004015b60648310614185576064830492506002015b600a8310610f4b5760010192915050565b60008183106141b2576000828152602084905260409020612d54565b5060009182526020526040902090565b60005473ffffffffffffffffffffffffffffffffffffffff8516614212576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360000361424c576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168c01811690920217909155858452600490925290912080547fffffffff000000000000000000000000000000000000000000000000000000001690921774010000000000000000000000000000000000000000429092169190910217905580808501838015614367575073ffffffffffffffffffffffffffffffffffffffff87163b15155b15614415575b604051829073ffffffffffffffffffffffffffffffffffffffff8916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46143c56000888480600101955088613f3a565b6143fb576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80820361436d57826000541461441057600080fd5b614467565b5b60405160018301929073ffffffffffffffffffffffffffffffffffffffff8916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203614416575b50600055612ac3565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612f7b57600080fd5b6000602082840312156144b057600080fd5b8135612d5481614470565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614531576145316144bb565b604052919050565b6000806040838503121561454c57600080fd5b8235915060208084013567ffffffffffffffff8082111561456c57600080fd5b818601915086601f83011261458057600080fd5b813581811115614592576145926144bb565b8060051b91506145a38483016144ea565b81815291830184019184810190898411156145bd57600080fd5b938501935b838510156145db578435825293850193908501906145c2565b8096505050505050509250929050565b60005b838110156146065781810151838201526020016145ee565b50506000910152565b600081518084526146278160208601602086016145eb565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612d54602083018461460f565b60006020828403121561467e57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146146a957600080fd5b919050565b600080604083850312156146c157600080fd5b6146ca83614685565b946020939093013593505050565b6000602082840312156146ea57600080fd5b612d5482614685565b60008060006060848603121561470857600080fd5b61471184614685565b925061471f60208501614685565b9150604084013590509250925092565b6000806040838503121561474257600080fd5b50508035926020909101359150565b6000806040838503121561476457600080fd5b61476d83614685565b915060208301356bffffffffffffffffffffffff8116811461478e57600080fd5b809150509250929050565b600067ffffffffffffffff8311156147b3576147b36144bb565b6147e460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016144ea565b90508281528383830111156147f857600080fd5b828260208301376000602084830101529392505050565b60006020828403121561482157600080fd5b813567ffffffffffffffff81111561483857600080fd5b8201601f8101841361484957600080fd5b6140ac84823560208401614799565b8015158114612f7b57600080fd5b60006020828403121561487857600080fd5b8135612d5481614858565b6020808252825182820181905260009190848201906040850190845b818110156148bb5783518352928401929184019160010161489f565b50909695505050505050565b600080604083850312156148da57600080fd5b6148e383614685565b9150602083013561478e81614858565b6000806000806080858703121561490957600080fd5b61491285614685565b935061492060208601614685565b925060408501359150606085013567ffffffffffffffff81111561494357600080fd5b8501601f8101871361495457600080fd5b61496387823560208401614799565b91505092959194509250565b6000806040838503121561498257600080fd5b61498b83614685565b915061499960208401614685565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610f4b57610f4b6149a2565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614a1557614a156149a2565b5060010190565b600181811c90821680614a3057607f821691505b602082108103614a69577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610f4b57610f4b6149a2565b600082614abc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f82111561143f57600081815260208120601f850160051c81016020861015614ae85750805b601f850160051c820191505b8181101561129957828155600101614af4565b815167ffffffffffffffff811115614b2157614b216144bb565b614b3581614b2f8454614a1c565b84614ac1565b602080601f831160018114614b885760008415614b525750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611299565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614bd557888601518255948401946001909101908401614bb6565b5085821015614c1157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614c3357600080fd5b5051919050565b600060208284031215614c4c57600080fd5b8151612d5481614858565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154614c9381614a1c565b60018281168015614cab5760018114614cde57614d0d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450614d0d565b8560005260208060002060005b85811015614d045781548a820152908401908201614ceb565b50505082870194505b5050505092915050565b6000614d238286614c86565b8451614d338183602089016145eb565b614d3f81830186614c86565b979650505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614d89608083018461460f565b9695505050505050565b600060208284031215614da557600080fd5b8151612d548161447056fea264697066735822122030ae9b4aa10e9e975c5426db05c7317bdeaddab6136c615634baf8b6f816129d64736f6c6343000813003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001800000000000000000000000009d2d194a33a976c654df31c65fc6c870fefb4d8d000000000000000000000000000000000000000000000000000000000000000e47656e6573697320547972616e7a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006545952414e5a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f747972616e7a2e78797a2f6d657461646174612f6567672f6d6574612f475f6567672e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003568747470733a2f2f747972616e7a2e78797a2f6d657461646174612f7072696d616c5f6567672f6d6574612f506567672e6a736f6e0000000000000000000000
Deployed Bytecode
0x6080604052600436106105225760003560e01c8063742bdeb3116102af578063c668286211610179578063f2a4a82e116100d6578063fc0c546a1161008a578063fc97450e1161006f578063fc97450e14610ee6578063fe64d30214610f00578063fee1a6e814610f2057600080fd5b8063fc0c546a14610e99578063fc529de214610ec657600080fd5b8063f2fde38b116100bb578063f2fde38b14610e29578063f61f23d114610e49578063f7fc703814610e6957600080fd5b8063f2a4a82e14610ddc578063f2c4ce1e14610e0957600080fd5b8063e7da4abe1161012d578063ebf0c71711610112578063ebf0c71714610d76578063edc2fcfb14610d8c578063eeffbe4e14610dac57600080fd5b8063e7da4abe14610d00578063e985e9c514610d2057600080fd5b8063cb5154241161015e578063cb51542414610c9a578063cefeac2514610cba578063d5abeb0114610cea57600080fd5b8063c668286214610c65578063c87b56dd14610c7a57600080fd5b8063973fb3e911610227578063b88d4fde116101db578063ba7d2c76116101c0578063ba7d2c7614610c0c578063c1b2360f14610c22578063c5528d2d14610c3857600080fd5b8063b88d4fde14610bd6578063b9dfe97914610bf657600080fd5b80639ec652841161020c5780639ec6528414610b83578063a22cb46514610b96578063a4cc0e6f14610bb657600080fd5b8063973fb3e914610b435780639beda6c514610b6357600080fd5b80638462151c1161027e5780638ba4cc3c116102635780638ba4cc3c14610ae35780638da5cb5b14610b0357806395d89b4114610b2e57600080fd5b80638462151c14610aa1578063877ffd5714610ace57600080fd5b8063742bdeb314610a2a57806375a6d80c14610a4a57806375b860eb14610a6a57806380a2656b14610a7f57600080fd5b806341f43434116103f0578063562cd849116103685780636b7b4e491161031c57806370a082311161030157806370a08231146109d6578063715018a6146109f6578063726444be14610a0b57600080fd5b80636b7b4e49146109ae5780636c0360eb146109c157600080fd5b80636352211e1161034d5780636352211e1461094e57806366a2b4201461096e578063685365de1461098e57600080fd5b8063562cd849146109185780635b621f721461093857600080fd5b80634c261247116103bf57806351830227116103a457806351830227146108b757806353175838146108d857806355f804b3146108f857600080fd5b80634c261247146108775780634ec667d21461089757600080fd5b806341f434341461080057806342842e0e14610822578063457a1c84146108425780634b17fa871461085757600080fd5b806318160ddd1161049e578063239c70ae116104525780632a55205a116104375780632a55205a146107745780632d78c188146107c0578063353d12c1146107e057600080fd5b8063239c70ae1461073e57806323b872dd1461075457600080fd5b8063190c351611610483578063190c3516146106d15780631e8d0311146106f157806321ef55201461071157600080fd5b806318160ddd1461066957806318cae269146106a457600080fd5b8063081c8c44116104f55780630e93cad5116104da5780630e93cad51461061a5780630ee05cbb1461062f57806313faede61461065357600080fd5b8063081c8c44146105e5578063095ea7b3146105fa57600080fd5b806301ffc9a7146105275780630659793b1461055c57806306fdde031461057e578063081812fc146105a0575b600080fd5b34801561053357600080fd5b5061054761054236600461449e565b610f40565b60405190151581526020015b60405180910390f35b34801561056857600080fd5b5061057c610577366004614539565b610f51565b005b34801561058a57600080fd5b506105936112a1565b6040516105539190614659565b3480156105ac57600080fd5b506105c06105bb36600461466c565b611333565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610553565b3480156105f157600080fd5b5061059361139d565b34801561060657600080fd5b5061057c6106153660046146ae565b61142b565b34801561062657600080fd5b50610593611444565b34801561063b57600080fd5b5061064560205481565b604051908152602001610553565b34801561065f57600080fd5b5061064560135481565b34801561067557600080fd5b50600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610645565b3480156106b057600080fd5b506106456106bf3660046146d8565b60196020526000908152604090205481565b3480156106dd57600080fd5b5061057c6106ec3660046146d8565b611451565b3480156106fd57600080fd5b5061057c61070c36600461466c565b61149d565b34801561071d57600080fd5b5061064561072c3660046146d8565b601a6020526000908152604090205481565b34801561074a57600080fd5b5061064560145481565b34801561076057600080fd5b5061057c61076f3660046146f3565b6114aa565b34801561078057600080fd5b5061079461078f36600461472f565b6114e2565b6040805173ffffffffffffffffffffffffffffffffffffffff9093168352602083019190915201610553565b3480156107cc57600080fd5b506018546105479062010000900460ff1681565b3480156107ec57600080fd5b5061057c6107fb366004614751565b6115d9565b34801561080c57600080fd5b506105c06daaeb6d7670e522a718067333cd4e81565b34801561082e57600080fd5b5061057c61083d3660046146f3565b6115ef565b34801561084e57600080fd5b50610593611621565b34801561086357600080fd5b5061057c6108723660046146d8565b61162e565b34801561088357600080fd5b5061057c61089236600461480f565b61167d565b3480156108a357600080fd5b5061057c6108b2366004614866565b611799565b3480156108c357600080fd5b50601854610547906301000000900460ff1681565b3480156108e457600080fd5b5061057c6108f3366004614866565b6117db565b34801561090457600080fd5b5061057c61091336600461480f565b61181b565b34801561092457600080fd5b506106456109333660046146d8565b611868565b34801561094457600080fd5b5061064560115481565b34801561095a57600080fd5b506105c061096936600461466c565b611903565b34801561097a57600080fd5b5061057c61098936600461472f565b611915565b34801561099a57600080fd5b5061057c6109a936600461466c565b61195a565b61057c6109bc366004614539565b611992565b3480156109cd57600080fd5b50610593611e56565b3480156109e257600080fd5b506106456109f13660046146d8565b611e63565b348015610a0257600080fd5b5061057c611ee5565b348015610a1757600080fd5b5060185461054790610100900460ff1681565b348015610a3657600080fd5b5061057c610a4536600461466c565b611ef9565b348015610a5657600080fd5b50610645610a653660046146d8565b6123a2565b348015610a7657600080fd5b506105936123fb565b348015610a8b57600080fd5b5060185461054790640100000000900460ff1681565b348015610aad57600080fd5b50610ac1610abc3660046146d8565b612408565b6040516105539190614883565b348015610ada57600080fd5b5061057c612590565b348015610aef57600080fd5b5061057c610afe3660046146ae565b6125c6565b348015610b0f57600080fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff166105c0565b348015610b3a57600080fd5b50610593612683565b348015610b4f57600080fd5b5061057c610b5e36600461466c565b612692565b348015610b6f57600080fd5b5061057c610b7e36600461480f565b61269f565b61057c610b9136600461466c565b6126b3565b348015610ba257600080fd5b5061057c610bb13660046148c7565b612a6f565b348015610bc257600080fd5b5061057c610bd136600461466c565b612a83565b348015610be257600080fd5b5061057c610bf13660046148f3565b612a90565b348015610c0257600080fd5b5061064560165481565b348015610c1857600080fd5b5061064560155481565b348015610c2e57600080fd5b5061064560175481565b348015610c4457600080fd5b50610645610c533660046146d8565b601b6020526000908152604090205481565b348015610c7157600080fd5b50610593612aca565b348015610c8657600080fd5b50610593610c9536600461466c565b612ad7565b348015610ca657600080fd5b5061057c610cb536600461480f565b612e1a565b348015610cc657600080fd5b50610547610cd536600461466c565b601e6020526000908152604090205460ff1681565b348015610cf657600080fd5b5061064560125481565b348015610d0c57600080fd5b5061057c610d1b36600461480f565b612e2e565b348015610d2c57600080fd5b50610547610d3b36600461496f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610d8257600080fd5b50610645601f5481565b348015610d9857600080fd5b5061057c610da7366004614866565b612e7a565b348015610db857600080fd5b50610547610dc736600461466c565b601c6020526000908152604090205460ff1681565b348015610de857600080fd5b506021546105c09073ffffffffffffffffffffffffffffffffffffffff1681565b348015610e1557600080fd5b5061057c610e2436600461480f565b612eb3565b348015610e3557600080fd5b5061057c610e443660046146d8565b612ec7565b348015610e5557600080fd5b5061057c610e6436600461466c565b612f7e565b348015610e7557600080fd5b50610547610e8436600461466c565b601d6020526000908152604090205460ff1681565b348015610ea557600080fd5b506022546105c09073ffffffffffffffffffffffffffffffffffffffff1681565b348015610ed257600080fd5b5061057c610ee1366004614866565b612fef565b348015610ef257600080fd5b506018546105479060ff1681565b348015610f0c57600080fd5b5061057c610f1b36600461466c565b61302e565b348015610f2c57600080fd5b5061057c610f3b36600461472f565b61303b565b6000610f4b8261304e565b92915050565b6000610f846001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b336000818152601b60209081526040808320549051949550939192610fdd92909188910160609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168252601482015260340190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012060185490915062010000900460ff161515600003611092576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c656400000000000000000000000000000060448201526064015b60405180910390fd5b61109f84602054836130a4565b151560000361110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6f7420656c696769626c6520746f20636c61696d00000000000000000000006044820152606401611089565b8115611172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920436c61696d656400000000000000000000000000000000006044820152606401611089565b600085116111dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b6012546111e986856149d1565b1115611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b60005b8581101561129957336000908152601b60205260408120805491611277836149e4565b91905055506112873360016130ba565b80611291816149e4565b915050611254565b505050505050565b6060600280546112b090614a1c565b80601f01602080910402602001604051908101604052809291908181526020018280546112dc90614a1c565b80156113295780601f106112fe57610100808354040283529160200191611329565b820191906000526020600020905b81548152906001019060200180831161130c57829003601f168201915b5050505050905090565b600061133e826130d4565b611374576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600c80546113aa90614a1c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d690614a1c565b80156114235780601f106113f857610100808354040283529160200191611423565b820191906000526020600020905b81548152906001019060200180831161140657829003601f168201915b505050505081565b8161143581613126565b61143f838361322b565b505050565b600e80546113aa90614a1c565b611459613336565b604051819073ffffffffffffffffffffffffffffffffffffffff8216904780156108fc02916000818181858888f1935050505015801561143f573d6000803e3d6000fd5b6114a5613336565b601355565b8273ffffffffffffffffffffffffffffffffffffffff811633146114d1576114d133613126565b6114dc8484846133b7565b50505050565b600082815260096020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692820192909252829161159d57506040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b6020810151600090612710906115c1906bffffffffffffffffffffffff1687614a6f565b6115cb9190614a86565b915196919550909350505050565b6115e1613336565b6115eb82826133c2565b5050565b8273ffffffffffffffffffffffffffffffffffffffff811633146116165761161633613126565b6114dc84848461353b565b600d80546113aa90614a1c565b611636613336565b602280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611685613336565b6018546301000000900460ff161561171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f6f6e652074696d6520757365204f6e6c79206265206361726566756c206d792060448201527f44657600000000000000000000000000000000000000000000000000000000006064820152608401611089565b600b61172b8282614b07565b50601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff16630100000017905560408051600b8152610d0560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91015b60405180910390a150565b6117a1613336565b60188054911515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909216919091179055565b6117e3613336565b6018805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b611823613336565b600b61182f8282614b07565b5060408051600b8152610d0560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910161178e565b6021546040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015260016024830152600092169062fdd58e906044015b602060405180830381865afa1580156118df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4b9190614c21565b600061190e82613556565b5192915050565b61191d613336565b60408051838152602081018390527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910160405180910390a15050565b611962613336565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200161178e565b60006119c56001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b336000818152601a60205260408082205460215491517efdd58e000000000000000000000000000000000000000000000000000000008152600481019490945260016024850152939450909173ffffffffffffffffffffffffffffffffffffffff9091169062fdd58e90604401602060405180830381865afa158015611a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a739190614c21565b90506000611a82826003614a6f565b90506000611a918260036149d1565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152909150600090603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012060185490915060ff161515600003611b72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b611b7f87601f54836130a4565b1515600003611bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f75736572206e6f742057686974656c69737465640000000000000000000000006044820152606401611089565b60008811611c54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b601154611c6189886149d1565b1115611cc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b81611cd489876149d1565b1115611d3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401611089565b6006881115611da7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178206d696e7420782073657373696f6e20726561636865640000000000006044820152606401611089565b87601354611db59190614a6f565b3414611e1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f696e636f727265637420616d6f756e74000000000000000000000000000000006044820152606401611089565b336000908152601a6020526040812080548a9290611e3c9084906149d1565b90915550611e4c905033896130ba565b5050505050505050565b600b80546113aa90614a1c565b600073ffffffffffffffffffffffffffffffffffffffff8216611eb2576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b611eed613336565b611ef76000613731565b565b6022546040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611f68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8c9190614c21565b601854909150640100000000900460ff161515600003612008576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b61201182611903565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f53656e646572206d757374206265204f776e65720000000000000000000000006044820152606401611089565b602160165410612111576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e667573696f6e2043617020526561636865640000000000000000000000006044820152606401611089565b6000828152601c602052604090205460ff16151560010361218e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e277420496e66757365205072696d616c730000000000000000000000006044820152606401611089565b6000828152601e602052604090205460ff16151560010361220b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920496e667573656400000000000000000000000000000000006044820152606401611089565b601754811015612277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e737566666963656e7420547972616e6974650000000000000000000000006044820152606401611089565b60168054906000612287836149e4565b90915550506000828152601e60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7906122f59084815260200190565b60405180910390a16022546017546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019190915273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af115801561237e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143f9190614c3a565b6022546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015260009216906370a08231906024016118c2565b600f80546113aa90614a1c565b6060600061241583611e63565b67ffffffffffffffff81111561242d5761242d6144bb565b604051908082528060200260200182016040528015612456578160200160208202803683370190505b506000805491925080805b83811015612585576000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161580159282019290925290612500575061257d565b805173ffffffffffffffffffffffffffffffffffffffff161561252257805192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361257b578186858060010196508151811061256e5761256e614c57565b6020026020010181815250505b505b600101612461565b509295945050505050565b612598613336565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016610100179055565b6125ce613336565b60006126016001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b60125490915061261183836149d1565b1115612679576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4d617820537570706c79207265616368656400000000000000000000000000006044820152606401611089565b61143f83836130ba565b6060600380546112b090614a1c565b61269a613336565b601755565b6126a7613336565b600e6115eb8282614b07565b60006126e66001546000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9190030190565b3360009081526019602052604090205490915082612760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401611089565b60125461276d84846149d1565b11156127d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b600a5473ffffffffffffffffffffffffffffffffffffffff163314612a655760115461280184846149d1565b1115612869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64204f75740000000000000000000000000000000000000000000000006044820152606401611089565b601854610100900460ff1615156000036128df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f46756e6374696f6e2044697361626c65640000000000000000000000000000006044820152606401611089565b6015546128ec84836149d1565b1115612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401611089565b6014548311156129c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178206d696e7420782073657373696f6e20726561636865640000000000006044820152606401611089565b826013546129ce9190614a6f565b3414612a36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f696e636f727265637420616d6f756e74000000000000000000000000000000006044820152606401611089565b3360009081526019602052604081208054859290612a559084906149d1565b9091555061143f905033846130ba565b61143f33846130ba565b81612a7981613126565b61143f83836137a8565b612a8b613336565b602055565b8373ffffffffffffffffffffffffffffffffffffffff81163314612ab757612ab733613126565b612ac38585858561388e565b5050505050565b601080546113aa90614a1c565b6060612ae2826130d4565b1515600003612b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f55524920717565727920666f7220756e6578697374656e7420546f6b656e00006044820152606401611089565b6018546301000000900460ff16158015612b7657506000828152601c602052604090205460ff16155b15612c0d57600c8054612b8890614a1c565b80601f0160208091040260200160405190810160405280929190818152602001828054612bb490614a1c565b8015612c015780601f10612bd657610100808354040283529160200191612c01565b820191906000526020600020905b815481529060010190602001808311612be457829003601f168201915b50505050509050919050565b6018546301000000900460ff16158015612c3a57506000828152601c602052604090205460ff1615156001145b15612c4c57600e8054612b8890614a1c565b6018546301000000900460ff1615156001148015612c7d57506000828152601c602052604090205460ff1615156001145b8015612c9857506000828152601d602052604090205460ff16155b15612caa57600e8054612b8890614a1c565b6018546301000000900460ff1615156001148015612cdb57506000828152601e602052604090205460ff1615156001145b8015612cf657506000828152601c602052604090205460ff16155b15612d5b576000612d056138ff565b90508051600003612d255760405180602001604052806000815250612d54565b600f612d308461390e565b6010604051602001612d4493929190614d17565b6040516020818303038152906040525b9392505050565b6018546301000000900460ff1615156001148015612d8c57506000828152601c602052604090205460ff1615156001145b8015612dab57506000828152601d602052604090205460ff1615156001145b15612de5576000612dba6139cc565b90508051600003612dda5760405180602001604052806000815250612d54565b600d612d308461390e565b6000612def6139db565b90508051600003612e0f5760405180602001604052806000815250612d54565b600b612d308461390e565b612e22613336565b600f6115eb8282614b07565b612e36613336565b600d612e428282614b07565b506040805160018152600a60208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910161178e565b612e82613336565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b612ebb613336565b600c6115eb8282614b07565b612ecf613336565b73ffffffffffffffffffffffffffffffffffffffff8116612f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611089565b612f7b81613731565b50565b612f86613336565b6000818152601d60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79061178e9083815260200190565b612ff7613336565b60188054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b613036613336565b601f55565b613043613336565b601491909155601555565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610f4b5750610f4b826139ea565b6000826130b18584613acd565b14949350505050565b6115eb828260405180602001604052806000815250613b1a565b6000816001111580156130e8575060005482105b8015610f4b5750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b6daaeb6d7670e522a718067333cd4e3b15612f7b576040517fc617113400000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190614c3a565b612f7b576040517fede71dcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401611089565b600061323682611903565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361329d576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff8216148015906132f4575073ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff16155b1561332b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61143f838383613b27565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611089565b61143f838383613ba8565b6127106bffffffffffffffffffffffff82161115613462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401611089565b73ffffffffffffffffffffffffffffffffffffffff82166134df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401611089565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600855565b61143f83838360405180602001604052806000815250612a90565b60408051606081018252600080825260208201819052918101919091528180600111158015613586575060005481105b156136ff576000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906136fd57805173ffffffffffffffffffffffffffffffffffffffff161561363e579392505050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460209081526040918290208251606081018452905473ffffffffffffffffffffffffffffffffffffffff811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff16151592810192909252156136f8579392505050565b61363e565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3373ffffffffffffffffffffffffffffffffffffffff8316036137f7576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613899848484613ba8565b73ffffffffffffffffffffffffffffffffffffffff83163b151580156138c857506138c684848484613f3a565b155b156114dc576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600f80546112b090614a1c565b6060600061391b836140b4565b600101905060008167ffffffffffffffff81111561393b5761393b6144bb565b6040519080825280601f01601f191660200182016040528015613965576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461396f57509392505050565b6060600d80546112b090614a1c565b6060600b80546112b090614a1c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480613a7d57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610f4b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610f4b565b600081815b8451811015613b1257613afe82868381518110613af157613af1614c57565b6020026020010151614196565b915080613b0a816149e4565b915050613ad2565b509392505050565b61143f83838360016141c2565b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613bb382613556565b805190915060009073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613c255750815173ffffffffffffffffffffffffffffffffffffffff16600090815260076020908152604080832033845290915290205460ff165b80613c4d575033613c3584611333565b73ffffffffffffffffffffffffffffffffffffffff16145b905080613c86576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614613cef576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416613d3c576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613d4c6000848460000151613b27565b73ffffffffffffffffffffffffffffffffffffffff858116600090815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff9283167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080547fffffffff000000000000000000000000000000000000000000000000000000001690941774010000000000000000000000000000000000000000429092169190910217909255908601808352912054909116613ed957600054811015613ed9578251600082815260046020908152604090912080549186015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff0000000000000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff909316929092171790555b50828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612ac3565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613f95903390899088908890600401614d4a565b6020604051808303816000875af1925050508015613fee575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613feb91810190614d93565b60015b614065573d80801561401c576040519150601f19603f3d011682016040523d82523d6000602084013e614021565b606091505b50805160000361405d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106140fd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614129576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061414757662386f26fc10000830492506010015b6305f5e100831061415f576305f5e100830492506008015b612710831061417357612710830492506004015b60648310614185576064830492506002015b600a8310610f4b5760010192915050565b60008183106141b2576000828152602084905260409020612d54565b5060009182526020526040902090565b60005473ffffffffffffffffffffffffffffffffffffffff8516614212576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360000361424c576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168c01811690920217909155858452600490925290912080547fffffffff000000000000000000000000000000000000000000000000000000001690921774010000000000000000000000000000000000000000429092169190910217905580808501838015614367575073ffffffffffffffffffffffffffffffffffffffff87163b15155b15614415575b604051829073ffffffffffffffffffffffffffffffffffffffff8916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46143c56000888480600101955088613f3a565b6143fb576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80820361436d57826000541461441057600080fd5b614467565b5b60405160018301929073ffffffffffffffffffffffffffffffffffffffff8916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203614416575b50600055612ac3565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612f7b57600080fd5b6000602082840312156144b057600080fd5b8135612d5481614470565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614531576145316144bb565b604052919050565b6000806040838503121561454c57600080fd5b8235915060208084013567ffffffffffffffff8082111561456c57600080fd5b818601915086601f83011261458057600080fd5b813581811115614592576145926144bb565b8060051b91506145a38483016144ea565b81815291830184019184810190898411156145bd57600080fd5b938501935b838510156145db578435825293850193908501906145c2565b8096505050505050509250929050565b60005b838110156146065781810151838201526020016145ee565b50506000910152565b600081518084526146278160208601602086016145eb565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612d54602083018461460f565b60006020828403121561467e57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146146a957600080fd5b919050565b600080604083850312156146c157600080fd5b6146ca83614685565b946020939093013593505050565b6000602082840312156146ea57600080fd5b612d5482614685565b60008060006060848603121561470857600080fd5b61471184614685565b925061471f60208501614685565b9150604084013590509250925092565b6000806040838503121561474257600080fd5b50508035926020909101359150565b6000806040838503121561476457600080fd5b61476d83614685565b915060208301356bffffffffffffffffffffffff8116811461478e57600080fd5b809150509250929050565b600067ffffffffffffffff8311156147b3576147b36144bb565b6147e460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016144ea565b90508281528383830111156147f857600080fd5b828260208301376000602084830101529392505050565b60006020828403121561482157600080fd5b813567ffffffffffffffff81111561483857600080fd5b8201601f8101841361484957600080fd5b6140ac84823560208401614799565b8015158114612f7b57600080fd5b60006020828403121561487857600080fd5b8135612d5481614858565b6020808252825182820181905260009190848201906040850190845b818110156148bb5783518352928401929184019160010161489f565b50909695505050505050565b600080604083850312156148da57600080fd5b6148e383614685565b9150602083013561478e81614858565b6000806000806080858703121561490957600080fd5b61491285614685565b935061492060208601614685565b925060408501359150606085013567ffffffffffffffff81111561494357600080fd5b8501601f8101871361495457600080fd5b61496387823560208401614799565b91505092959194509250565b6000806040838503121561498257600080fd5b61498b83614685565b915061499960208401614685565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610f4b57610f4b6149a2565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614a1557614a156149a2565b5060010190565b600181811c90821680614a3057607f821691505b602082108103614a69577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610f4b57610f4b6149a2565b600082614abc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f82111561143f57600081815260208120601f850160051c81016020861015614ae85750805b601f850160051c820191505b8181101561129957828155600101614af4565b815167ffffffffffffffff811115614b2157614b216144bb565b614b3581614b2f8454614a1c565b84614ac1565b602080601f831160018114614b885760008415614b525750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611299565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614bd557888601518255948401946001909101908401614bb6565b5085821015614c1157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614c3357600080fd5b5051919050565b600060208284031215614c4c57600080fd5b8151612d5481614858565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154614c9381614a1c565b60018281168015614cab5760018114614cde57614d0d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450614d0d565b8560005260208060002060005b85811015614d045781548a820152908401908201614ceb565b50505082870194505b5050505092915050565b6000614d238286614c86565b8451614d338183602089016145eb565b614d3f81830186614c86565b979650505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614d89608083018461460f565b9695505050505050565b600060208284031215614da557600080fd5b8151612d548161447056fea264697066735822122030ae9b4aa10e9e975c5426db05c7317bdeaddab6136c615634baf8b6f816129d64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001800000000000000000000000009d2d194a33a976c654df31c65fc6c870fefb4d8d000000000000000000000000000000000000000000000000000000000000000e47656e6573697320547972616e7a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006545952414e5a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f747972616e7a2e78797a2f6d657461646174612f6567672f6d6574612f475f6567672e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003568747470733a2f2f747972616e7a2e78797a2f6d657461646174612f7072696d616c5f6567672f6d6574612f506567672e6a736f6e0000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Genesis Tyranz
Arg [1] : _symbol (string): TYRANZ
Arg [2] : _initNotRevealedUri (string): https://tyranz.xyz/metadata/egg/meta/G_egg.json
Arg [3] : _initNotRevLegendUri (string): https://tyranz.xyz/metadata/primal_egg/meta/Pegg.json
Arg [4] : drillContract (address): 0x9d2D194A33A976c654Df31C65fc6C870FeFb4D8D
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 0000000000000000000000009d2d194a33a976c654df31c65fc6c870fefb4d8d
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [6] : 47656e6573697320547972616e7a000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 545952414e5a0000000000000000000000000000000000000000000000000000
Arg [9] : 000000000000000000000000000000000000000000000000000000000000002f
Arg [10] : 68747470733a2f2f747972616e7a2e78797a2f6d657461646174612f6567672f
Arg [11] : 6d6574612f475f6567672e6a736f6e0000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [13] : 68747470733a2f2f747972616e7a2e78797a2f6d657461646174612f7072696d
Arg [14] : 616c5f6567672f6d6574612f506567672e6a736f6e0000000000000000000000
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.