Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
919 GLITCH
Holders
163
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 GLITCHLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GLITCHDECK
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /** G̷̭̑ L̷͉̕ I̴̜̘̅ T̴̳̗̽ C̴̤̽ H̸̘͑ ̴̠́ D̶͙͑̓͜ Ḝ̶͕̈ C̵̥͝ K̵̞͖͋ Animated Generative Glitch Art .------..------..------..------..------..------. |G.--.♦||L.--.♠||I.--.♥||T.--.♠||C.--.♦||H.--.♠| | :/\: || :/\: || (\/) || :/\: || :/\: || :/\: | | :\/: || (__) || :\/: || (__) || :\/: || (__) | |♦'--'G||♠'--'L||♥'--'I||♠'--'T||♦'--'C||♠'--'H| `------'`------'`------'`------'`------'`------' .------..------..------..------. .------..------..------. |D.--.♠||E.--.♥||C.--.♦||K.--.♦|.-. |N.--.♣||F.--.♣||T.--.♠| | :/\: || (\/) || :/\: || :/\: ((X)) | :(): || :(): || :/\: | | (__) || :\/: || :\/: || :\/: |'-.-.| ()() || ()() || (__) | |♠'--'D||♥'--'E||♦'--'C||♦'--'K| ((V))♣'--'N||♣'--'F||♠'--'T| `------'`------'`------'`------' '-'`------'`------'`------' GLITCH DECK NFT is a pioneering glitch-art project by Jim Dee of GenerativeNFTs.io (@SwiggaJuice). It consists of 8,100 playing-card-themed ANIMATED glitch-art NFTs with regular and dynamic traits (meaning, even when two NFTs have the same trait, they often appear differently on each NFT, bestowing even more uniqueness to each token than normal generative sets). As of today (Feb. 13, 2023), the artwork is generating. I expect the final total size of the drop to surpass 90GB(!) and require a full week to render. Reveal is scheduled for Feb. 21, 2023, depending on final rendering / uploading time. Of the 8,100 tokens: up to 2,699 are available to the Deck of Degeneracy (DoD) NFT community as follows: 1̴̩̩̉ FIVE free mints per holder (512 holders * 5 == 2560 mints) via exclulsive open allow-list for one week. All DoD holder wallets (as of a snapshot taken at 9:51pm PST on Feb. 11, 2023) have been allow-listed for the claim period. The free-claim allow-list itself will remain open until full set mint-out, but mints will not be guaranteed after the first week, as the public could mint the set out anytime thereafter after. 2̵͔͒͑ 43 contract claims allotted to DoD top-five holders. Claims will be available for two weeks. After that, this allotment will be returned to the public supply pool. 3̷̟̋ 96 special editions will be airdropped, *post-mint-out*, to those who held 6+ DoD NFTs as of my snapshot on Feb. 11, 2023. Public sale opens one week after allow-list launch. Marketing Partner bonus for DoD holders: 40% of the primary mint proceeds will be stored in this wallet: 0xa7CfE42834468cedbD986D58950700E84AEE59A0. The funds that accrue there, provided they meet levels and timeline discussed at GlitchDeck.xyz, will be sent out equally among all holders of DoD as of snapshot date (above). Detailed info on how that works is available on the web site, but the goal is to sell out this (awesome) set, get cool glitch-art collectibles into DoD hands, and possibly distribute approximately $100k in ETH (current value) equally among the 512 current holders in the snapshot. Will we realize this crazy goal? I have no idea. But we can try. :-) For info see GlitchDeck.xyz. Thanks & good luck! ♠ ♣ ♥ ♦ J̴̙̺͂i̷̗͎̍̍̀̕m̵̛͈͗͒̓̿ ♠ ♣ ♥ ♦ */ pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {DefaultOperatorFilterer} from 'operator-filter-registry/src/DefaultOperatorFilterer.sol'; contract GLITCHDECK is Ownable, ERC721A, PaymentSplitter, DefaultOperatorFilterer { uint public maxSupply = 8100; // Hard-coded ceiling in setMaxSupply() also. uint public mintPrice = 0.042 ether; // Initial street price (subject to change) uint public degenPrice = 0 ether; // Allowlist price for DoD holders uint public promoPrice = 0.037 ether; // Initial promo price if offered via affiliates: bool public presaleIsLive = false; // (Affiliates earn ~0.0055 / mint, if engaged) string public provenanceHash; // TB calc'd / set post-launch, as 90GB+ still generating! uint public reservedNFTs; bool public saleIsLive = false; uint public walletLimit = 100; string private contractURIval; string private metadataURI; bool private mintLock; bool private provenanceLock = false; uint id = totalSupply(); bytes32 public merkleRoot; mapping(address => bool) public allowlistClaimed; struct Account { uint nftsReserved; uint mintedNFTs; uint isAdmin; } mapping(address => Account) public accounts; struct AffiliateAccount { uint affiliateFee; uint affiliateUnpaidSales; uint affiliateTotalSales; uint affiliateAmountPaid; address affiliateReceiver; bool affiliateIsActive; } mapping(string => AffiliateAccount) public affiliateAccounts; event Mint(address indexed sender, uint totalSupply); event PermanentURI(string _value, uint256 indexed _id); event Burn(address indexed sender, uint indexed _id); address[] private _distro; uint[] private _distro_shares; string[] private affiliateDistro; constructor(address[] memory distro, uint[] memory distro_shares, address[] memory teamclaim, bytes32 _merkleRoot) ERC721A("Glitch Deck NFT", "GLITCH") PaymentSplitter(distro, distro_shares) { metadataURI = "https://api.generativenfts.io/glitchdeck-prereveal/"; // Prereveal accounts[msg.sender] = Account( 0, 0, 0 ); // ♠ ♣ ♥ ♦ Accounts ♠ ♣ ♥ ♦ accounts[teamclaim[0]] = Account( 50, 0, 3); // GlitchDeck deployer accounts[teamclaim[1]] = Account( 25, 0, 1); // JD wallet accounts[teamclaim[2]] = Account( 25, 0, 1); // WD wallet accounts[teamclaim[3]] = Account( 2, 0, 1); // 60-DoD holder -- claim by 2-28-23 accounts[teamclaim[4]] = Account( 5, 0, 1); // 65-DoD holder -- claim by 2-28-23 accounts[teamclaim[5]] = Account( 5, 0, 1); // 65-DoD holder -- claim by 2-28-23 accounts[teamclaim[6]] = Account( 6, 0, 1); // 98-DoD holder -- claim by 2-28-23 accounts[teamclaim[7]] = Account( 10, 0, 1); // 103-DoD holder -- claim by 2-28-23 accounts[teamclaim[8]] = Account( 15, 0, 1); // 109-DoD holder -- claim by 2-28-23 accounts[teamclaim[9]] = Account( 96, 0, 1); // 6+-DoD holder special editions // t/b airdropped post-mint-out reservedNFTs = 239; _distro = distro; _distro_shares = distro_shares; // Merkle tree: merkleRoot = _merkleRoot; } // ♠ ♣ ♥ ♦ Modifiers ♠ ♣ ♥ ♦ modifier minAdmin1() { require(accounts[msg.sender].isAdmin > 0 , "Error: Level 1(+) admin clearance required."); _; } modifier minAdmin2() { require(accounts[msg.sender].isAdmin > 1, "Error: Level 2(+) admin clearance required."); _; } modifier minAdmin3() { require(accounts[msg.sender].isAdmin > 2, "Error: Level 3(+) admin clearance required."); _; } modifier noReentrant() { require(!mintLock, "Error: No re-entrancy."); mintLock = true; _; mintLock = false; } // ♠ ♣ ♥ ♦ Overrides ♠ ♣ ♥ ♦ // ERC721A: Start token IDs at 1 instead of 0 function _startTokenId() internal view virtual override returns (uint256) { return 1; } // ERC721A: Xfer functions for OS Operator Filter Registry function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } // ERC721A: Xfer functions for OS Operator Filter Registry function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } // ERC721A: Xfer functions for OS Operator Filter Registry function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } // OZ Payment Splitter, make release() restricted to minAdmin3 // (I do this to prevent strangeness if/when we sell via affiliates / influencers.) function release(address payable account) public override minAdmin3 { super.release(account); } // OZ Payment Splitter, make release() restricted to minAdmin3 function release(IERC20 token, address account) public override minAdmin3 { super.release(token, account); } // ♠ ♣ ♥ ♦ Setters ♠ ♣ ♥ ♦ function adminLevelRaise(address _addr) external onlyOwner { accounts[_addr].isAdmin ++; } function adminLevelLower(address _addr) external onlyOwner { accounts[_addr].isAdmin --; } // basic mint function for anyone desiring to mint from the contract function contractMint(uint _amount) external payable noReentrant { require(saleIsLive, "Error: Sale is not active. Via contractMint()."); require(totalSupply() + _amount <= (maxSupply - reservedNFTs), "Error: Purchase would exceed max supply. Via contractMint()."); require((_amount + accounts[msg.sender].mintedNFTs) <= walletLimit, "Error: You would exceed the wallet limit. Via contractMint()."); require(!isContract(msg.sender), "Error: Contracts cannot mint. Via contractMint()."); require(msg.value >= (mintPrice * _amount), "Error: Not enough ether sent. Via contractMint()."); accounts[msg.sender].mintedNFTs += _amount; _safeMint(msg.sender, _amount); emit Mint(msg.sender, totalSupply()); } function provenanceHashLock() external onlyOwner { provenanceLock = true; } function provenanceSet(string memory _provenanceHash) external onlyOwner { require(provenanceLock == false); provenanceHash = _provenanceHash; } function reservesDecrease(uint _decreaseReservedBy, address _addr) external onlyOwner { require(reservedNFTs - _decreaseReservedBy >= 0, "Error: This would make reserved less than 0."); require(accounts[_addr].nftsReserved - _decreaseReservedBy >= 0, "Error: User does not have this many reserved NFTs."); reservedNFTs -= _decreaseReservedBy; accounts[_addr].nftsReserved -= _decreaseReservedBy; } function reservesIncrease(uint _increaseReservedBy, address _addr) external onlyOwner { require(reservedNFTs + totalSupply() + _increaseReservedBy <= maxSupply, "Error: This would exceed the max supply."); reservedNFTs += _increaseReservedBy; accounts[_addr].nftsReserved += _increaseReservedBy; if ( accounts[_addr].isAdmin == 0 ) { accounts[_addr].isAdmin ++; } } function salePresaleActivate() external minAdmin2 { presaleIsLive = true; } function salePresaleDeactivate() external minAdmin2 { presaleIsLive = false; } function salePublicActivate() external minAdmin2 { saleIsLive = true; } function salePublicDeactivate() external minAdmin2 { saleIsLive = false; } function setBaseURI(string memory _newURI) external minAdmin2 { metadataURI = _newURI; } function setContractURI(string memory _newURI) external onlyOwner { contractURIval = _newURI; } function setMaxSupply(uint _maxSupply) external onlyOwner { require(_maxSupply <= 8100, 'Error: New max supply cannot exceed original max.'); maxSupply = _maxSupply; } function setMintPrice(uint _newPrice) external onlyOwner { mintPrice = _newPrice; } function setPromoPrice(uint _newPrice) external onlyOwner { promoPrice = _newPrice; } function setWalletLimit(uint _newLimit) external onlyOwner { walletLimit = _newLimit; } // ♠ ♣ ♥ ♦ Getters ♠ ♣ ♥ ♦ // -- For OpenSea function contractURI() public view returns (string memory) { return contractURIval; } // -- For Metadata function _baseURI() internal view virtual override returns (string memory) { return metadataURI; } // ♠ ♣ ♥ ♦ Main NFT Drop Mgmt. Functions ♠ ♣ ♥ ♦ function airDropNFT(address[] memory _addr) external minAdmin2 { require(totalSupply() + _addr.length <= (maxSupply - reservedNFTs), "Error: You would exceed the airdrop limit."); for (uint i = 0; i < _addr.length; i++) { _safeMint(_addr[i], 1); emit Mint(msg.sender, totalSupply()); } } function claimReserved(uint _amount) external minAdmin1 { require(_amount > 0, "Error: Need to have reserved supply."); require(accounts[msg.sender].nftsReserved >= _amount, "Error: You are trying to claim more NFTs than you have reserved."); require(totalSupply() + _amount <= maxSupply, "Error: You would exceed the max supply limit."); accounts[msg.sender].nftsReserved -= _amount; reservedNFTs -= _amount; _safeMint(msg.sender, _amount); emit Mint(msg.sender, totalSupply()); } function mint(uint _amount, bool isAffiliate, string memory affiliateRef) external payable noReentrant { require(saleIsLive, "Error: Sale is not active."); require(totalSupply() + _amount <= (maxSupply - reservedNFTs), "Error: Purchase would exceed max supply."); require((_amount + accounts[msg.sender].mintedNFTs) <= walletLimit, "Error: You would exceed the wallet limit."); require(!isContract(msg.sender), "Error: Contracts cannot mint."); if(isAffiliate) { require(msg.value >= (promoPrice * _amount), "Error: Not enough ether sent."); bool isActive = affiliateAccounts[affiliateRef].affiliateIsActive; require(isActive, "Error: Affiliate account invalid or disabled."); affiliateAccounts[affiliateRef].affiliateUnpaidSales += _amount; affiliateAccounts[affiliateRef].affiliateTotalSales += _amount; } else { require(msg.value >= (mintPrice * _amount), "Error: Not enough ether sent."); } accounts[msg.sender].mintedNFTs += _amount; _safeMint(msg.sender, _amount); emit Mint(msg.sender, totalSupply()); } function burn(uint _id) external returns (bool, uint) { require(msg.sender == ownerOf(_id) || msg.sender == getApproved(_id) || isApprovedForAll(ownerOf(_id), msg.sender), "Error: You must own this token to burn it."); _burn(_id); emit Burn(msg.sender, _id); return (true, _id); } // Below is functionality for our Affiliate Marketing program. // ♠ ♣ ♥ ♦ See: tinyurl.com/NFTaffiliateProgram for deets. // Payout Function 1 --> Distribute Shares to Affiliates *and* Payees (DSAP) // In addition to including this function, we also modified the PaymentSplitter // release() function to make it minAdmin3, offering further assurance to // affiliates that affiliate funds will be paid out prior to defined shares. function distributeSharesAffilsAndPayees() external minAdmin2 noReentrant { // A. Payout affiliates: for (uint i = 0; i < affiliateDistro.length; i++) { // The ref name -- eg. jim, etc. string memory affiliateRef = affiliateDistro[i]; // The wallet addr to be paid for this affiliate: address DSAP_receiver_wallet = affiliateAccounts[affiliateRef].affiliateReceiver; // The fee due per sale for this affiliate: uint DSAP_fee = affiliateAccounts[affiliateRef].affiliateFee; // The # of mints they are credited with: uint DSAP_mintedNFTs = affiliateAccounts[affiliateRef].affiliateUnpaidSales; // Payout calc: uint DSAP_payout = DSAP_fee * DSAP_mintedNFTs; if ( DSAP_payout == 0 ) { continue; } // Require that the contract balance is enough to send out ETH: require(address(this).balance >= DSAP_payout, "Error: Insufficient balance"); // Send payout to the affiliate: (bool sent, bytes memory data) = payable(DSAP_receiver_wallet).call{value: DSAP_payout}(""); require(sent, "Error: Failed to send ETH to receiver"); // Update total amt earned for this person: affiliateAccounts[affiliateRef].affiliateAmountPaid += DSAP_payout; // Set their affiliateUnpaidSales back to 0: affiliateAccounts[affiliateRef].affiliateUnpaidSales = 0; } // B. Then pay defined shareholders: for (uint i = 0; i < _distro.length; i++) { release(payable(_distro[i])); } } // Payout Function 2 --> Standard distribute per OZ payment splitter // (present as a backup distrubute mechanism only, and/or a normal one if no affiliates). function distributeSharesPayeesOnly() external onlyOwner { for (uint i = 0; i < _distro.length; i++) { release(payable(_distro[i])); } } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } // (^_^) GenNFTs Affiliate Program functions (^_^) // New functionality created by GenerativeNFTs.io to aid in influencer trust and transparency. function genNftsAffiliateAdd(address _addr, string memory affiliateRef, uint fee) external onlyOwner { // REMINDER: Submit fee in WEI! require(fee > 0, "Error: Fee must be > 0 (and s/b in WEI)."); // FORMAT: lowercase alpha-numeric; will enforce in affiliateValidateName(). require(validateAffiliateName(affiliateRef), "Error: Affiliate Reference code used doesn't pass validations."); // ORDER: fee, minted NFTs, ttl minted, ttl amt earned, wallet, active: affiliateAccounts[affiliateRef] = AffiliateAccount(fee, 0, 0, 0, _addr, true); affiliateDistro.push(affiliateRef); } function genNftsAffiliateDisable(string memory affiliateRef) external onlyOwner { require(affiliateAccounts[affiliateRef].affiliateFee > 0 , "Error: Affiliate reference likely wrong."); affiliateAccounts[affiliateRef].affiliateIsActive = false; } function genNftsAffiliateEnable(string memory affiliateRef) external onlyOwner { require(affiliateAccounts[affiliateRef].affiliateFee > 0 , "Error: Affiliate reference likely wrong."); affiliateAccounts[affiliateRef].affiliateIsActive = true; } function genNftsLookupAffilRef(address _addr) public view returns (string memory) { for (uint i = 0; i < affiliateDistro.length; i++) { string memory affiliateRef = affiliateDistro[i]; address thisWallet = affiliateAccounts[affiliateRef].affiliateReceiver; if ( thisWallet==_addr ) { return affiliateRef; } } } function validateAffiliateName(string memory str) public pure returns (bool){ bytes memory b = bytes(str); if ( b.length < 3 ) return false; if ( b.length > 15 ) return false; // Can't be > 15 chars if ( b[0] == 0x20 ) return false; // No leading space if ( b[b.length - 1] == 0x20 ) return false; // No trailing space bytes1 lastChar = b[0]; for( uint i; i < b.length; i++ ){ bytes1 char = b[i]; if (char == 0x20) return false; // Can't contain spaces // We want all lowercase alpha-numeric here. // But to include UC as well, add: // !(char >= 0x41 && char <= 0x5A) && // A-Z if ( !(char >= 0x30 && char <= 0x39) && // 9-0 !(char >= 0x61 && char <= 0x7A) // a-z ) return false; lastChar = char; } return true; } function allowlistMint(bytes32[] calldata _merkleProof, uint _amount) external payable noReentrant { require(presaleIsLive, "Error: Allowlist Sale is not active."); require(totalSupply() + _amount <= (maxSupply - reservedNFTs), "Error: Purchase would exceed max supply."); require((_amount + accounts[msg.sender].mintedNFTs) <= 5, "Error: You would exceed the allow list limit."); require(!isContract(msg.sender), "Error: Contracts cannot mint."); require(msg.value >= (degenPrice * _amount), "Error: Not enough ether sent."); require(!allowlistClaimed[msg.sender], "Error: You have already claimed all of your NFTs."); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Error: You are not allowlisted."); if ( ( _amount + accounts[msg.sender].mintedNFTs ) == 5 ) { allowlistClaimed[msg.sender] = true; } accounts[msg.sender].mintedNFTs += _amount; _safeMint(msg.sender, _amount); emit Mint(msg.sender, totalSupply()); } function allowlistNewMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; } // ♠ ♣ ♥ ♦ THE END, FRENS! ♠ ♣ ♥ ♦ // LFG! @SwiggaJuice -- [email protected] // .--- .. -- .--.-. --. . -. . .-. .- - .. ...- . -. ..-. - ... .-.-.- .. --- }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../token/ERC721/extensions/IERC721Enumerable.sol";
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity 0.8.17; 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/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 MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); 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 ERC721A 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 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) { 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) { 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) { 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 { _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 override { address owner = ERC721A.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 ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.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; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.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; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, 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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. * */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[account] += payment; } Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" // cannot overflow. _erc20TotalReleased[token] += payment; unchecked { _erc20Released[token][account] += payment; } SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// 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 pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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 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.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 (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/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 (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); 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(operatorFilterRegistry).code.length > 0) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // 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) { _; return; } if ( !( operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender) && operatorFilterRegistry.isOperatorAllowed(address(this), from) ) ) { revert OperatorNotAllowed(msg.sender); } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"distro","type":"address[]"},{"internalType":"uint256[]","name":"distro_shares","type":"uint256[]"},{"internalType":"address[]","name":"teamclaim","type":"address[]"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"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"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","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":"address","name":"","type":"address"}],"name":"accounts","outputs":[{"internalType":"uint256","name":"nftsReserved","type":"uint256"},{"internalType":"uint256","name":"mintedNFTs","type":"uint256"},{"internalType":"uint256","name":"isAdmin","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"adminLevelLower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"adminLevelRaise","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"affiliateAccounts","outputs":[{"internalType":"uint256","name":"affiliateFee","type":"uint256"},{"internalType":"uint256","name":"affiliateUnpaidSales","type":"uint256"},{"internalType":"uint256","name":"affiliateTotalSales","type":"uint256"},{"internalType":"uint256","name":"affiliateAmountPaid","type":"uint256"},{"internalType":"address","name":"affiliateReceiver","type":"address"},{"internalType":"bool","name":"affiliateIsActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addr","type":"address[]"}],"name":"airDropNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlistClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"allowlistNewMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claimReserved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"contractMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"degenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeSharesAffilsAndPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeSharesPayeesOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"string","name":"affiliateRef","type":"string"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"genNftsAffiliateAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"affiliateRef","type":"string"}],"name":"genNftsAffiliateDisable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"affiliateRef","type":"string"}],"name":"genNftsAffiliateEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"genNftsLookupAffilRef","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"isAffiliate","type":"bool"},{"internalType":"string","name":"affiliateRef","type":"string"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","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":"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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleIsLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"promoPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHashLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_provenanceHash","type":"string"}],"name":"provenanceSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedNFTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_decreaseReservedBy","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"reservesDecrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_increaseReservedBy","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"reservesIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePresaleActivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePresaleDeactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePublicActivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePublicDeactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPromoPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLimit","type":"uint256"}],"name":"setWalletLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","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"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateAffiliateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"walletLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052611fa4601055669536c70891000060115560006012556683734dd0b080006013556014805460ff199081169091556017805490911690556064601855601b805461ff00191690556002546001540360001901601c553480156200006657600080fd5b50604051620060de380380620060de833981016040819052620000899162000d3a565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600185856040518060400160405280600f81526020016e11db1a5d18da08111958dac8139195608a1b8152506040518060400160405280600681526020016508e9892a886960d31b81525062000103620000fd6200094060201b60201c565b62000944565b600362000111838262000ebc565b50600462000120828262000ebc565b506001805550508051825114620001995760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001ec5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000190565b60005b825181101562000258576200024383828151811062000212576200021262000f88565b60200260200101518383815181106200022f576200022f62000f88565b60200260200101516200099460201b60201c565b806200024f8162000fb4565b915050620001ef565b5050506daaeb6d7670e522a718067333cd4e3b15620003a0578015620002ee57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620002cf57600080fd5b505af1158015620002e4573d6000803e3d6000fd5b50505050620003a0565b6001600160a01b038216156200033f5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620002b4565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200038657600080fd5b505af11580156200039b573d6000803e3d6000fd5b505050505b5050604051806060016040528060338152602001620060ab60339139601a90620003cb908262000ebc565b50604080516060808201835260008083526020808401828152848601838152338452601f808452878520965187559151600187015551600290950194909455845192830185526032835282018190526003938201939093528451909290859082906200043b576200043b62000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060198152602001600081526020016001815250601f600084600181518110620004bc57620004bc62000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060198152602001600081526020016001815250601f6000846002815181106200053d576200053d62000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060028152602001600081526020016001815250601f600084600381518110620005be57620005be62000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060058152602001600081526020016001815250601f6000846004815181106200063f576200063f62000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060058152602001600081526020016001815250601f600084600581518110620006c057620006c062000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060068152602001600081526020016001815250601f60008460068151811062000741576200074162000f88565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506040518060600160405280600a8152602001600081526020016001815250601f600084600781518110620007c257620007c262000f88565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506040518060600160405280600f8152602001600081526020016001815250601f60008460088151811062000843576200084362000f88565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528060608152602001600081526020016001815250601f600084600981518110620008c457620008c462000f88565b6020908102919091018101516001600160a01b031682528181019290925260409081016000208351815583830151600182015592015160029092019190915560ef60165584516200091c916021919087019062000b82565b5082516200093290602290602086019062000bec565b50601d555062000fec915050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821662000a015760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000190565b6000811162000a535760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000190565b6001600160a01b0382166000908152600b60205260409020541562000acf5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000190565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b6020526040902081905560095462000b3990829062000fd0565b600955604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b82805482825590600052602060002090810192821562000bda579160200282015b8281111562000bda57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000ba3565b5062000be892915062000c2a565b5090565b82805482825590600052602060002090810192821562000bda579160200282015b8281111562000bda57825182559160200191906001019062000c0d565b5b8082111562000be8576000815560010162000c2b565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000c825762000c8262000c41565b604052919050565b60006001600160401b0382111562000ca65762000ca662000c41565b5060051b60200190565b600082601f83011262000cc257600080fd5b8151602062000cdb62000cd58362000c8a565b62000c57565b82815260059290921b8401810191818101908684111562000cfb57600080fd5b8286015b8481101562000d2f5780516001600160a01b038116811462000d215760008081fd5b835291830191830162000cff565b509695505050505050565b6000806000806080858703121562000d5157600080fd5b84516001600160401b038082111562000d6957600080fd5b62000d778883890162000cb0565b955060209150818701518181111562000d8f57600080fd5b8701601f8101891362000da157600080fd5b805162000db262000cd58262000c8a565b81815260059190911b8201840190848101908b83111562000dd257600080fd5b928501925b8284101562000df25783518252928501929085019062000dd7565b60408b015190985094505050508082111562000e0d57600080fd5b5062000e1c8782880162000cb0565b606096909601519497939650505050565b600181811c9082168062000e4257607f821691505b60208210810362000e6357634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000eb757600081815260208120601f850160051c8101602086101562000e925750805b601f850160051c820191505b8181101562000eb35782815560010162000e9e565b5050505b505050565b81516001600160401b0381111562000ed85762000ed862000c41565b62000ef08162000ee9845462000e2d565b8462000e69565b602080601f83116001811462000f28576000841562000f0f5750858301515b600019600386901b1c1916600185901b17855562000eb3565b600085815260208120601f198616915b8281101562000f595788860151825594840194600190910190840162000f38565b508582101562000f785787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000fc95762000fc962000f9e565b5060010190565b8082018082111562000fe65762000fe662000f9e565b92915050565b6150af8062000ffc6000396000f3fe60806040526004361061041f5760003560e01c80637440a96b1161021e578063c6ab67a311610123578063e985e9c5116100ab578063f4a0a5281161007a578063f4a0a52814610d7f578063f610372b14610d9f578063f8901d0a14610db2578063fc15ad0614610dc7578063ff868c5314610de757600080fd5b8063e985e9c514610cdc578063f1d5f51714610d25578063f2fde38b14610d45578063f412f5b614610d6557600080fd5b8063d5abeb01116100f2578063d5abeb0114610c51578063d79779b214610c67578063dcd17c1714610c9d578063e33b7de314610cb2578063e8a3d48514610cc757600080fd5b8063c6ab67a314610bd0578063c87b56dd14610be5578063cd42cbd414610c05578063ce7c2ac214610c1b57600080fd5b80639852595c116101a6578063b58be57211610175578063b58be57214610b3a578063b88d4fde14610b50578063c45ac05014610b70578063c5a4e67214610b90578063c656f99414610bb057600080fd5b80639852595c14610aa4578063a22cb46514610ada578063a3f8eace14610afa578063a838185514610b1a57600080fd5b80638b83209b116101ed5780638b83209b14610a115780638da5cb5b14610a315780639367370b14610a4f578063938e3d7b14610a6f57806395d89b4114610a8f57600080fd5b80637440a96b1461099c57806385d20e2d146109bc57806386b06a40146109dc5780638b7a987b146109f157600080fd5b80633a98ef391161032457806355f804b3116102ac5780636dd47e401161027b5780636dd47e401461091c5780636f8b44b01461093257806370a0823114610952578063715018a61461097257806371dd25741461098757600080fd5b806355f804b31461086f5780635e5c06e21461088f5780636352211e146108e65780636817c76c1461090657600080fd5b806340ecf62c116102f357806340ecf62c146107c557806342842e0e146107d857806342966c68146107f857806348b750441461082f5780634cc71dfe1461084f57600080fd5b80633a98ef39146107345780633b555e14146107495780633c8463a114610769578063406072a91461077f57600080fd5b80631e733c9c116103a75780632eb4a7ab116103765780632eb4a7ab146106235780632f36e38214610639578063306e9f6a1461064e57806330b42ec214610663578063346f5a731461069357600080fd5b80631e733c9c146105ae57806320589799146105ce57806323b872dd146105e357806326f8f7e61461060357600080fd5b806312a91054116103ee57806312a910541461051e5780631338a83f1461053e57806318160ddd1461055157806318602dc814610574578063191655871461058e57600080fd5b806301ffc9a71461046d57806306fdde03146104a2578063081812fc146104c4578063095ea7b3146104fc57600080fd5b36610468577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561047957600080fd5b5061048d610488366004614627565b610e07565b60405190151581526020015b60405180910390f35b3480156104ae57600080fd5b506104b7610e59565b6040516104999190614694565b3480156104d057600080fd5b506104e46104df3660046146a7565b610eeb565b6040516001600160a01b039091168152602001610499565b34801561050857600080fd5b5061051c6105173660046146d5565b610f2f565b005b34801561052a57600080fd5b5061051c6105393660046146a7565b610fbc565b61051c61054c366004614701565b610fc9565b34801561055d57600080fd5b5061056661138b565b604051908152602001610499565b34801561058057600080fd5b5060145461048d9060ff1681565b34801561059a57600080fd5b5061051c6105a936600461477b565b611399565b3480156105ba57600080fd5b5061051c6105c9366004614798565b6113d7565b3480156105da57600080fd5b5061051c6114f8565b3480156105ef57600080fd5b5061051c6105fe3660046147c8565b611539565b34801561060f57600080fd5b5061051c61061e3660046146a7565b611695565b34801561062f57600080fd5b50610566601d5481565b34801561064557600080fd5b5061051c6118d9565b34801561065a57600080fd5b5061051c611930565b34801561066f57600080fd5b5061048d61067e36600461477b565b601e6020526000908152604090205460ff1681565b34801561069f57600080fd5b506106fc6106ae3660046148c6565b8051602081830181018051828252928201919093012091528054600182015460028301546003840154600490940154929391929091906001600160a01b03811690600160a01b900460ff1686565b6040805196875260208701959095529385019290925260608401526001600160a01b03166080830152151560a082015260c001610499565b34801561074057600080fd5b50600954610566565b34801561075557600080fd5b5061051c61076436600461477b565b61196e565b34801561077557600080fd5b5061056660185481565b34801561078b57600080fd5b5061056661079a3660046148fa565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b61051c6107d3366004614936565b6119a5565b3480156107e457600080fd5b5061051c6107f33660046147c8565b611d0b565b34801561080457600080fd5b506108186108133660046146a7565b611e5c565b604080519215158352602083019190915201610499565b34801561083b57600080fd5b5061051c61084a3660046148fa565b611f78565b34801561085b57600080fd5b506104b761086a36600461477b565b611fb4565b34801561087b57600080fd5b5061051c61088a3660046148c6565b6120ca565b34801561089b57600080fd5b506108cb6108aa36600461477b565b601f6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610499565b3480156108f257600080fd5b506104e46109013660046146a7565b612108565b34801561091257600080fd5b5061056660115481565b34801561092857600080fd5b5061056660125481565b34801561093e57600080fd5b5061051c61094d3660046146a7565b61211a565b34801561095e57600080fd5b5061056661096d36600461477b565b612193565b34801561097e57600080fd5b5061051c6121e1565b34801561099357600080fd5b5061051c6121f5565b3480156109a857600080fd5b5061051c6109b73660046148c6565b612562565b3480156109c857600080fd5b5061051c6109d73660046148c6565b6125ea565b3480156109e857600080fd5b5061051c612643565b3480156109fd57600080fd5b5061048d610a0c3660046148c6565b612681565b348015610a1d57600080fd5b506104e4610a2c3660046146a7565b612824565b348015610a3d57600080fd5b506000546001600160a01b03166104e4565b348015610a5b57600080fd5b5061051c610a6a3660046148c6565b612854565b348015610a7b57600080fd5b5061051c610a8a3660046148c6565b61287d565b348015610a9b57600080fd5b506104b7612891565b348015610ab057600080fd5b50610566610abf36600461477b565b6001600160a01b03166000908152600c602052604090205490565b348015610ae657600080fd5b5061051c610af536600461498e565b6128a0565b348015610b0657600080fd5b50610566610b1536600461477b565b612935565b348015610b2657600080fd5b5061051c610b35366004614798565b61297d565b348015610b4657600080fd5b5061056660165481565b348015610b5c57600080fd5b5061051c610b6b3660046149bc565b612acd565b348015610b7c57600080fd5b50610566610b8b3660046148fa565b612c2c565b348015610b9c57600080fd5b5061051c610bab3660046146a7565b612cf7565b348015610bbc57600080fd5b5061051c610bcb36600461477b565b612d04565b348015610bdc57600080fd5b506104b7612d33565b348015610bf157600080fd5b506104b7610c003660046146a7565b612dc1565b348015610c1157600080fd5b5061056660135481565b348015610c2757600080fd5b50610566610c3636600461477b565b6001600160a01b03166000908152600b602052604090205490565b348015610c5d57600080fd5b5061056660105481565b348015610c7357600080fd5b50610566610c8236600461477b565b6001600160a01b03166000908152600e602052604090205490565b348015610ca957600080fd5b5061051c612e44565b348015610cbe57600080fd5b50600a54610566565b348015610cd357600080fd5b506104b7612e5d565b348015610ce857600080fd5b5061048d610cf73660046148fa565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610d3157600080fd5b5061051c610d403660046146a7565b612e6c565b348015610d5157600080fd5b5061051c610d6036600461477b565b612e79565b348015610d7157600080fd5b5060175461048d9060ff1681565b348015610d8b57600080fd5b5061051c610d9a3660046146a7565b612eef565b61051c610dad3660046146a7565b612efc565b348015610dbe57600080fd5b5061051c613208565b348015610dd357600080fd5b5061051c610de2366004614a3b565b613249565b348015610df357600080fd5b5061051c610e02366004614aec565b61336b565b60006001600160e01b031982166380ac58cd60e01b1480610e3857506001600160e01b03198216635b5e139f60e01b145b80610e5357506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610e6890614b44565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9490614b44565b8015610ee15780601f10610eb657610100808354040283529160200191610ee1565b820191906000526020600020905b815481529060010190602001808311610ec457829003601f168201915b5050505050905090565b6000610ef682613545565b610f13576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610f3a82612108565b9050806001600160a01b0316836001600160a01b031603610f6e5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610f8e5750610f8c8133610cf7565b155b15610fac576040516367d9dca160e11b815260040160405180910390fd5b610fb783838361357e565b505050565b610fc46135da565b601355565b601b5460ff1615610ff55760405162461bcd60e51b8152600401610fec90614b78565b60405180910390fd5b601b805460ff1916600117905560145460ff166110605760405162461bcd60e51b8152602060048201526024808201527f4572726f723a20416c6c6f776c6973742053616c65206973206e6f742061637460448201526334bb329760e11b6064820152608401610fec565b6016546010546110709190614bbe565b8161107961138b565b6110839190614bd1565b11156110a15760405162461bcd60e51b8152600401610fec90614be4565b336000908152601f60205260409020600101546005906110c19083614bd1565b11156111255760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20596f7520776f756c64206578636565642074686520616c6c6f60448201526c3b903634b9ba103634b6b4ba1760991b6064820152608401610fec565b333b156111745760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e0000006044820152606401610fec565b806012546111829190614c2c565b3410156111a15760405162461bcd60e51b8152600401610fec90614c43565b336000908152601e602052604090205460ff161561121b5760405162461bcd60e51b815260206004820152603160248201527f4572726f723a20596f75206861766520616c726561647920636c61696d65642060448201527030b6361037b3103cb7bab91027232a399760791b6064820152608401610fec565b6040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061129584848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601d549150849050613634565b6112e15760405162461bcd60e51b815260206004820152601f60248201527f4572726f723a20596f7520617265206e6f7420616c6c6f776c69737465642e006044820152606401610fec565b336000908152601f60205260409020600101546112fe9083614bd1565b60050361132057336000908152601e60205260409020805460ff191660011790555b336000908152601f602052604081206001018054849290611342908490614bd1565b909155506113529050338361364a565b3360008051602061505a83398151915261136a61138b565b60405190815260200160405180910390a25050601b805460ff191690555050565b600254600154036000190190565b336000908152601f60205260409020600290810154116113cb5760405162461bcd60e51b8152600401610fec90614c7a565b6113d481613664565b50565b6113df6135da565b601054826113eb61138b565b6016546113f89190614bd1565b6114029190614bd1565b11156114615760405162461bcd60e51b815260206004820152602860248201527f4572726f723a205468697320776f756c642065786365656420746865206d61786044820152671039bab838363c9760c11b6064820152608401610fec565b81601660008282546114739190614bd1565b90915550506001600160a01b0381166000908152601f6020526040812080548492906114a0908490614bd1565b90915550506001600160a01b0381166000908152601f602052604081206002015490036114f4576001600160a01b0381166000908152601f602052604081206002018054916114ee83614cc5565b91905055505b5050565b336000908152601f602052604090206002015460011061152a5760405162461bcd60e51b8152600401610fec90614cde565b6014805460ff19166001179055565b826daaeb6d7670e522a718067333cd4e3b1561168457336001600160a01b0382160361156f5761156a84848461374b565b61168f565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e29190614d29565b80156116655750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611641573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116659190614d29565b61168457604051633b79c77360e21b8152336004820152602401610fec565b61168f84848461374b565b50505050565b336000908152601f60205260409020600201546117085760405162461bcd60e51b815260206004820152602b60248201527f4572726f723a204c6576656c2031282b292061646d696e20636c656172616e6360448201526a32903932b8bab4b932b21760a91b6064820152608401610fec565b600081116117645760405162461bcd60e51b8152602060048201526024808201527f4572726f723a204e65656420746f20686176652072657365727665642073757060448201526338363c9760e11b6064820152608401610fec565b336000908152601f60205260409020548111156117eb576040805162461bcd60e51b81526020600482015260248101919091527f4572726f723a20596f752061726520747279696e6720746f20636c61696d206d60448201527f6f7265204e465473207468616e20796f7520686176652072657365727665642e6064820152608401610fec565b601054816117f761138b565b6118019190614bd1565b11156118655760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20596f7520776f756c642065786365656420746865206d61782060448201526c39bab838363c903634b6b4ba1760991b6064820152608401610fec565b336000908152601f602052604081208054839290611884908490614bbe565b92505081905550806016600082825461189d9190614bbe565b909155506118ad9050338261364a565b3360008051602061505a8339815191526118c561138b565b60405190815260200160405180910390a250565b6118e16135da565b60005b6021548110156113d45761191e6021828154811061190457611904614d46565b6000918252602090912001546001600160a01b0316611399565b8061192881614cc5565b9150506118e4565b336000908152601f60205260409020600201546001106119625760405162461bcd60e51b8152600401610fec90614cde565b6014805460ff19169055565b6119766135da565b6001600160a01b0381166000908152601f6020526040812060020180549161199d83614d5c565b919050555050565b601b5460ff16156119c85760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560175460ff16611a275760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2053616c65206973206e6f74206163746976652e0000000000006044820152606401610fec565b601654601054611a379190614bbe565b83611a4061138b565b611a4a9190614bd1565b1115611a685760405162461bcd60e51b8152600401610fec90614be4565b601854336000908152601f6020526040902060010154611a889085614bd1565b1115611ae85760405162461bcd60e51b815260206004820152602960248201527f4572726f723a20596f7520776f756c6420657863656564207468652077616c6c60448201526832ba103634b6b4ba1760b91b6064820152608401610fec565b333b15611b375760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e0000006044820152606401610fec565b8115611c745782601354611b4b9190614c2c565b341015611b6a5760405162461bcd60e51b8152600401610fec90614c43565b6000602082604051611b7c9190614d73565b9081526040519081900360200190206004015460ff600160a01b90910416905080611bff5760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20416666696c69617465206163636f756e7420696e76616c696460448201526c1037b9103234b9b0b13632b21760991b6064820152608401610fec565b83602083604051611c109190614d73565b90815260200160405180910390206001016000828254611c309190614bd1565b9250508190555083602083604051611c489190614d73565b90815260200160405180910390206002016000828254611c689190614bd1565b90915550611ca1915050565b82601154611c829190614c2c565b341015611ca15760405162461bcd60e51b8152600401610fec90614c43565b336000908152601f602052604081206001018054859290611cc3908490614bd1565b90915550611cd39050338461364a565b3360008051602061505a833981519152611ceb61138b565b60405190815260200160405180910390a25050601b805460ff1916905550565b826daaeb6d7670e522a718067333cd4e3b15611e5157336001600160a01b03821603611d3c5761156a848484613756565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611daf9190614d29565b8015611e325750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e329190614d29565b611e5157604051633b79c77360e21b8152336004820152602401610fec565b61168f848484613756565b600080611e6883612108565b6001600160a01b0316336001600160a01b03161480611ea05750611e8b83610eeb565b6001600160a01b0316336001600160a01b0316145b80611edb5750611edb611eb284612108565b6001600160a01b0316600090815260086020908152604080832033845290915290205460ff1690565b611f3a5760405162461bcd60e51b815260206004820152602a60248201527f4572726f723a20596f75206d757374206f776e207468697320746f6b656e20746044820152693790313ab9371034ba1760b11b6064820152608401610fec565b611f4383613771565b604051839033907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca590600090a3506001929050565b336000908152601f6020526040902060029081015411611faa5760405162461bcd60e51b8152600401610fec90614c7a565b6114f4828261377c565b606060005b6023548110156120c457600060238281548110611fd857611fd8614d46565b906000526020600020018054611fed90614b44565b80601f016020809104026020016040519081016040528092919081815260200182805461201990614b44565b80156120665780601f1061203b57610100808354040283529160200191612066565b820191906000526020600020905b81548152906001019060200180831161204957829003601f168201915b50505050509050600060208260405161207f9190614d73565b908152604051908190036020019020600401546001600160a01b039081169150851681036120af57509392505050565b505080806120bc90614cc5565b915050611fb9565b50919050565b336000908152601f60205260409020600201546001106120fc5760405162461bcd60e51b8152600401610fec90614cde565b601a6114f48282614ddd565b60006121138261388d565b5192915050565b6121226135da565b611fa481111561218e5760405162461bcd60e51b815260206004820152603160248201527f4572726f723a204e6577206d617820737570706c792063616e6e6f742065786360448201527032b2b21037b934b3b4b730b61036b0bc1760791b6064820152608401610fec565b601055565b60006001600160a01b0382166121bc576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6121e96135da565b6121f360006139b4565b565b336000908152601f60205260409020600201546001106122275760405162461bcd60e51b8152600401610fec90614cde565b601b5460ff161561224a5760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560005b60235481101561251f5760006023828154811061227957612279614d46565b90600052602060002001805461228e90614b44565b80601f01602080910402602001604051908101604052809291908181526020018280546122ba90614b44565b80156123075780601f106122dc57610100808354040283529160200191612307565b820191906000526020600020905b8154815290600101906020018083116122ea57829003601f168201915b5050505050905060006020826040516123209190614d73565b9081526040519081900360209081018220600401546001600160a01b0316925060009161234e908590614d73565b9081526040519081900360209081018220549250600091612370908690614d73565b90815260405190819003602001902060010154905060006123918284614c2c565b9050806000036123a557505050505061250d565b804710156123f55760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a20496e73756666696369656e742062616c616e636500000000006044820152606401610fec565b600080856001600160a01b03168360405160006040518083038185875af1925050503d8060008114612443576040519150601f19603f3d011682016040523d82523d6000602084013e612448565b606091505b5091509150816124a85760405162461bcd60e51b815260206004820152602560248201527f4572726f723a204661696c656420746f2073656e642045544820746f2072656360448201526432b4bb32b960d91b6064820152608401610fec565b826020886040516124b99190614d73565b908152602001604051809103902060030160008282546124d99190614bd1565b9250508190555060006020886040516124f29190614d73565b90815260405190819003602001902060010155505050505050505b8061251781614cc5565b91505061225a565b5060005b602154811015612555576125436021828154811061190457611904614d46565b8061254d81614cc5565b915050612523565b50601b805460ff19169055565b61256a6135da565b600060208260405161257c9190614d73565b90815260405190819003602001902054116125a95760405162461bcd60e51b8152600401610fec90614e9c565b60006020826040516125bb9190614d73565b9081526040519081900360200190206004018054911515600160a01b0260ff60a01b1990921691909117905550565b6125f26135da565b60006020826040516126049190614d73565b90815260405190819003602001902054116126315760405162461bcd60e51b8152600401610fec90614e9c565b60016020826040516125bb9190614d73565b336000908152601f60205260409020600201546001106126755760405162461bcd60e51b8152600401610fec90614cde565b6017805460ff19169055565b60008082905060038151101561269a5750600092915050565b600f815111156126ad5750600092915050565b806000815181106126c0576126c0614d46565b01602001516001600160f81b031916600160fd1b036126e25750600092915050565b80600182516126f19190614bbe565b8151811061270157612701614d46565b01602001516001600160f81b031916600160fd1b036127235750600092915050565b60008160008151811061273857612738614d46565b01602001516001600160f81b031916905060005b825181101561281957600083828151811061276957612769614d46565b01602001516001600160f81b0319169050600160fd1b8190036127925750600095945050505050565b600360fc1b6001600160f81b03198216108015906127be5750603960f81b6001600160f81b0319821611155b1580156127f45750606160f81b6001600160f81b03198216108015906127f25750603d60f91b6001600160f81b0319821611155b155b156128055750600095945050505050565b91508061281181614cc5565b91505061274c565b506001949350505050565b6000600d828154811061283957612839614d46565b6000918252602090912001546001600160a01b031692915050565b61285c6135da565b601b54610100900460ff161561287157600080fd5b60156114f48282614ddd565b6128856135da565b60196114f48282614ddd565b606060048054610e6890614b44565b336001600160a01b038316036128c95760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612941600a5490565b61294b9047614bd1565b90506129768382612971866001600160a01b03166000908152600c602052604090205490565b613a04565b9392505050565b6129856135da565b6000826016546129959190614bbe565b10156129f85760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205468697320776f756c64206d616b652072657365727665642060448201526b3632b9b9903a3430b710181760a11b6064820152608401610fec565b6001600160a01b0381166000908152601f6020526040812054612a1c908490614bbe565b1015612a855760405162461bcd60e51b815260206004820152603260248201527f4572726f723a205573657220646f6573206e6f7420686176652074686973206d60448201527130b73c903932b9b2b93b32b21027232a399760711b6064820152608401610fec565b8160166000828254612a979190614bbe565b90915550506001600160a01b0381166000908152601f602052604081208054849290612ac4908490614bbe565b90915550505050565b836daaeb6d7670e522a718067333cd4e3b15612c1957336001600160a01b03821603612b0457612aff85858585613a42565b612c25565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b779190614d29565b8015612bfa5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bfa9190614d29565b612c1957604051633b79c77360e21b8152336004820152602401610fec565b612c2585858585613a42565b5050505050565b6001600160a01b0382166000908152600e602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612caf9190614ee4565b612cb99190614bd1565b6001600160a01b038086166000908152600f6020908152604080832093881683529290522054909150612cef9084908390613a04565b949350505050565b612cff6135da565b601d55565b612d0c6135da565b6001600160a01b0381166000908152601f6020526040812060020180549161199d83614cc5565b60158054612d4090614b44565b80601f0160208091040260200160405190810160405280929190818152602001828054612d6c90614b44565b8015612db95780601f10612d8e57610100808354040283529160200191612db9565b820191906000526020600020905b815481529060010190602001808311612d9c57829003601f168201915b505050505081565b6060612dcc82613545565b612de957604051630a14c4b560e41b815260040160405180910390fd5b6000612df3613a8d565b90508051600003612e135760405180602001604052806000815250612976565b80612e1d84613a9c565b604051602001612e2e929190614efd565b6040516020818303038152906040529392505050565b612e4c6135da565b601b805461ff001916610100179055565b606060198054610e6890614b44565b612e746135da565b601855565b612e816135da565b6001600160a01b038116612ee65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fec565b6113d4816139b4565b612ef76135da565b601155565b601b5460ff1615612f1f5760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560175460ff16612f955760405162461bcd60e51b815260206004820152602e60248201527f4572726f723a2053616c65206973206e6f74206163746976652e20566961206360448201526d37b73a3930b1ba26b4b73a14149760911b6064820152608401610fec565b601654601054612fa59190614bbe565b81612fae61138b565b612fb89190614bd1565b111561302c5760405162461bcd60e51b815260206004820152603c60248201527f4572726f723a20507572636861736520776f756c6420657863656564206d617860448201527f20737570706c792e2056696120636f6e74726163744d696e7428292e000000006064820152608401610fec565b601854336000908152601f602052604090206001015461304c9083614bd1565b11156130c05760405162461bcd60e51b815260206004820152603d60248201527f4572726f723a20596f7520776f756c6420657863656564207468652077616c6c60448201527f6574206c696d69742e2056696120636f6e74726163744d696e7428292e0000006064820152608401610fec565b333b156131295760405162461bcd60e51b815260206004820152603160248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e205669604482015270309031b7b73a3930b1ba26b4b73a14149760791b6064820152608401610fec565b806011546131379190614c2c565b3410156131a05760405162461bcd60e51b815260206004820152603160248201527f4572726f723a204e6f7420656e6f7567682065746865722073656e742e205669604482015270309031b7b73a3930b1ba26b4b73a14149760791b6064820152608401610fec565b336000908152601f6020526040812060010180548392906131c2908490614bd1565b909155506131d29050338261364a565b3360008051602061505a8339815191526131ea61138b565b60405190815260200160405180910390a250601b805460ff19169055565b336000908152601f602052604090206002015460011061323a5760405162461bcd60e51b8152600401610fec90614cde565b6017805460ff19166001179055565b336000908152601f602052604090206002015460011061327b5760405162461bcd60e51b8152600401610fec90614cde565b60165460105461328b9190614bbe565b815161329561138b565b61329f9190614bd1565b11156133005760405162461bcd60e51b815260206004820152602a60248201527f4572726f723a20596f7520776f756c64206578636565642074686520616972646044820152693937b8103634b6b4ba1760b11b6064820152608401610fec565b60005b81518110156114f45761333082828151811061332157613321614d46565b6020026020010151600161364a565b3360008051602061505a83398151915261334861138b565b60405190815260200160405180910390a28061336381614cc5565b915050613303565b6133736135da565b600081116133d45760405162461bcd60e51b815260206004820152602860248201527f4572726f723a20466565206d757374206265203e20302028616e6420732f622060448201526734b7102ba2a4949760c11b6064820152608401610fec565b6133dd82612681565b61344f5760405162461bcd60e51b815260206004820152603e60248201527f4572726f723a20416666696c69617465205265666572656e636520636f64652060448201527f7573656420646f65736e277420706173732076616c69646174696f6e732e00006064820152608401610fec565b6040518060c00160405280828152602001600081526020016000815260200160008152602001846001600160a01b031681526020016001151581525060208360405161349b9190614d73565b9081526040805191829003602090810190922083518155918301516001808401919091559083015160028301556060830151600383015560808301516004909201805460a0909401511515600160a01b026001600160a81b03199094166001600160a01b03909316929092179290921790556023805491820181556000527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f42300161168f8382614ddd565b600081600111158015613559575060015482105b8015610e53575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b031633146121f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fec565b6000826136418584613b2e565b14949350505050565b6114f4828260405180602001604052806000815250613b7b565b6001600160a01b0381166000908152600b60205260409020546136995760405162461bcd60e51b8152600401610fec90614f2c565b60006136a482612935565b9050806000036136c65760405162461bcd60e51b8152600401610fec90614f72565b80600a60008282546136d89190614bd1565b90915550506001600160a01b0382166000908152600c602052604090208054820190556137058282613b88565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610fb7838383613ca1565b610fb783838360405180602001604052806000815250612acd565b6113d4816000613e7a565b6001600160a01b0381166000908152600b60205260409020546137b15760405162461bcd60e51b8152600401610fec90614f2c565b60006137bd8383612c2c565b9050806000036137df5760405162461bcd60e51b8152600401610fec90614f72565b6001600160a01b0383166000908152600e602052604081208054839290613807908490614bd1565b90915550506001600160a01b038084166000908152600f6020908152604080832093861683529290522080548201905561384283838361402e565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b604080516060810182526000808252602082018190529181019190915281806001111580156138bd575060015481105b1561399b57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906139995780516001600160a01b031615613930579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613994579392505050565b613930565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546001600160a01b0384166000908152600b602052604081205490918391613a2e9086614c2c565b613a389190614fbd565b612cef9190614bbe565b613a4d848484613ca1565b6001600160a01b0383163b15158015613a6f5750613a6d84848484614080565b155b1561168f576040516368d2bf6b60e11b815260040160405180910390fd5b6060601a8054610e6890614b44565b60606000613aa98361416b565b60010190506000816001600160401b03811115613ac857613ac8614809565b6040519080825280601f01601f191660200182016040528015613af2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613afc57509392505050565b600081815b8451811015613b7357613b5f82868381518110613b5257613b52614d46565b6020026020010151614243565b915080613b6b81614cc5565b915050613b33565b509392505050565b610fb7838383600161426f565b80471015613bd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610fec565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c25576040519150601f19603f3d011682016040523d82523d6000602084013e613c2a565b606091505b5050905080610fb75760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610fec565b6000613cac8261388d565b9050836001600160a01b031681600001516001600160a01b031614613ce35760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480613d015750613d018533610cf7565b80613d1c575033613d1184610eeb565b6001600160a01b0316145b905080613d3c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416613d6357604051633a954ecd60e21b815260040160405180910390fd5b613d6f6000848761357e565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613e43576001548214613e4357805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b031660008051602061503a83398151915260405160405180910390a4612c25565b6000613e858361388d565b80519091508215613eeb576000336001600160a01b0383161480613eae5750613eae8233610cf7565b80613ec9575033613ebe86610eeb565b6001600160a01b0316145b905080613ee957604051632ce44b5f60e11b815260040160405180910390fd5b505b613ef76000858361357e565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116613ff5576001548214613ff557805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b0384169060008051602061503a833981519152908390a450506002805460010190555050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fb790849061441c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906140b5903390899088908890600401614fdf565b6020604051808303816000875af19250505080156140f0575060408051601f3d908101601f191682019092526140ed9181019061501c565b60015b61414e573d80801561411e576040519150601f19603f3d011682016040523d82523d6000602084013e614123565b606091505b508051600003614146576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106141aa5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106141d6576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106141f457662386f26fc10000830492506010015b6305f5e100831061420c576305f5e100830492506008015b612710831061422057612710830492506004015b60648310614232576064830492506002015b600a8310610e535760010192915050565b600081831061425f576000828152602084905260409020612976565b5060009182526020526040902090565b6001546001600160a01b03851661429857604051622e076360e81b815260040160405180910390fd5b836000036142b95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561436a57506001600160a01b0387163b15155b156143e0575b60405182906001600160a01b0389169060009060008051602061503a833981519152908290a46143a96000888480600101955088614080565b6143c6576040516368d2bf6b60e11b815260040160405180910390fd5b8082036143705782600154146143db57600080fd5b614413565b5b6040516001830192906001600160a01b0389169060009060008051602061503a833981519152908290a48082036143e1575b50600155612c25565b6000614471826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166144ee9092919063ffffffff16565b805190915015610fb7578080602001905181019061448f9190614d29565b610fb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610fec565b6060612cef848460008585600080866001600160a01b031685876040516145159190614d73565b60006040518083038185875af1925050503d8060008114614552576040519150601f19603f3d011682016040523d82523d6000602084013e614557565b606091505b509150915061456887838387614573565b979650505050505050565b606083156145e25782516000036145db576001600160a01b0385163b6145db5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610fec565b5081612cef565b612cef83838151156145f75781518083602001fd5b8060405162461bcd60e51b8152600401610fec9190614694565b6001600160e01b0319811681146113d457600080fd5b60006020828403121561463957600080fd5b813561297681614611565b60005b8381101561465f578181015183820152602001614647565b50506000910152565b60008151808452614680816020860160208601614644565b601f01601f19169290920160200192915050565b6020815260006129766020830184614668565b6000602082840312156146b957600080fd5b5035919050565b6001600160a01b03811681146113d457600080fd5b600080604083850312156146e857600080fd5b82356146f3816146c0565b946020939093013593505050565b60008060006040848603121561471657600080fd5b83356001600160401b038082111561472d57600080fd5b818601915086601f83011261474157600080fd5b81358181111561475057600080fd5b8760208260051b850101111561476557600080fd5b6020928301989097509590910135949350505050565b60006020828403121561478d57600080fd5b8135612976816146c0565b600080604083850312156147ab57600080fd5b8235915060208301356147bd816146c0565b809150509250929050565b6000806000606084860312156147dd57600080fd5b83356147e8816146c0565b925060208401356147f8816146c0565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561484757614847614809565b604052919050565b60006001600160401b0383111561486857614868614809565b61487b601f8401601f191660200161481f565b905082815283838301111561488f57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126148b757600080fd5b6129768383356020850161484f565b6000602082840312156148d857600080fd5b81356001600160401b038111156148ee57600080fd5b612cef848285016148a6565b6000806040838503121561490d57600080fd5b8235614918816146c0565b915060208301356147bd816146c0565b80151581146113d457600080fd5b60008060006060848603121561494b57600080fd5b83359250602084013561495d81614928565b915060408401356001600160401b0381111561497857600080fd5b614984868287016148a6565b9150509250925092565b600080604083850312156149a157600080fd5b82356149ac816146c0565b915060208301356147bd81614928565b600080600080608085870312156149d257600080fd5b84356149dd816146c0565b935060208501356149ed816146c0565b92506040850135915060608501356001600160401b03811115614a0f57600080fd5b8501601f81018713614a2057600080fd5b614a2f8782356020840161484f565b91505092959194509250565b60006020808385031215614a4e57600080fd5b82356001600160401b0380821115614a6557600080fd5b818501915085601f830112614a7957600080fd5b813581811115614a8b57614a8b614809565b8060051b9150614a9c84830161481f565b8181529183018401918481019088841115614ab657600080fd5b938501935b83851015614ae05784359250614ad0836146c0565b8282529385019390850190614abb565b98975050505050505050565b600080600060608486031215614b0157600080fd5b8335614b0c816146c0565b925060208401356001600160401b03811115614b2757600080fd5b614b33868287016148a6565b925050604084013590509250925092565b600181811c90821680614b5857607f821691505b6020821081036120c457634e487b7160e01b600052602260045260246000fd5b60208082526016908201527522b93937b91d10273790393296b2b73a3930b731bc9760511b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5357610e53614ba8565b80820180821115610e5357610e53614ba8565b60208082526028908201527f4572726f723a20507572636861736520776f756c6420657863656564206d61786040820152671039bab838363c9760c11b606082015260800190565b8082028115828204841417610e5357610e53614ba8565b6020808252601d908201527f4572726f723a204e6f7420656e6f7567682065746865722073656e742e000000604082015260600190565b6020808252602b908201527f4572726f723a204c6576656c2033282b292061646d696e20636c656172616e6360408201526a32903932b8bab4b932b21760a91b606082015260800190565b600060018201614cd757614cd7614ba8565b5060010190565b6020808252602b908201527f4572726f723a204c6576656c2032282b292061646d696e20636c656172616e6360408201526a32903932b8bab4b932b21760a91b606082015260800190565b600060208284031215614d3b57600080fd5b815161297681614928565b634e487b7160e01b600052603260045260246000fd5b600081614d6b57614d6b614ba8565b506000190190565b60008251614d85818460208701614644565b9190910192915050565b601f821115610fb757600081815260208120601f850160051c81016020861015614db65750805b601f850160051c820191505b81811015614dd557828155600101614dc2565b505050505050565b81516001600160401b03811115614df657614df6614809565b614e0a81614e048454614b44565b84614d8f565b602080601f831160018114614e3f5760008415614e275750858301515b600019600386901b1c1916600185901b178555614dd5565b600085815260208120601f198616915b82811015614e6e57888601518255948401946001909101908401614e4f565b5085821015614e8c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526028908201527f4572726f723a20416666696c69617465207265666572656e6365206c696b656c6040820152673c903bb937b7339760c11b606082015260800190565b600060208284031215614ef657600080fd5b5051919050565b60008351614f0f818460208801614644565b835190830190614f23818360208801614644565b01949350505050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b600082614fda57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061501290830184614668565b9695505050505050565b60006020828403121561502e57600080fd5b81516129768161461156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885a2646970667358221220066f4ab7d42a8821ddfa596706d3075b471f71e574e03ec56b77111c3faa366264736f6c6343000811003368747470733a2f2f6170692e67656e657261746976656e6674732e696f2f676c697463686465636b2d70726572657665616c2f00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000018016a66db1f27f6bfb741435c2b66c82ba1de0c2b7fdca995f02773e245d41b5e60000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0000000000000000000000000bac4e21cc21afc4a9733b80424e456cf3bbad9a10000000000000000000000001184c8eb78d538ba3f60ce7599686d5481ff851500000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000000000000000170c0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000001489aa1854b9920529a275bf9e2615366a5488df000000000000000000000000402905d2aa5d66515d51faf2dfa4e350634dd20a00000000000000000000000002c65175f7daf40be976e4fa54842b08149d8c6d000000000000000000000000827c622c85c9970b4902918bc5b843e0aa29148900000000000000000000000001d71a1e369cd675a1215b9f1bd63b582f6f257a0000000000000000000000007a204ae5b7e4458f87c9ec5056953caf3f9aece9000000000000000000000000e8dbd6474fb0128863f5d3204af5ef363d90adb00000000000000000000000005622cc24ddecf5888d31df4b8b12648d105472bc00000000000000000000000022bd04906e808196b19f7d10463fe463ed5f88cb000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0
Deployed Bytecode
0x60806040526004361061041f5760003560e01c80637440a96b1161021e578063c6ab67a311610123578063e985e9c5116100ab578063f4a0a5281161007a578063f4a0a52814610d7f578063f610372b14610d9f578063f8901d0a14610db2578063fc15ad0614610dc7578063ff868c5314610de757600080fd5b8063e985e9c514610cdc578063f1d5f51714610d25578063f2fde38b14610d45578063f412f5b614610d6557600080fd5b8063d5abeb01116100f2578063d5abeb0114610c51578063d79779b214610c67578063dcd17c1714610c9d578063e33b7de314610cb2578063e8a3d48514610cc757600080fd5b8063c6ab67a314610bd0578063c87b56dd14610be5578063cd42cbd414610c05578063ce7c2ac214610c1b57600080fd5b80639852595c116101a6578063b58be57211610175578063b58be57214610b3a578063b88d4fde14610b50578063c45ac05014610b70578063c5a4e67214610b90578063c656f99414610bb057600080fd5b80639852595c14610aa4578063a22cb46514610ada578063a3f8eace14610afa578063a838185514610b1a57600080fd5b80638b83209b116101ed5780638b83209b14610a115780638da5cb5b14610a315780639367370b14610a4f578063938e3d7b14610a6f57806395d89b4114610a8f57600080fd5b80637440a96b1461099c57806385d20e2d146109bc57806386b06a40146109dc5780638b7a987b146109f157600080fd5b80633a98ef391161032457806355f804b3116102ac5780636dd47e401161027b5780636dd47e401461091c5780636f8b44b01461093257806370a0823114610952578063715018a61461097257806371dd25741461098757600080fd5b806355f804b31461086f5780635e5c06e21461088f5780636352211e146108e65780636817c76c1461090657600080fd5b806340ecf62c116102f357806340ecf62c146107c557806342842e0e146107d857806342966c68146107f857806348b750441461082f5780634cc71dfe1461084f57600080fd5b80633a98ef39146107345780633b555e14146107495780633c8463a114610769578063406072a91461077f57600080fd5b80631e733c9c116103a75780632eb4a7ab116103765780632eb4a7ab146106235780632f36e38214610639578063306e9f6a1461064e57806330b42ec214610663578063346f5a731461069357600080fd5b80631e733c9c146105ae57806320589799146105ce57806323b872dd146105e357806326f8f7e61461060357600080fd5b806312a91054116103ee57806312a910541461051e5780631338a83f1461053e57806318160ddd1461055157806318602dc814610574578063191655871461058e57600080fd5b806301ffc9a71461046d57806306fdde03146104a2578063081812fc146104c4578063095ea7b3146104fc57600080fd5b36610468577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561047957600080fd5b5061048d610488366004614627565b610e07565b60405190151581526020015b60405180910390f35b3480156104ae57600080fd5b506104b7610e59565b6040516104999190614694565b3480156104d057600080fd5b506104e46104df3660046146a7565b610eeb565b6040516001600160a01b039091168152602001610499565b34801561050857600080fd5b5061051c6105173660046146d5565b610f2f565b005b34801561052a57600080fd5b5061051c6105393660046146a7565b610fbc565b61051c61054c366004614701565b610fc9565b34801561055d57600080fd5b5061056661138b565b604051908152602001610499565b34801561058057600080fd5b5060145461048d9060ff1681565b34801561059a57600080fd5b5061051c6105a936600461477b565b611399565b3480156105ba57600080fd5b5061051c6105c9366004614798565b6113d7565b3480156105da57600080fd5b5061051c6114f8565b3480156105ef57600080fd5b5061051c6105fe3660046147c8565b611539565b34801561060f57600080fd5b5061051c61061e3660046146a7565b611695565b34801561062f57600080fd5b50610566601d5481565b34801561064557600080fd5b5061051c6118d9565b34801561065a57600080fd5b5061051c611930565b34801561066f57600080fd5b5061048d61067e36600461477b565b601e6020526000908152604090205460ff1681565b34801561069f57600080fd5b506106fc6106ae3660046148c6565b8051602081830181018051828252928201919093012091528054600182015460028301546003840154600490940154929391929091906001600160a01b03811690600160a01b900460ff1686565b6040805196875260208701959095529385019290925260608401526001600160a01b03166080830152151560a082015260c001610499565b34801561074057600080fd5b50600954610566565b34801561075557600080fd5b5061051c61076436600461477b565b61196e565b34801561077557600080fd5b5061056660185481565b34801561078b57600080fd5b5061056661079a3660046148fa565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b61051c6107d3366004614936565b6119a5565b3480156107e457600080fd5b5061051c6107f33660046147c8565b611d0b565b34801561080457600080fd5b506108186108133660046146a7565b611e5c565b604080519215158352602083019190915201610499565b34801561083b57600080fd5b5061051c61084a3660046148fa565b611f78565b34801561085b57600080fd5b506104b761086a36600461477b565b611fb4565b34801561087b57600080fd5b5061051c61088a3660046148c6565b6120ca565b34801561089b57600080fd5b506108cb6108aa36600461477b565b601f6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610499565b3480156108f257600080fd5b506104e46109013660046146a7565b612108565b34801561091257600080fd5b5061056660115481565b34801561092857600080fd5b5061056660125481565b34801561093e57600080fd5b5061051c61094d3660046146a7565b61211a565b34801561095e57600080fd5b5061056661096d36600461477b565b612193565b34801561097e57600080fd5b5061051c6121e1565b34801561099357600080fd5b5061051c6121f5565b3480156109a857600080fd5b5061051c6109b73660046148c6565b612562565b3480156109c857600080fd5b5061051c6109d73660046148c6565b6125ea565b3480156109e857600080fd5b5061051c612643565b3480156109fd57600080fd5b5061048d610a0c3660046148c6565b612681565b348015610a1d57600080fd5b506104e4610a2c3660046146a7565b612824565b348015610a3d57600080fd5b506000546001600160a01b03166104e4565b348015610a5b57600080fd5b5061051c610a6a3660046148c6565b612854565b348015610a7b57600080fd5b5061051c610a8a3660046148c6565b61287d565b348015610a9b57600080fd5b506104b7612891565b348015610ab057600080fd5b50610566610abf36600461477b565b6001600160a01b03166000908152600c602052604090205490565b348015610ae657600080fd5b5061051c610af536600461498e565b6128a0565b348015610b0657600080fd5b50610566610b1536600461477b565b612935565b348015610b2657600080fd5b5061051c610b35366004614798565b61297d565b348015610b4657600080fd5b5061056660165481565b348015610b5c57600080fd5b5061051c610b6b3660046149bc565b612acd565b348015610b7c57600080fd5b50610566610b8b3660046148fa565b612c2c565b348015610b9c57600080fd5b5061051c610bab3660046146a7565b612cf7565b348015610bbc57600080fd5b5061051c610bcb36600461477b565b612d04565b348015610bdc57600080fd5b506104b7612d33565b348015610bf157600080fd5b506104b7610c003660046146a7565b612dc1565b348015610c1157600080fd5b5061056660135481565b348015610c2757600080fd5b50610566610c3636600461477b565b6001600160a01b03166000908152600b602052604090205490565b348015610c5d57600080fd5b5061056660105481565b348015610c7357600080fd5b50610566610c8236600461477b565b6001600160a01b03166000908152600e602052604090205490565b348015610ca957600080fd5b5061051c612e44565b348015610cbe57600080fd5b50600a54610566565b348015610cd357600080fd5b506104b7612e5d565b348015610ce857600080fd5b5061048d610cf73660046148fa565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610d3157600080fd5b5061051c610d403660046146a7565b612e6c565b348015610d5157600080fd5b5061051c610d6036600461477b565b612e79565b348015610d7157600080fd5b5060175461048d9060ff1681565b348015610d8b57600080fd5b5061051c610d9a3660046146a7565b612eef565b61051c610dad3660046146a7565b612efc565b348015610dbe57600080fd5b5061051c613208565b348015610dd357600080fd5b5061051c610de2366004614a3b565b613249565b348015610df357600080fd5b5061051c610e02366004614aec565b61336b565b60006001600160e01b031982166380ac58cd60e01b1480610e3857506001600160e01b03198216635b5e139f60e01b145b80610e5357506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610e6890614b44565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9490614b44565b8015610ee15780601f10610eb657610100808354040283529160200191610ee1565b820191906000526020600020905b815481529060010190602001808311610ec457829003601f168201915b5050505050905090565b6000610ef682613545565b610f13576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610f3a82612108565b9050806001600160a01b0316836001600160a01b031603610f6e5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610f8e5750610f8c8133610cf7565b155b15610fac576040516367d9dca160e11b815260040160405180910390fd5b610fb783838361357e565b505050565b610fc46135da565b601355565b601b5460ff1615610ff55760405162461bcd60e51b8152600401610fec90614b78565b60405180910390fd5b601b805460ff1916600117905560145460ff166110605760405162461bcd60e51b8152602060048201526024808201527f4572726f723a20416c6c6f776c6973742053616c65206973206e6f742061637460448201526334bb329760e11b6064820152608401610fec565b6016546010546110709190614bbe565b8161107961138b565b6110839190614bd1565b11156110a15760405162461bcd60e51b8152600401610fec90614be4565b336000908152601f60205260409020600101546005906110c19083614bd1565b11156111255760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20596f7520776f756c64206578636565642074686520616c6c6f60448201526c3b903634b9ba103634b6b4ba1760991b6064820152608401610fec565b333b156111745760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e0000006044820152606401610fec565b806012546111829190614c2c565b3410156111a15760405162461bcd60e51b8152600401610fec90614c43565b336000908152601e602052604090205460ff161561121b5760405162461bcd60e51b815260206004820152603160248201527f4572726f723a20596f75206861766520616c726561647920636c61696d65642060448201527030b6361037b3103cb7bab91027232a399760791b6064820152608401610fec565b6040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061129584848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601d549150849050613634565b6112e15760405162461bcd60e51b815260206004820152601f60248201527f4572726f723a20596f7520617265206e6f7420616c6c6f776c69737465642e006044820152606401610fec565b336000908152601f60205260409020600101546112fe9083614bd1565b60050361132057336000908152601e60205260409020805460ff191660011790555b336000908152601f602052604081206001018054849290611342908490614bd1565b909155506113529050338361364a565b3360008051602061505a83398151915261136a61138b565b60405190815260200160405180910390a25050601b805460ff191690555050565b600254600154036000190190565b336000908152601f60205260409020600290810154116113cb5760405162461bcd60e51b8152600401610fec90614c7a565b6113d481613664565b50565b6113df6135da565b601054826113eb61138b565b6016546113f89190614bd1565b6114029190614bd1565b11156114615760405162461bcd60e51b815260206004820152602860248201527f4572726f723a205468697320776f756c642065786365656420746865206d61786044820152671039bab838363c9760c11b6064820152608401610fec565b81601660008282546114739190614bd1565b90915550506001600160a01b0381166000908152601f6020526040812080548492906114a0908490614bd1565b90915550506001600160a01b0381166000908152601f602052604081206002015490036114f4576001600160a01b0381166000908152601f602052604081206002018054916114ee83614cc5565b91905055505b5050565b336000908152601f602052604090206002015460011061152a5760405162461bcd60e51b8152600401610fec90614cde565b6014805460ff19166001179055565b826daaeb6d7670e522a718067333cd4e3b1561168457336001600160a01b0382160361156f5761156a84848461374b565b61168f565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e29190614d29565b80156116655750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611641573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116659190614d29565b61168457604051633b79c77360e21b8152336004820152602401610fec565b61168f84848461374b565b50505050565b336000908152601f60205260409020600201546117085760405162461bcd60e51b815260206004820152602b60248201527f4572726f723a204c6576656c2031282b292061646d696e20636c656172616e6360448201526a32903932b8bab4b932b21760a91b6064820152608401610fec565b600081116117645760405162461bcd60e51b8152602060048201526024808201527f4572726f723a204e65656420746f20686176652072657365727665642073757060448201526338363c9760e11b6064820152608401610fec565b336000908152601f60205260409020548111156117eb576040805162461bcd60e51b81526020600482015260248101919091527f4572726f723a20596f752061726520747279696e6720746f20636c61696d206d60448201527f6f7265204e465473207468616e20796f7520686176652072657365727665642e6064820152608401610fec565b601054816117f761138b565b6118019190614bd1565b11156118655760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20596f7520776f756c642065786365656420746865206d61782060448201526c39bab838363c903634b6b4ba1760991b6064820152608401610fec565b336000908152601f602052604081208054839290611884908490614bbe565b92505081905550806016600082825461189d9190614bbe565b909155506118ad9050338261364a565b3360008051602061505a8339815191526118c561138b565b60405190815260200160405180910390a250565b6118e16135da565b60005b6021548110156113d45761191e6021828154811061190457611904614d46565b6000918252602090912001546001600160a01b0316611399565b8061192881614cc5565b9150506118e4565b336000908152601f60205260409020600201546001106119625760405162461bcd60e51b8152600401610fec90614cde565b6014805460ff19169055565b6119766135da565b6001600160a01b0381166000908152601f6020526040812060020180549161199d83614d5c565b919050555050565b601b5460ff16156119c85760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560175460ff16611a275760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2053616c65206973206e6f74206163746976652e0000000000006044820152606401610fec565b601654601054611a379190614bbe565b83611a4061138b565b611a4a9190614bd1565b1115611a685760405162461bcd60e51b8152600401610fec90614be4565b601854336000908152601f6020526040902060010154611a889085614bd1565b1115611ae85760405162461bcd60e51b815260206004820152602960248201527f4572726f723a20596f7520776f756c6420657863656564207468652077616c6c60448201526832ba103634b6b4ba1760b91b6064820152608401610fec565b333b15611b375760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e0000006044820152606401610fec565b8115611c745782601354611b4b9190614c2c565b341015611b6a5760405162461bcd60e51b8152600401610fec90614c43565b6000602082604051611b7c9190614d73565b9081526040519081900360200190206004015460ff600160a01b90910416905080611bff5760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20416666696c69617465206163636f756e7420696e76616c696460448201526c1037b9103234b9b0b13632b21760991b6064820152608401610fec565b83602083604051611c109190614d73565b90815260200160405180910390206001016000828254611c309190614bd1565b9250508190555083602083604051611c489190614d73565b90815260200160405180910390206002016000828254611c689190614bd1565b90915550611ca1915050565b82601154611c829190614c2c565b341015611ca15760405162461bcd60e51b8152600401610fec90614c43565b336000908152601f602052604081206001018054859290611cc3908490614bd1565b90915550611cd39050338461364a565b3360008051602061505a833981519152611ceb61138b565b60405190815260200160405180910390a25050601b805460ff1916905550565b826daaeb6d7670e522a718067333cd4e3b15611e5157336001600160a01b03821603611d3c5761156a848484613756565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611daf9190614d29565b8015611e325750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e329190614d29565b611e5157604051633b79c77360e21b8152336004820152602401610fec565b61168f848484613756565b600080611e6883612108565b6001600160a01b0316336001600160a01b03161480611ea05750611e8b83610eeb565b6001600160a01b0316336001600160a01b0316145b80611edb5750611edb611eb284612108565b6001600160a01b0316600090815260086020908152604080832033845290915290205460ff1690565b611f3a5760405162461bcd60e51b815260206004820152602a60248201527f4572726f723a20596f75206d757374206f776e207468697320746f6b656e20746044820152693790313ab9371034ba1760b11b6064820152608401610fec565b611f4383613771565b604051839033907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca590600090a3506001929050565b336000908152601f6020526040902060029081015411611faa5760405162461bcd60e51b8152600401610fec90614c7a565b6114f4828261377c565b606060005b6023548110156120c457600060238281548110611fd857611fd8614d46565b906000526020600020018054611fed90614b44565b80601f016020809104026020016040519081016040528092919081815260200182805461201990614b44565b80156120665780601f1061203b57610100808354040283529160200191612066565b820191906000526020600020905b81548152906001019060200180831161204957829003601f168201915b50505050509050600060208260405161207f9190614d73565b908152604051908190036020019020600401546001600160a01b039081169150851681036120af57509392505050565b505080806120bc90614cc5565b915050611fb9565b50919050565b336000908152601f60205260409020600201546001106120fc5760405162461bcd60e51b8152600401610fec90614cde565b601a6114f48282614ddd565b60006121138261388d565b5192915050565b6121226135da565b611fa481111561218e5760405162461bcd60e51b815260206004820152603160248201527f4572726f723a204e6577206d617820737570706c792063616e6e6f742065786360448201527032b2b21037b934b3b4b730b61036b0bc1760791b6064820152608401610fec565b601055565b60006001600160a01b0382166121bc576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6121e96135da565b6121f360006139b4565b565b336000908152601f60205260409020600201546001106122275760405162461bcd60e51b8152600401610fec90614cde565b601b5460ff161561224a5760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560005b60235481101561251f5760006023828154811061227957612279614d46565b90600052602060002001805461228e90614b44565b80601f01602080910402602001604051908101604052809291908181526020018280546122ba90614b44565b80156123075780601f106122dc57610100808354040283529160200191612307565b820191906000526020600020905b8154815290600101906020018083116122ea57829003601f168201915b5050505050905060006020826040516123209190614d73565b9081526040519081900360209081018220600401546001600160a01b0316925060009161234e908590614d73565b9081526040519081900360209081018220549250600091612370908690614d73565b90815260405190819003602001902060010154905060006123918284614c2c565b9050806000036123a557505050505061250d565b804710156123f55760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a20496e73756666696369656e742062616c616e636500000000006044820152606401610fec565b600080856001600160a01b03168360405160006040518083038185875af1925050503d8060008114612443576040519150601f19603f3d011682016040523d82523d6000602084013e612448565b606091505b5091509150816124a85760405162461bcd60e51b815260206004820152602560248201527f4572726f723a204661696c656420746f2073656e642045544820746f2072656360448201526432b4bb32b960d91b6064820152608401610fec565b826020886040516124b99190614d73565b908152602001604051809103902060030160008282546124d99190614bd1565b9250508190555060006020886040516124f29190614d73565b90815260405190819003602001902060010155505050505050505b8061251781614cc5565b91505061225a565b5060005b602154811015612555576125436021828154811061190457611904614d46565b8061254d81614cc5565b915050612523565b50601b805460ff19169055565b61256a6135da565b600060208260405161257c9190614d73565b90815260405190819003602001902054116125a95760405162461bcd60e51b8152600401610fec90614e9c565b60006020826040516125bb9190614d73565b9081526040519081900360200190206004018054911515600160a01b0260ff60a01b1990921691909117905550565b6125f26135da565b60006020826040516126049190614d73565b90815260405190819003602001902054116126315760405162461bcd60e51b8152600401610fec90614e9c565b60016020826040516125bb9190614d73565b336000908152601f60205260409020600201546001106126755760405162461bcd60e51b8152600401610fec90614cde565b6017805460ff19169055565b60008082905060038151101561269a5750600092915050565b600f815111156126ad5750600092915050565b806000815181106126c0576126c0614d46565b01602001516001600160f81b031916600160fd1b036126e25750600092915050565b80600182516126f19190614bbe565b8151811061270157612701614d46565b01602001516001600160f81b031916600160fd1b036127235750600092915050565b60008160008151811061273857612738614d46565b01602001516001600160f81b031916905060005b825181101561281957600083828151811061276957612769614d46565b01602001516001600160f81b0319169050600160fd1b8190036127925750600095945050505050565b600360fc1b6001600160f81b03198216108015906127be5750603960f81b6001600160f81b0319821611155b1580156127f45750606160f81b6001600160f81b03198216108015906127f25750603d60f91b6001600160f81b0319821611155b155b156128055750600095945050505050565b91508061281181614cc5565b91505061274c565b506001949350505050565b6000600d828154811061283957612839614d46565b6000918252602090912001546001600160a01b031692915050565b61285c6135da565b601b54610100900460ff161561287157600080fd5b60156114f48282614ddd565b6128856135da565b60196114f48282614ddd565b606060048054610e6890614b44565b336001600160a01b038316036128c95760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612941600a5490565b61294b9047614bd1565b90506129768382612971866001600160a01b03166000908152600c602052604090205490565b613a04565b9392505050565b6129856135da565b6000826016546129959190614bbe565b10156129f85760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205468697320776f756c64206d616b652072657365727665642060448201526b3632b9b9903a3430b710181760a11b6064820152608401610fec565b6001600160a01b0381166000908152601f6020526040812054612a1c908490614bbe565b1015612a855760405162461bcd60e51b815260206004820152603260248201527f4572726f723a205573657220646f6573206e6f7420686176652074686973206d60448201527130b73c903932b9b2b93b32b21027232a399760711b6064820152608401610fec565b8160166000828254612a979190614bbe565b90915550506001600160a01b0381166000908152601f602052604081208054849290612ac4908490614bbe565b90915550505050565b836daaeb6d7670e522a718067333cd4e3b15612c1957336001600160a01b03821603612b0457612aff85858585613a42565b612c25565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b779190614d29565b8015612bfa5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bfa9190614d29565b612c1957604051633b79c77360e21b8152336004820152602401610fec565b612c2585858585613a42565b5050505050565b6001600160a01b0382166000908152600e602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612caf9190614ee4565b612cb99190614bd1565b6001600160a01b038086166000908152600f6020908152604080832093881683529290522054909150612cef9084908390613a04565b949350505050565b612cff6135da565b601d55565b612d0c6135da565b6001600160a01b0381166000908152601f6020526040812060020180549161199d83614cc5565b60158054612d4090614b44565b80601f0160208091040260200160405190810160405280929190818152602001828054612d6c90614b44565b8015612db95780601f10612d8e57610100808354040283529160200191612db9565b820191906000526020600020905b815481529060010190602001808311612d9c57829003601f168201915b505050505081565b6060612dcc82613545565b612de957604051630a14c4b560e41b815260040160405180910390fd5b6000612df3613a8d565b90508051600003612e135760405180602001604052806000815250612976565b80612e1d84613a9c565b604051602001612e2e929190614efd565b6040516020818303038152906040529392505050565b612e4c6135da565b601b805461ff001916610100179055565b606060198054610e6890614b44565b612e746135da565b601855565b612e816135da565b6001600160a01b038116612ee65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fec565b6113d4816139b4565b612ef76135da565b601155565b601b5460ff1615612f1f5760405162461bcd60e51b8152600401610fec90614b78565b601b805460ff1916600117905560175460ff16612f955760405162461bcd60e51b815260206004820152602e60248201527f4572726f723a2053616c65206973206e6f74206163746976652e20566961206360448201526d37b73a3930b1ba26b4b73a14149760911b6064820152608401610fec565b601654601054612fa59190614bbe565b81612fae61138b565b612fb89190614bd1565b111561302c5760405162461bcd60e51b815260206004820152603c60248201527f4572726f723a20507572636861736520776f756c6420657863656564206d617860448201527f20737570706c792e2056696120636f6e74726163744d696e7428292e000000006064820152608401610fec565b601854336000908152601f602052604090206001015461304c9083614bd1565b11156130c05760405162461bcd60e51b815260206004820152603d60248201527f4572726f723a20596f7520776f756c6420657863656564207468652077616c6c60448201527f6574206c696d69742e2056696120636f6e74726163744d696e7428292e0000006064820152608401610fec565b333b156131295760405162461bcd60e51b815260206004820152603160248201527f4572726f723a20436f6e7472616374732063616e6e6f74206d696e742e205669604482015270309031b7b73a3930b1ba26b4b73a14149760791b6064820152608401610fec565b806011546131379190614c2c565b3410156131a05760405162461bcd60e51b815260206004820152603160248201527f4572726f723a204e6f7420656e6f7567682065746865722073656e742e205669604482015270309031b7b73a3930b1ba26b4b73a14149760791b6064820152608401610fec565b336000908152601f6020526040812060010180548392906131c2908490614bd1565b909155506131d29050338261364a565b3360008051602061505a8339815191526131ea61138b565b60405190815260200160405180910390a250601b805460ff19169055565b336000908152601f602052604090206002015460011061323a5760405162461bcd60e51b8152600401610fec90614cde565b6017805460ff19166001179055565b336000908152601f602052604090206002015460011061327b5760405162461bcd60e51b8152600401610fec90614cde565b60165460105461328b9190614bbe565b815161329561138b565b61329f9190614bd1565b11156133005760405162461bcd60e51b815260206004820152602a60248201527f4572726f723a20596f7520776f756c64206578636565642074686520616972646044820152693937b8103634b6b4ba1760b11b6064820152608401610fec565b60005b81518110156114f45761333082828151811061332157613321614d46565b6020026020010151600161364a565b3360008051602061505a83398151915261334861138b565b60405190815260200160405180910390a28061336381614cc5565b915050613303565b6133736135da565b600081116133d45760405162461bcd60e51b815260206004820152602860248201527f4572726f723a20466565206d757374206265203e20302028616e6420732f622060448201526734b7102ba2a4949760c11b6064820152608401610fec565b6133dd82612681565b61344f5760405162461bcd60e51b815260206004820152603e60248201527f4572726f723a20416666696c69617465205265666572656e636520636f64652060448201527f7573656420646f65736e277420706173732076616c69646174696f6e732e00006064820152608401610fec565b6040518060c00160405280828152602001600081526020016000815260200160008152602001846001600160a01b031681526020016001151581525060208360405161349b9190614d73565b9081526040805191829003602090810190922083518155918301516001808401919091559083015160028301556060830151600383015560808301516004909201805460a0909401511515600160a01b026001600160a81b03199094166001600160a01b03909316929092179290921790556023805491820181556000527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f42300161168f8382614ddd565b600081600111158015613559575060015482105b8015610e53575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b031633146121f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fec565b6000826136418584613b2e565b14949350505050565b6114f4828260405180602001604052806000815250613b7b565b6001600160a01b0381166000908152600b60205260409020546136995760405162461bcd60e51b8152600401610fec90614f2c565b60006136a482612935565b9050806000036136c65760405162461bcd60e51b8152600401610fec90614f72565b80600a60008282546136d89190614bd1565b90915550506001600160a01b0382166000908152600c602052604090208054820190556137058282613b88565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610fb7838383613ca1565b610fb783838360405180602001604052806000815250612acd565b6113d4816000613e7a565b6001600160a01b0381166000908152600b60205260409020546137b15760405162461bcd60e51b8152600401610fec90614f2c565b60006137bd8383612c2c565b9050806000036137df5760405162461bcd60e51b8152600401610fec90614f72565b6001600160a01b0383166000908152600e602052604081208054839290613807908490614bd1565b90915550506001600160a01b038084166000908152600f6020908152604080832093861683529290522080548201905561384283838361402e565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b604080516060810182526000808252602082018190529181019190915281806001111580156138bd575060015481105b1561399b57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906139995780516001600160a01b031615613930579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613994579392505050565b613930565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546001600160a01b0384166000908152600b602052604081205490918391613a2e9086614c2c565b613a389190614fbd565b612cef9190614bbe565b613a4d848484613ca1565b6001600160a01b0383163b15158015613a6f5750613a6d84848484614080565b155b1561168f576040516368d2bf6b60e11b815260040160405180910390fd5b6060601a8054610e6890614b44565b60606000613aa98361416b565b60010190506000816001600160401b03811115613ac857613ac8614809565b6040519080825280601f01601f191660200182016040528015613af2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613afc57509392505050565b600081815b8451811015613b7357613b5f82868381518110613b5257613b52614d46565b6020026020010151614243565b915080613b6b81614cc5565b915050613b33565b509392505050565b610fb7838383600161426f565b80471015613bd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610fec565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c25576040519150601f19603f3d011682016040523d82523d6000602084013e613c2a565b606091505b5050905080610fb75760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610fec565b6000613cac8261388d565b9050836001600160a01b031681600001516001600160a01b031614613ce35760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480613d015750613d018533610cf7565b80613d1c575033613d1184610eeb565b6001600160a01b0316145b905080613d3c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416613d6357604051633a954ecd60e21b815260040160405180910390fd5b613d6f6000848761357e565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613e43576001548214613e4357805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b031660008051602061503a83398151915260405160405180910390a4612c25565b6000613e858361388d565b80519091508215613eeb576000336001600160a01b0383161480613eae5750613eae8233610cf7565b80613ec9575033613ebe86610eeb565b6001600160a01b0316145b905080613ee957604051632ce44b5f60e11b815260040160405180910390fd5b505b613ef76000858361357e565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116613ff5576001548214613ff557805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b0384169060008051602061503a833981519152908390a450506002805460010190555050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fb790849061441c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906140b5903390899088908890600401614fdf565b6020604051808303816000875af19250505080156140f0575060408051601f3d908101601f191682019092526140ed9181019061501c565b60015b61414e573d80801561411e576040519150601f19603f3d011682016040523d82523d6000602084013e614123565b606091505b508051600003614146576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106141aa5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106141d6576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106141f457662386f26fc10000830492506010015b6305f5e100831061420c576305f5e100830492506008015b612710831061422057612710830492506004015b60648310614232576064830492506002015b600a8310610e535760010192915050565b600081831061425f576000828152602084905260409020612976565b5060009182526020526040902090565b6001546001600160a01b03851661429857604051622e076360e81b815260040160405180910390fd5b836000036142b95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561436a57506001600160a01b0387163b15155b156143e0575b60405182906001600160a01b0389169060009060008051602061503a833981519152908290a46143a96000888480600101955088614080565b6143c6576040516368d2bf6b60e11b815260040160405180910390fd5b8082036143705782600154146143db57600080fd5b614413565b5b6040516001830192906001600160a01b0389169060009060008051602061503a833981519152908290a48082036143e1575b50600155612c25565b6000614471826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166144ee9092919063ffffffff16565b805190915015610fb7578080602001905181019061448f9190614d29565b610fb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610fec565b6060612cef848460008585600080866001600160a01b031685876040516145159190614d73565b60006040518083038185875af1925050503d8060008114614552576040519150601f19603f3d011682016040523d82523d6000602084013e614557565b606091505b509150915061456887838387614573565b979650505050505050565b606083156145e25782516000036145db576001600160a01b0385163b6145db5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610fec565b5081612cef565b612cef83838151156145f75781518083602001fd5b8060405162461bcd60e51b8152600401610fec9190614694565b6001600160e01b0319811681146113d457600080fd5b60006020828403121561463957600080fd5b813561297681614611565b60005b8381101561465f578181015183820152602001614647565b50506000910152565b60008151808452614680816020860160208601614644565b601f01601f19169290920160200192915050565b6020815260006129766020830184614668565b6000602082840312156146b957600080fd5b5035919050565b6001600160a01b03811681146113d457600080fd5b600080604083850312156146e857600080fd5b82356146f3816146c0565b946020939093013593505050565b60008060006040848603121561471657600080fd5b83356001600160401b038082111561472d57600080fd5b818601915086601f83011261474157600080fd5b81358181111561475057600080fd5b8760208260051b850101111561476557600080fd5b6020928301989097509590910135949350505050565b60006020828403121561478d57600080fd5b8135612976816146c0565b600080604083850312156147ab57600080fd5b8235915060208301356147bd816146c0565b809150509250929050565b6000806000606084860312156147dd57600080fd5b83356147e8816146c0565b925060208401356147f8816146c0565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561484757614847614809565b604052919050565b60006001600160401b0383111561486857614868614809565b61487b601f8401601f191660200161481f565b905082815283838301111561488f57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126148b757600080fd5b6129768383356020850161484f565b6000602082840312156148d857600080fd5b81356001600160401b038111156148ee57600080fd5b612cef848285016148a6565b6000806040838503121561490d57600080fd5b8235614918816146c0565b915060208301356147bd816146c0565b80151581146113d457600080fd5b60008060006060848603121561494b57600080fd5b83359250602084013561495d81614928565b915060408401356001600160401b0381111561497857600080fd5b614984868287016148a6565b9150509250925092565b600080604083850312156149a157600080fd5b82356149ac816146c0565b915060208301356147bd81614928565b600080600080608085870312156149d257600080fd5b84356149dd816146c0565b935060208501356149ed816146c0565b92506040850135915060608501356001600160401b03811115614a0f57600080fd5b8501601f81018713614a2057600080fd5b614a2f8782356020840161484f565b91505092959194509250565b60006020808385031215614a4e57600080fd5b82356001600160401b0380821115614a6557600080fd5b818501915085601f830112614a7957600080fd5b813581811115614a8b57614a8b614809565b8060051b9150614a9c84830161481f565b8181529183018401918481019088841115614ab657600080fd5b938501935b83851015614ae05784359250614ad0836146c0565b8282529385019390850190614abb565b98975050505050505050565b600080600060608486031215614b0157600080fd5b8335614b0c816146c0565b925060208401356001600160401b03811115614b2757600080fd5b614b33868287016148a6565b925050604084013590509250925092565b600181811c90821680614b5857607f821691505b6020821081036120c457634e487b7160e01b600052602260045260246000fd5b60208082526016908201527522b93937b91d10273790393296b2b73a3930b731bc9760511b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5357610e53614ba8565b80820180821115610e5357610e53614ba8565b60208082526028908201527f4572726f723a20507572636861736520776f756c6420657863656564206d61786040820152671039bab838363c9760c11b606082015260800190565b8082028115828204841417610e5357610e53614ba8565b6020808252601d908201527f4572726f723a204e6f7420656e6f7567682065746865722073656e742e000000604082015260600190565b6020808252602b908201527f4572726f723a204c6576656c2033282b292061646d696e20636c656172616e6360408201526a32903932b8bab4b932b21760a91b606082015260800190565b600060018201614cd757614cd7614ba8565b5060010190565b6020808252602b908201527f4572726f723a204c6576656c2032282b292061646d696e20636c656172616e6360408201526a32903932b8bab4b932b21760a91b606082015260800190565b600060208284031215614d3b57600080fd5b815161297681614928565b634e487b7160e01b600052603260045260246000fd5b600081614d6b57614d6b614ba8565b506000190190565b60008251614d85818460208701614644565b9190910192915050565b601f821115610fb757600081815260208120601f850160051c81016020861015614db65750805b601f850160051c820191505b81811015614dd557828155600101614dc2565b505050505050565b81516001600160401b03811115614df657614df6614809565b614e0a81614e048454614b44565b84614d8f565b602080601f831160018114614e3f5760008415614e275750858301515b600019600386901b1c1916600185901b178555614dd5565b600085815260208120601f198616915b82811015614e6e57888601518255948401946001909101908401614e4f565b5085821015614e8c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526028908201527f4572726f723a20416666696c69617465207265666572656e6365206c696b656c6040820152673c903bb937b7339760c11b606082015260800190565b600060208284031215614ef657600080fd5b5051919050565b60008351614f0f818460208801614644565b835190830190614f23818360208801614644565b01949350505050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b600082614fda57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061501290830184614668565b9695505050505050565b60006020828403121561502e57600080fd5b81516129768161461156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885a2646970667358221220066f4ab7d42a8821ddfa596706d3075b471f71e574e03ec56b77111c3faa366264736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000018016a66db1f27f6bfb741435c2b66c82ba1de0c2b7fdca995f02773e245d41b5e60000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0000000000000000000000000bac4e21cc21afc4a9733b80424e456cf3bbad9a10000000000000000000000001184c8eb78d538ba3f60ce7599686d5481ff851500000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000000000000000170c0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000001489aa1854b9920529a275bf9e2615366a5488df000000000000000000000000402905d2aa5d66515d51faf2dfa4e350634dd20a00000000000000000000000002c65175f7daf40be976e4fa54842b08149d8c6d000000000000000000000000827c622c85c9970b4902918bc5b843e0aa29148900000000000000000000000001d71a1e369cd675a1215b9f1bd63b582f6f257a0000000000000000000000007a204ae5b7e4458f87c9ec5056953caf3f9aece9000000000000000000000000e8dbd6474fb0128863f5d3204af5ef363d90adb00000000000000000000000005622cc24ddecf5888d31df4b8b12648d105472bc00000000000000000000000022bd04906e808196b19f7d10463fe463ed5f88cb000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0
-----Decoded View---------------
Arg [0] : distro (address[]): 0xa7CfE42834468cedbD986D58950700E84AEE59A0,0xbac4e21cC21aFc4a9733B80424e456CF3bBAd9A1,0x1184c8eb78d538BA3F60cE7599686d5481ff8515
Arg [1] : distro_shares (uint256[]): 4000,5900,100
Arg [2] : teamclaim (address[]): 0x1489Aa1854b9920529A275BF9e2615366a5488Df,0x402905d2AA5D66515D51FAF2dFA4e350634dd20A,0x02C65175F7DAF40bE976E4Fa54842b08149d8C6d,0x827C622c85c9970b4902918bc5B843e0AA291489,0x01d71a1e369CD675A1215b9f1Bd63b582f6F257a,0x7A204AE5b7E4458f87c9EC5056953caF3f9aECe9,0xE8DbD6474fb0128863F5D3204af5Ef363D90aDb0,0x5622cC24DdECF5888D31DF4b8B12648d105472bC,0x22Bd04906E808196B19F7d10463fE463Ed5f88CB,0xa7CfE42834468cedbD986D58950700E84AEE59A0
Arg [3] : _merkleRoot (bytes32): 0x16a66db1f27f6bfb741435c2b66c82ba1de0c2b7fdca995f02773e245d41b5e6
-----Encoded View---------------
23 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : 16a66db1f27f6bfb741435c2b66c82ba1de0c2b7fdca995f02773e245d41b5e6
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0
Arg [6] : 000000000000000000000000bac4e21cc21afc4a9733b80424e456cf3bbad9a1
Arg [7] : 0000000000000000000000001184c8eb78d538ba3f60ce7599686d5481ff8515
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000fa0
Arg [10] : 000000000000000000000000000000000000000000000000000000000000170c
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [12] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [13] : 0000000000000000000000001489aa1854b9920529a275bf9e2615366a5488df
Arg [14] : 000000000000000000000000402905d2aa5d66515d51faf2dfa4e350634dd20a
Arg [15] : 00000000000000000000000002c65175f7daf40be976e4fa54842b08149d8c6d
Arg [16] : 000000000000000000000000827c622c85c9970b4902918bc5b843e0aa291489
Arg [17] : 00000000000000000000000001d71a1e369cd675a1215b9f1bd63b582f6f257a
Arg [18] : 0000000000000000000000007a204ae5b7e4458f87c9ec5056953caf3f9aece9
Arg [19] : 000000000000000000000000e8dbd6474fb0128863f5d3204af5ef363d90adb0
Arg [20] : 0000000000000000000000005622cc24ddecf5888d31df4b8b12648d105472bc
Arg [21] : 00000000000000000000000022bd04906e808196b19f7d10463fe463ed5f88cb
Arg [22] : 000000000000000000000000a7cfe42834468cedbd986d58950700e84aee59a0
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.