ERC-721
Overview
Max Total Supply
155 ANTHONYJAMES
Holders
60
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 ANTHONYJAMESLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AnthonyJames
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import "./lib/ERC721EnumerableOpensea.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "./lib/IWCNFTErrorCodes.sol"; import "./lib/WCNFTToken.sol"; import "./lib/WCNFTMerkle.sol"; import "./external/delegate-cash/IDelegationRegistry.sol"; import "@openzeppelin/contracts/utils/structs/BitMaps.sol"; contract AnthonyJames is ReentrancyGuard, WCNFTMerkle, WCNFTToken, IWCNFTErrorCodes, ERC721EnumerableOpensea { using BitMaps for BitMaps.BitMap; uint256 public constant TIER_1_MAX_SUPPLY = 1060; uint256 public constant TIER_2_TOKEN_ID_START = 2000; uint256 public constant MAX_PUBLIC_MINT = 1; uint256 public constant PRICE_PER_TOKEN = 0.2 ether; // state machine enum Stages { Initialization, MintPass, MintPassEnded, AllowList, AllowListEnded, PublicSale, PublicSaleEnded, Redeem, Finished } /// function cannot be called at this time. error FunctionInvalidAtThisStage(); /// check delegate.cash for contract delegation error NotDelegatedOnContract(); /// check delegate.cash for token delegation error NotDelegatedOnToken(uint256 tokenId); /// cannot claim if token id has already been claimed error TokenIdAlreadyClaimed(uint256 tokenId); /// callee is not the owner of the token id in the base contract error NotOwnerOfMintPass(uint256 tokenId); /// to redeem a new token, must provide 2 or 5 tokens error InvalidRedemptionQuantity(); /// invalid token id to burn error InvalidTokenIdToBurn(uint256 tokenId); /// call not owner nor approved error TransferCallerNotOwnerNorApproved(); /// cannot set base contract address if not ERC721Enumerable error ContractIsNotERC721Enumerable(); /// cannot set tier 2 ids less than tier 1 max supply error Tier2TokenIdStartMustBeGreaterThanTier1Supply(); /// cannot use invalid goda mint pass token ids error InvalidMintPassTokenId(); // this is the current stage Stages public stage = Stages.Initialization; BitMaps.BitMap private _bitmap; string public provenance; string private _baseURIextended; IERC721Enumerable public immutable baseContractAddress; address payable public immutable shareholderAddress; address private constant _DELEGATION_REGISTRY = 0x00000000000076A84feF008CDAbe6409d2FE638B; // maintain minting and burn counters for different tiers uint16 public tier1Minted; uint16 public tier2Minted; uint16 public tier1Burned; /** * @dev constructor * @param shareholderAddress_ the shareholder address * @param contractAddress the contract address for mint passes */ constructor( address payable shareholderAddress_, address contractAddress ) ERC721("Anthony James - Platonic Solids", "ANTHONYJAMES") WCNFTToken() { if (shareholderAddress_ == address(0)) revert ZeroAddressProvided(); if ( !IERC721Enumerable(contractAddress).supportsInterface( type(IERC721Enumerable).interfaceId ) ) { revert ContractIsNotERC721Enumerable(); } if (TIER_2_TOKEN_ID_START < TIER_1_MAX_SUPPLY) { revert Tier2TokenIdStartMustBeGreaterThanTier1Supply(); } // set immutable variables shareholderAddress = shareholderAddress_; baseContractAddress = IERC721Enumerable(contractAddress); } /** * @dev checks to see if amount of tokens to be minted would exceed the * maximum supply allowed * @param numberOfTokens the number of tokens to be minted */ modifier tier1SupplyAvailable(uint256 numberOfTokens) { if (tier1Minted + numberOfTokens > TIER_1_MAX_SUPPLY) { revert ExceedsMaximumSupply(); } _; } /** * @dev checks to see whether the contract is at the correct stage * @param stage_ the stage that the contract should be in */ modifier atStage(Stages stage_) { if (stage != stage_) { revert FunctionInvalidAtThisStage(); } _; } /** * @dev transitions to the next stage after operations have been completed */ modifier transitionNext() { _; _nextStage(); } /** * @dev advance to the next stage */ function _nextStage() internal { stage = Stages(uint256(stage) + 1); } /** * @dev only for use when a stage has been advanced incorrectly * @param stage_ the stage to advance to */ function setStage(Stages stage_) external onlyOwner { stage = stage_; } /*************************************************************************** * Admin */ /** * @dev mints tokens for tier1 * @param to recipient address * @param numberOfTokens number of tokens to mint */ function _mintTier1(address to, uint256 numberOfTokens) internal { uint256 tokenIdStart = tier1Minted; tier1Minted = uint16(tokenIdStart + numberOfTokens); for (uint256 index; index < numberOfTokens; ) { _safeMint(to, tokenIdStart + index); unchecked { ++index; } } } /** * @dev mints tokens for tier2 * @param to recipient address * @param numberOfTokens number of tokens to mint */ function _mintTier2(address to, uint256 numberOfTokens) internal { uint256 tokenIdStart = TIER_2_TOKEN_ID_START + tier2Minted; tier2Minted = uint16(tier2Minted + numberOfTokens); for (uint256 index; index < numberOfTokens; ) { _safeMint(to, tokenIdStart + index); unchecked { ++index; } } } /** * @dev reserves a number of tokens * @param to recipient address * @param numberOfTokens the number of tokens to be minted */ function devMint( address to, uint256 numberOfTokens ) external onlyRole(SUPPORT_ROLE) tier1SupplyAvailable(numberOfTokens) nonReentrant { _mintTier1(to, numberOfTokens); } /*************************************************************************** * State Machine Transitions */ /** * @dev start mint pass stage */ function startMintPassStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.Initialization) transitionNext {} /** * @dev stop mint pass stage */ function stopMintPassStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.MintPass) transitionNext {} /** * @dev start allow list mint stage */ function startAllowListStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.MintPassEnded) transitionNext {} /** * @dev stop allow list mint stage */ function stopAllowListStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.AllowList) transitionNext {} /** * @dev start public sale stage */ function startPublicSaleStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.AllowListEnded) transitionNext {} /** * @dev stop public sale stage */ function stopPublicSaleStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.PublicSale) transitionNext {} /** * @dev start redeem stage */ function startRedeemStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.PublicSaleEnded) transitionNext {} /** * @dev stop redeem stage */ function stopRedeemStage() external onlyRole(SUPPORT_ROLE) atStage(Stages.Redeem) transitionNext {} /*************************************************************************** * Tokens */ /** * @dev sets the base uri for {_baseURI} * @param baseURI_ the base uri */ function setBaseURI( string calldata baseURI_ ) external onlyRole(SUPPORT_ROLE) { _baseURIextended = baseURI_; } /** * @dev See {ERC721-_baseURI}. */ function _baseURI() internal view virtual override returns (string memory) { return _baseURIextended; } /** * @dev sets the provenance hash * @param provenance_ the provenance hash */ function setProvenance( string calldata provenance_ ) external onlyRole(SUPPORT_ROLE) { provenance = provenance_; } /** * @dev See {IERC165-supportsInterface}. * @param interfaceId the interface id */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721Enumerable, WCNFTToken, AccessControl) returns (bool) { return ERC721Enumerable.supportsInterface(interfaceId) || WCNFTToken.supportsInterface(interfaceId); } /*************************************************************************** * Public */ /** * @dev returns the supply in tier 1 (minted - burned) */ function tier1Supply() external view returns (uint256) { return tier1Minted - tier1Burned; } /** * @dev returns the supply in tier 2 */ function tier2Supply() external view returns (uint256) { return tier2Minted; } /** * @dev checks to see whether a mint pass has been previously used * @param tokenId the token id */ function mintPassClaimed(uint256 tokenId) public view returns (bool) { return _bitmap.get(tokenId); } /** * @notice delegate.cash is an unaffiliated external service, use it at your * own risk! Their docs are available at http://delegate.cash * The function expects either the user executing this function to own all * of the tokens ids, or have been delegated for all of the token ids (no * mixing). * * @dev allows minting using a mint pass * @param vault if using delegate.cash, the address that holds the mint pass. * Set this to 0x000..000 if not using delegation. * @param tokenIds the GODA Mint Pass token IDs to claim */ function mintWithMintPass( address vault, uint256[] memory tokenIds ) public payable atStage(Stages.MintPass) tier1SupplyAvailable(tokenIds.length) nonReentrant { uint256 tokenIdsLength = tokenIds.length; // check if price is correct if (PRICE_PER_TOKEN * tokenIdsLength != msg.value) { revert WrongETHValueSent(); } for (uint256 index; index < tokenIdsLength; ) { uint256 tokenId = tokenIds[index]; address claimer = msg.sender; // mint passes only valid from 0-999 if (tokenId >= 1000) { revert InvalidMintPassTokenId(); } // check if mint pass has been used if (mintPassClaimed(tokenId)) { revert TokenIdAlreadyClaimed(tokenId); } // check vault if using delegation if (vault != address(0) && vault != msg.sender) { if ( !( IDelegationRegistry(_DELEGATION_REGISTRY) .checkDelegateForToken( msg.sender, vault, address(baseContractAddress), tokenId ) ) ) { revert NotDelegatedOnToken(tokenId); } // msg.sender is delegated for vault claimer = vault; } // check if claimer owns a mint pass if (baseContractAddress.ownerOf(tokenId) != claimer) revert NotOwnerOfMintPass(tokenId); _bitmap.set(tokenId); unchecked { ++index; } } // mint tier 1 tokens _mintTier1(msg.sender, tokenIdsLength); } /** * @notice gets the balance of tokens owned in the base contract, and * subtracts the amount already claimed * @param from the address to check */ function availableToClaim(address from) external view returns (uint256) { uint256 baseBalance = baseContractAddress.balanceOf(from); uint256 amountClaimable; for (uint256 index; index < baseBalance; ) { if ( !mintPassClaimed( baseContractAddress.tokenOfOwnerByIndex(from, index) ) ) { unchecked { ++amountClaimable; } } unchecked { ++index; } } return amountClaimable; } /** * @notice utility function to get available ids to claim * @param from the address to check */ function availableIdsToClaim( address from ) public view returns (uint256[] memory) { uint256 totalMintPasses = baseContractAddress.balanceOf(from); uint256[] memory availableTokenIds = new uint256[](totalMintPasses); uint256 amountClaimable; for (uint256 index; index < totalMintPasses; ) { uint256 tokenId = baseContractAddress.tokenOfOwnerByIndex( from, index ); if (!mintPassClaimed(tokenId)) { availableTokenIds[amountClaimable] = tokenId; unchecked { ++amountClaimable; } } unchecked { ++index; } } uint256[] memory unclaimedTokenIds = new uint256[](amountClaimable); for (uint256 index; index < amountClaimable; ) { unclaimedTokenIds[index] = availableTokenIds[index]; unchecked { ++index; } } return unclaimedTokenIds; } /** * @notice get all tokens owned in the base contract, then claims the tokens * NOTE: This function is gas intensive! To save gas call availableIdsToClaim() * and use the returned array in mintWithMintPass(). * @dev this will revert if any tokens have been claimed already */ function claim() external payable { uint256[] memory tokenIds = availableIdsToClaim(msg.sender); mintWithMintPass(address(0), tokenIds); } /** * @notice delegate.cash is an unaffiliated external service, use it at your * own risk! Their docs are available at http://delegate.cash * @dev allow minting if the msg.sender is on the allow list * @param vault if using delegate.cash: the address featured on the allow list, * which must have delegated the calling (hot) wallet on this contract. * Set vault to 0x000..000 if not using delegation. * @param numberOfTokens the number of tokens to be minted * @param tokenQuota the maximum number of tokens to mint * @param price the price per token * @param proof the merkle proof used */ function mintAllowList( address vault, uint256 numberOfTokens, uint256 tokenQuota, uint256 price, bytes32[] memory proof ) external payable atStage(Stages.AllowList) tier1SupplyAvailable(numberOfTokens) nonReentrant { // check if price is correct if ((numberOfTokens * price) != msg.value) revert WrongETHValueSent(); address claimer = msg.sender; // check vault if using delegation if (vault != address(0) && vault != msg.sender) { if ( !( IDelegationRegistry(_DELEGATION_REGISTRY) .checkDelegateForContract( msg.sender, vault, address(this) ) ) ) { revert NotDelegatedOnContract(); } // msg.sender is delegated for vault claimer = vault; } // check if the claimer has tokens remaining in their quota uint256 tokensClaimed = getAllowListMinted(claimer); if (tokensClaimed + numberOfTokens > tokenQuota) { revert ExceedsAllowListQuota(); } // check if the claimer is on the allowlist if (!onAllowListC(claimer, tokenQuota, price, proof)) { revert NotOnAllowList(); } _setAllowListMinted(claimer, numberOfTokens); _mintTier1(msg.sender, numberOfTokens); } /** * @dev allow public minting * @param numberOfTokens the number of tokens to be minted */ function mint( uint256 numberOfTokens ) external payable atStage(Stages.PublicSale) tier1SupplyAvailable(numberOfTokens) nonReentrant { if (numberOfTokens > MAX_PUBLIC_MINT) { revert ExceedsMaximumTokensPerTransaction(); } if (numberOfTokens * PRICE_PER_TOKEN != msg.value) { revert WrongETHValueSent(); } _mintTier1(msg.sender, numberOfTokens); } /** * @dev redeem function to generate another token. * This function bypasses the MAX_SUPPLY check since it's assumed all tokens * have been sold by this point. Also doesn't check duplicate token ids * because it is assumed that burn will error. * @param tokenIds an array of token ids. Must be either length 2 or 5 */ function redeem( uint256[] calldata tokenIds ) external atStage(Stages.Redeem) nonReentrant { uint256 tokenIdsLength = tokenIds.length; if (!(tokenIdsLength == 2 || tokenIdsLength == 5)) { revert InvalidRedemptionQuantity(); } // burn all tokens for (uint256 index; index < tokenIdsLength; ) { uint256 tokenId = tokenIds[index]; if (tokenId >= TIER_1_MAX_SUPPLY) revert InvalidTokenIdToBurn(tokenId); // emulate burn from ERC721Burnable if (!_isApprovedOrOwner(_msgSender(), tokenId)) { revert TransferCallerNotOwnerNorApproved(); } _burn(tokenId); _resetTokenRoyalty(tokenId); unchecked { ++index; } } tier1Burned += uint16(tokenIdsLength); _mintTier2(msg.sender, 1); } /*************************************************************************** * Withdraw */ /** * @dev withdraws ether from the contract to the shareholder address */ function withdraw() external onlyOwner nonReentrant { (bool success, ) = shareholderAddress.call{ value: address(this).balance }(""); if (!success) revert WithdrawFailed(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.17; /** * @title An immutable registry contract to be deployed as a standalone primitive * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations * from here and integrate those permissions into their flow */ interface IDelegationRegistry { /// @notice Delegation type enum DelegationType { NONE, ALL, CONTRACT, TOKEN } /// @notice Info about a single delegation, used for onchain enumeration struct DelegationInfo { DelegationType type_; address vault; address delegate; address contract_; uint256 tokenId; } /// @notice Info about a single contract-level delegation struct ContractDelegation { address contract_; address delegate; } /// @notice Info about a single token-level delegation struct TokenDelegation { address contract_; uint256 tokenId; address delegate; } /// @notice Emitted when a user delegates their entire wallet event DelegateForAll(address vault, address delegate, bool value); /// @notice Emitted when a user delegates a specific contract event DelegateForContract(address vault, address delegate, address contract_, bool value); /// @notice Emitted when a user delegates a specific token event DelegateForToken(address vault, address delegate, address contract_, uint256 tokenId, bool value); /// @notice Emitted when a user revokes all delegations event RevokeAllDelegates(address vault); /// @notice Emitted when a user revoes all delegations for a given delegate event RevokeDelegate(address vault, address delegate); /** * ----------- WRITE ----------- */ /** * @notice Allow the delegate to act on your behalf for all contracts * @param delegate The hotwallet to act on your behalf * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForAll(address delegate, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific contract * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForContract(address delegate, address contract_, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific token * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForToken(address delegate, address contract_, uint256 tokenId, bool value) external; /** * @notice Revoke all delegates */ function revokeAllDelegates() external; /** * @notice Revoke a specific delegate for all their permissions * @param delegate The hotwallet to revoke */ function revokeDelegate(address delegate) external; /** * @notice Remove yourself as a delegate for a specific vault * @param vault The vault which delegated to the msg.sender, and should be removed */ function revokeSelf(address vault) external; /** * ----------- READ ----------- */ /** * @notice Returns all active delegations a given delegate is able to claim on behalf of * @param delegate The delegate that you would like to retrieve delegations for * @return info Array of DelegationInfo structs */ function getDelegationsByDelegate(address delegate) external view returns (DelegationInfo[] memory); /** * @notice Returns an array of wallet-level delegates for a given vault * @param vault The cold wallet who issued the delegation * @return addresses Array of wallet-level delegates for a given vault */ function getDelegatesForAll(address vault) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault and contract * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract you're delegating * @return addresses Array of contract-level delegates for a given vault and contract */ function getDelegatesForContract(address vault, address contract_) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault's token * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract holding the token * @param tokenId The token id for the token you're delegating * @return addresses Array of contract-level delegates for a given vault's token */ function getDelegatesForToken(address vault, address contract_, uint256 tokenId) external view returns (address[] memory); /** * @notice Returns all contract-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of ContractDelegation structs */ function getContractLevelDelegations(address vault) external view returns (ContractDelegation[] memory delegations); /** * @notice Returns all token-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of TokenDelegation structs */ function getTokenLevelDelegations(address vault) external view returns (TokenDelegation[] memory delegations); /** * @notice Returns true if the address is delegated to act on the entire vault * @param delegate The hotwallet to act on your behalf * @param vault The cold wallet who issued the delegation */ function checkDelegateForAll(address delegate, address vault) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForContract(address delegate, address vault, address contract_) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForToken(address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @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 virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @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) { _requireMinted(tokenId); 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 overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _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 { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./WCNFTToken.sol"; /** * @dev utility contract for white list/allow list using merkle trees * * 3 merkle variations are possible, but only 1 can be used with a given merkle root * Type A: [address] * - for use with a fixed number of mints for all addresses * Type B: [address, uint256] * - for use with a variable number of mints per address * Type C: [address, uint256, uint256] * - for use with variable number of mints and an additional parameter per address (ex. different * pricing) * * If the root corresponds to type A, use the A functions ("mintAllowListA()"...). * If the root corresponds to type B or C, use the B or C functions respectively ("onAllowListB()", * ableToClaimC()" etc) * * setting the merkle root resets the mint counts, and cannot be set when the allow list is active. * To set a new merkle root without resetting user mint counts use setAllowListPreserveBalances() */ contract WCNFTMerkle is WCNFTAccessControl { struct Claimer { uint224 amount; uint32 nonce; } bytes32 public merkleRoot; uint32 private _nonce; bool public allowListActive = false; mapping(address => Claimer) private _allowListNumMinted; /// Attempted access to inactive presale error AllowListIsNotActive(); /// Attempted to set merkle while allow list is active error AllowListIsActive(); /// Exceeds allow list quota error ExceedsAllowListQuota(); /// Merkle root has not been set error MerkleRootNotSet(); /// Merkle proof and user do not resolve to merkleRoot error NotOnAllowList(); /** * @dev emitted when an account has claimed some tokens */ event Claimed(address indexed account, uint256 amount); /** * @dev emitted when the merkle root has changed */ event MerkleRootChanged(bytes32 merkleRoot); /** * @dev throws when allow list is not active */ modifier isAllowListActive() { if (!allowListActive) revert AllowListIsNotActive(); _; } /** * @dev throws when number of tokens exceeds total token amount * @param to the address to check * @param numberOfTokens the number of tokens to be minted * @param tokenQuota the amount of tokens allowed */ modifier tokensAvailable( address to, uint256 numberOfTokens, uint256 tokenQuota ) { uint256 claimed = getAllowListMinted(to); if (claimed + numberOfTokens > tokenQuota) revert ExceedsAllowListQuota(); _; } /** * @dev throws when parameters sent by claimer is incorrect * @param claimer the address of the claimer * @param proof the merkle proof */ modifier ableToClaimA(address claimer, bytes32[] memory proof) { if (!onAllowListA(claimer, proof)) revert NotOnAllowList(); _; } /** * @dev throws when parameters sent by claimer is incorrect * @param claimer the address of the claimer * @param b additional uint256 parameter * @param proof the merkle proof */ modifier ableToClaimB( address claimer, uint256 b, bytes32[] memory proof ) { if (!onAllowListB(claimer, b, proof)) revert NotOnAllowList(); _; } /** * @dev throws when parameters sent by claimer is incorrect * @param claimer the address of the claimer * @param b additional uint256 parameter * @param c additional uint256 parameter * @param proof the merkle proof */ modifier ableToClaimC( address claimer, uint256 b, uint256 c, bytes32[] memory proof ) { if (!onAllowListC(claimer, b, c, proof)) revert NotOnAllowList(); _; } /** * @dev sets the state of the allow list * @param allowListActive_ the state of the allow list */ function _setAllowListActive(bool allowListActive_) internal virtual { allowListActive = allowListActive_; } /** * @dev sets the merkle root. reverts when allow list is active * @param merkleRoot_ the merkle root * @param preserveBalances set to true if merkle root was changed and nonce does not need to be * updated */ function _setAllowList(bytes32 merkleRoot_, bool preserveBalances) internal virtual { if (allowListActive) revert AllowListIsActive(); merkleRoot = merkleRoot_; if (!preserveBalances) { _nonce += 1; } emit MerkleRootChanged(merkleRoot); } /** * @dev adds the number of tokens to the incoming address * @param to the address * @param numberOfTokens the number of tokens to be minted */ function _setAllowListMinted(address to, uint256 numberOfTokens) internal virtual { Claimer storage claimer = _allowListNumMinted[to]; // if nonce isn't equal, set the nonce if (_nonce != claimer.nonce) { claimer.nonce = _nonce; claimer.amount = uint224(numberOfTokens); } else { claimer.amount += uint224(numberOfTokens); } emit Claimed(to, numberOfTokens); } /** * @dev starts and stops allow list minting * @param state the state of the allow list */ function setAllowListActive(bool state) external virtual onlyRole(SUPPORT_ROLE) { _setAllowListActive(state); } /** * @notice set the merkle root without resetting allow list mint counts * @dev sets the merkle root for the allow list, without resetting the nonce value. Allows the * support role to update the merkle root while preserving balances * @param merkleRoot_ the merkle root */ function setAllowListPreserveBalances(bytes32 merkleRoot_) external onlyRole(SUPPORT_ROLE) { _setAllowList(merkleRoot_, true); } /** * @notice set the merkle root and reset allow list mint counts * @dev sets the merkle root for the allow list * @param merkleRoot_ the merkle root */ function setAllowList(bytes32 merkleRoot_) external onlyRole(SUPPORT_ROLE) { _setAllowList(merkleRoot_, false); } /** * @dev gets the number of tokens from the address * @param from the address to check */ function getAllowListMinted(address from) public view virtual returns (uint256) { Claimer memory claimer = _allowListNumMinted[from]; return (_nonce != claimer.nonce) ? 0 : claimer.amount; } /** * @dev checks if the claimer has a valid proof * @param claimer the address of the claimer * @param proof the merkle proof */ function onAllowListA(address claimer, bytes32[] memory proof) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(claimer)); return MerkleProof.verify(proof, merkleRoot, leaf); } /** * @dev checks if the claimer has a valid proof * @param claimer the address of the claimer * @param b additional uint256 parameter * @param proof the merkle proof */ function onAllowListB( address claimer, uint256 b, bytes32[] memory proof ) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(claimer, b)); return MerkleProof.verify(proof, merkleRoot, leaf); } /** * @dev checks if the claimer has a valid proof * @param claimer the address of the claimer * @param b additional uint256 parameter * @param c additional uint256 parameter * @param proof the merkle proof */ function onAllowListC( address claimer, uint256 b, uint256 c, bytes32[] memory proof ) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(claimer, b, c)); return MerkleProof.verify(proof, merkleRoot, leaf); } }
// 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 pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = 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(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: 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 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ 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 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// 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 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; /** * @dev custom error codes common to many contracts are predefined here */ interface IWCNFTErrorCodes { /// Exceeds maximum tokens per transaction error ExceedsMaximumTokensPerTransaction(); /// Exceeds maximum supply error ExceedsMaximumSupply(); /// Exceeds maximum reserve supply error ExceedsReserveSupply(); /// Attempted access to inactive public sale error PublicSaleIsNotActive(); /// Failed withdrawal from contract error WithdrawFailed(); /// The wrong ETH value has been sent with a transaction error WrongETHValueSent(); /// The zero address 0x00..000 has been provided as an argument error ZeroAddressProvided(); /// A zero quantity cannot be requested here error ZeroQuantityRequested(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; /** * @dev include SUPPORT_ROLE access control */ contract WCNFTAccessControl is AccessControl { bytes32 public constant SUPPORT_ROLE = keccak256("SUPPORT"); } /** * @dev collect common elements for multiple contracts. * Includes SUPPORT_ROLE access control and ERC2981 on chain royalty info. */ contract WCNFTToken is WCNFTAccessControl, Ownable, ERC2981 { constructor() { // set up roles _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(SUPPORT_ROLE, msg.sender); } /*************************************************************************** * Royalties */ /** * @dev See {ERC2981-_setDefaultRoyalty}. */ function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(SUPPORT_ROLE) { _setDefaultRoyalty(receiver, feeNumerator); } /** * @dev See {ERC2981-_deleteDefaultRoyalty}. */ function deleteDefaultRoyalty() external onlyRole(SUPPORT_ROLE) { _deleteDefaultRoyalty(); } /** * @dev See {ERC2981-_setTokenRoyalty}. */ function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyRole(SUPPORT_ROLE) { _setTokenRoyalty(tokenId, receiver, feeNumerator); } /** * @dev See {ERC2981-_resetTokenRoyalty}. */ function resetTokenRoyalty(uint256 tokenId) external onlyRole(SUPPORT_ROLE) { _resetTokenRoyalty(tokenId); } /*************************************************************************** * Overrides */ /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol) pragma solidity ^0.8.0; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @title ERC721EnumerableOpensea * @notice This example contract is configured to use the DefaultOperatorFilterer, which automatically registers the * token and subscribes it to OpenSea's curated filters. * Adding the onlyAllowedOperator modifier to the transferFrom and both safeTransferFrom methods ensures that * the msg.sender (operator) is allowed by the OperatorFilterRegistry. Adding the onlyAllowedOperatorApproval * modifier to the approval methods ensures that owners do not approve operators that are not allowed. */ abstract contract ERC721EnumerableOpensea is ERC721Enumerable, DefaultOperatorFilterer, Ownable { function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"shareholderAddress_","type":"address"},{"internalType":"address","name":"contractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowListIsActive","type":"error"},{"inputs":[],"name":"AllowListIsNotActive","type":"error"},{"inputs":[],"name":"ContractIsNotERC721Enumerable","type":"error"},{"inputs":[],"name":"ExceedsAllowListQuota","type":"error"},{"inputs":[],"name":"ExceedsMaximumSupply","type":"error"},{"inputs":[],"name":"ExceedsMaximumTokensPerTransaction","type":"error"},{"inputs":[],"name":"ExceedsReserveSupply","type":"error"},{"inputs":[],"name":"FunctionInvalidAtThisStage","type":"error"},{"inputs":[],"name":"InvalidMintPassTokenId","type":"error"},{"inputs":[],"name":"InvalidRedemptionQuantity","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"InvalidTokenIdToBurn","type":"error"},{"inputs":[],"name":"MerkleRootNotSet","type":"error"},{"inputs":[],"name":"NotDelegatedOnContract","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotDelegatedOnToken","type":"error"},{"inputs":[],"name":"NotOnAllowList","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotOwnerOfMintPass","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PublicSaleIsNotActive","type":"error"},{"inputs":[],"name":"Tier2TokenIdStartMustBeGreaterThanTier1Supply","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenIdAlreadyClaimed","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"inputs":[],"name":"WrongETHValueSent","type":"error"},{"inputs":[],"name":"ZeroAddressProvided","type":"error"},{"inputs":[],"name":"ZeroQuantityRequested","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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"MerkleRootChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PUBLIC_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PER_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPORT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIER_1_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIER_2_TOKEN_ID_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"availableIdsToClaim","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"availableToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseContractAddress","outputs":[{"internalType":"contract IERC721Enumerable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"getAllowListMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"tokenQuota","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintAllowList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintPassClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintWithMintPass","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"claimer","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"onAllowListA","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"claimer","type":"address"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"onAllowListB","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"claimer","type":"address"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"uint256","name":"c","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"onAllowListC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setAllowListActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setAllowListPreserveBalances","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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenance_","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AnthonyJames.Stages","name":"stage_","type":"uint8"}],"name":"setStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shareholderAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stage","outputs":[{"internalType":"enum AnthonyJames.Stages","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startAllowListStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startMintPassStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicSaleStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startRedeemStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopAllowListStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopMintPassStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopPublicSaleStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopRedeemStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier1Burned","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier1Minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier1Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier2Minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier2Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040526003805460ff60201b191690556012805460ff191690553480156200002857600080fd5b5060405162005578380380620055788339810160408190526200004b9162000438565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280601f81526020017f416e74686f6e79204a616d6573202d20506c61746f6e696320536f6c696473008152506040518060400160405280600c81526020016b414e54484f4e594a414d455360a01b81525060016000819055508160059081620000d691906200051c565b506006620000e582826200051c565b5050506daaeb6d7670e522a718067333cd4e3b156200022d5780156200017b57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200015c57600080fd5b505af115801562000171573d6000803e3d6000fd5b505050506200022d565b6001600160a01b03821615620001cc5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000141565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200021357600080fd5b505af115801562000228573d6000803e3d6000fd5b505050505b506200023b90503362000344565b6200024860003362000396565b620002747fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b3362000396565b6001600160a01b0382166200029c57604051638474420160e01b815260040160405180910390fd5b6040516301ffc9a760e01b815263780e9d6360e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015620002e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200030e9190620005e8565b6200032c5760405163110ef54f60e31b815260040160405180910390fd5b6001600160a01b0391821660a0521660805262000613565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200041b5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b6001600160a01b03811681146200043557600080fd5b50565b600080604083850312156200044c57600080fd5b825162000459816200041f565b60208401519092506200046c816200041f565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620004a257607f821691505b602082108103620004c357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200051757600081815260208120601f850160051c81016020861015620004f25750805b601f850160051c820191505b818110156200051357828155600101620004fe565b5050505b505050565b81516001600160401b0381111562000538576200053862000477565b62000550816200054984546200048d565b84620004c9565b602080601f8311600181146200058857600084156200056f5750858301515b600019600386901b1c1916600185901b17855562000513565b600085815260208120601f198616915b82811015620005b95788860151825594840194600190910190840162000598565b5085821015620005d85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620005fb57600080fd5b815180151581146200060c57600080fd5b9392505050565b60805160a051614f0e6200066a60003960008181610bb6015261187f0152600081816109b8015281816110510152818161111f0152818161138e01528181611431015281816119dd0152611ac60152614f0e6000f3fe6080604052600436106104eb5760003560e01c80635f1ca7011161029457806396ca71cf1161015e578063c87b56dd116100d6578063e985e9c51161008a578063f2fde38b1161006f578063f2fde38b14610de3578063f9afb26a14610e03578063ffe630b514610e2357600080fd5b8063e985e9c514610d85578063f1b541c214610dce57600080fd5b8063d434dae7116100bb578063d434dae714610d3d578063d547741f14610d52578063def449e314610d7257600080fd5b8063c87b56dd14610cfd578063ce3cd99714610d1d57600080fd5b8063aa1b103f1161012d578063bd90b15d11610112578063bd90b15d14610ca2578063c040e6b814610cb7578063c2e6a01214610cde57600080fd5b8063aa1b103f14610c6d578063b88d4fde14610c8257600080fd5b806396ca71cf14610c0f578063a0712d6814610c25578063a217fddf14610c38578063a22cb46514610c4d57600080fd5b8063861ba6f01161020c5780639062dcf9116101c0578063943d40e7116101a5578063943d40e714610ba457806394b059ab14610bd857806395d89b4114610bfa57600080fd5b80639062dcf914610b4957806391d1485414610b5e57600080fd5b80638a616bc0116101f15780638a616bc014610aeb5780638c0e05a514610b0b5780638da5cb5b14610b2b57600080fd5b8063861ba6f014610ab5578063878e7c4a14610ad557600080fd5b806370a08231116102635780637b44b9e7116102485780637b44b9e714610a64578063833b949914610a7957806384584d0714610a9557600080fd5b806370a0823114610a2f578063715018a614610a4f57600080fd5b80635f1ca701146109a6578063627804af146109da5780636352211e146109fa57806365f1309714610a1a57600080fd5b806335ba6bcc116103d5578063473317f91161034d57806358dec3a1116103015780635c03af2a116102e65780635c03af2a1461095c5780635dd903ab146109715780635ea1ef521461098657600080fd5b806358dec3a1146109195780635944c7531461093c57600080fd5b80634f6ccce7116103325780634f6ccce7146108b9578063536e6689146108d957806355f804b3146108f957600080fd5b8063473317f9146108845780634e71d92d146108b157600080fd5b8063418479a6116103a457806342842e0e1161038957806342842e0e1461082d5780634371e6a01461084d578063457dbf211461086257600080fd5b8063418479a6146107eb57806341f434341461080b57600080fd5b806335ba6bcc1461078157806336568abe146107965780633a73c58d146107b65780633ccfd60b146107d657600080fd5b806318160ddd116104685780632a55205a116104375780632f2ff15d1161041c5780632f2ff15d146107205780632f745c59146107405780633358106b1461076057600080fd5b80632a55205a146106cb5780632eb4a7ab1461070a57600080fd5b806318160ddd1461063757806323b872dd1461064c578063248a9ca31461066c578063293a631a1461069d57600080fd5b8063081812fc116104bf578063095ea7b3116104a4578063095ea7b3146105d45780630da45188146105f45780630f7309e81461062257600080fd5b8063081812fc1461057c578063089b820e146105b457600080fd5b8062763d9a146104f057806301ffc9a71461050557806304634d8d1461053a57806306fdde031461055a575b600080fd5b6105036104fe36600461434b565b610e43565b005b34801561051157600080fd5b5061052561052036600461440c565b61122f565b60405190151581526020015b60405180910390f35b34801561054657600080fd5b5061050361055536600461444a565b61124f565b34801561056657600080fd5b5061056f611276565b60405161053191906144cf565b34801561058857600080fd5b5061059c6105973660046144e2565b611308565b6040516001600160a01b039091168152602001610531565b3480156105c057600080fd5b506105036105cf3660046144e2565b61132f565b3480156105e057600080fd5b506105036105ef3660046144fb565b611356565b34801561060057600080fd5b5061061461060f366004614527565b61136a565b604051908152602001610531565b34801561062e57600080fd5b5061056f6114b9565b34801561064357600080fd5b50600d54610614565b34801561065857600080fd5b50610503610667366004614544565b611547565b34801561067857600080fd5b506106146106873660046144e2565b6000908152600160208190526040909120015490565b3480156106a957600080fd5b506016546106b89061ffff1681565b60405161ffff9091168152602001610531565b3480156106d757600080fd5b506106eb6106e6366004614585565b611572565b604080516001600160a01b039093168352602083019190915201610531565b34801561071657600080fd5b5061061460025481565b34801561072c57600080fd5b5061050361073b3660046145a7565b61162d565b34801561074c57600080fd5b5061061461075b3660046144fb565b611653565b34801561076c57600080fd5b506016546106b89062010000900461ffff1681565b34801561078d57600080fd5b506105036116fb565b3480156107a257600080fd5b506105036107b13660046145a7565b611754565b3480156107c257600080fd5b506105036107d13660046145e5565b6117dc565b3480156107e257600080fd5b50610503611811565b3480156107f757600080fd5b50610525610806366004614668565b611922565b34801561081757600080fd5b5061059c6daaeb6d7670e522a718067333cd4e81565b34801561083957600080fd5b50610503610848366004614544565b611973565b34801561085957600080fd5b50610503611998565b34801561086e57600080fd5b5060035461052590640100000000900460ff1681565b34801561089057600080fd5b506108a461089f366004614527565b6119b8565b60405161053191906146b8565b610503611c0d565b3480156108c557600080fd5b506106146108d43660046144e2565b611c28565b3480156108e557600080fd5b506105256108f43660046144e2565b611ccc565b34801561090557600080fd5b506105036109143660046146fc565b611cef565b34801561092557600080fd5b506016546106b890640100000000900461ffff1681565b34801561094857600080fd5b5061050361095736600461476e565b611d14565b34801561096857600080fd5b50610614611d37565b34801561097d57600080fd5b50610503611d5e565b34801561099257600080fd5b506106146109a1366004614527565b611d7e565b3480156109b257600080fd5b5061059c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109e657600080fd5b506105036109f53660046144fb565b611de9565b348015610a0657600080fd5b5061059c610a153660046144e2565b611ea4565b348015610a2657600080fd5b50610614600181565b348015610a3b57600080fd5b50610614610a4a366004614527565b611f09565b348015610a5b57600080fd5b50610503611fa3565b348015610a7057600080fd5b50610503611fb7565b348015610a8557600080fd5b506106146702c68af0bb14000081565b348015610aa157600080fd5b50610503610ab03660046144e2565b611fd7565b348015610ac157600080fd5b50610525610ad03660046147ac565b611ffa565b348015610ae157600080fd5b506106146107d081565b348015610af757600080fd5b50610503610b063660046144e2565b612053565b348015610b1757600080fd5b50610525610b26366004614805565b61207d565b348015610b3757600080fd5b50600f546001600160a01b031661059c565b348015610b5557600080fd5b506105036120de565b348015610b6a57600080fd5b50610525610b793660046145a7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610bb057600080fd5b5061059c7f000000000000000000000000000000000000000000000000000000000000000081565b348015610be457600080fd5b50610614600080516020614eb983398151915281565b348015610c0657600080fd5b5061056f6120fe565b348015610c1b57600080fd5b5061061461042481565b610503610c333660046144e2565b61210d565b348015610c4457600080fd5b50610614600081565b348015610c5957600080fd5b50610503610c68366004614868565b612253565b348015610c7957600080fd5b50610503612267565b348015610c8e57600080fd5b50610503610c9d366004614896565b612289565b348015610cae57600080fd5b506105036122b6565b348015610cc357600080fd5b50601254610cd19060ff1681565b6040516105319190614970565b348015610cea57600080fd5b5060165462010000900461ffff16610614565b348015610d0957600080fd5b5061056f610d183660046144e2565b6122d6565b348015610d2957600080fd5b50610503610d38366004614998565b61233d565b348015610d4957600080fd5b5061050361236c565b348015610d5e57600080fd5b50610503610d6d3660046145a7565b61238c565b610503610d803660046149b9565b6123b2565b348015610d9157600080fd5b50610525610da0366004614a26565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b348015610dda57600080fd5b50610503612652565b348015610def57600080fd5b50610503610dfe366004614527565b612672565b348015610e0f57600080fd5b50610503610e1e366004614a54565b6126ff565b348015610e2f57600080fd5b50610503610e3e3660046146fc565b6128e1565b60018060125460ff166008811115610e5d57610e5d61495a565b14610e7b576040516328992a5560e21b815260040160405180910390fd5b815160165461042490610e9390839061ffff16614acd565b1115610eb257604051638f0c6ebf60e01b815260040160405180910390fd5b600260005403610f095760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055825134610f23826702c68af0bb140000614ae0565b14610f41576040516352a8207f60e11b815260040160405180910390fd5b60005b81811015611218576000858281518110610f6057610f60614af7565b6020026020010151905060003390506103e88210610faa576040517ff7ce3e0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fb382611ccc565b15610fed576040517fa648790500000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b6001600160a01b0388161580159061100e57506001600160a01b0388163314155b15611113576040517faba69cf80000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03808a1660248301527f0000000000000000000000000000000000000000000000000000000000000000166044820152606481018390526d76a84fef008cdabe6409d2fe638b9063aba69cf890608401602060405180830381865afa1580156110b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d79190614b0d565b611110576040517fc72d6de900000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b50865b806001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e846040518263ffffffff1660e01b815260040161116b91815260200190565b602060405180830381865afa158015611188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ac9190614b2a565b6001600160a01b0316146111ef576040517fbe32a28500000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b600882901c60009081526013602052604090208054600160ff85161b1790555050600101610f44565b506112233382612906565b50506001600055505050565b600061123a82612953565b80611249575061124982612991565b92915050565b600080516020614eb98339815191526112678161299c565b61127183836129a6565b505050565b60606005805461128590614b47565b80601f01602080910402602001604051908101604052809291908181526020018280546112b190614b47565b80156112fe5780601f106112d3576101008083540402835291602001916112fe565b820191906000526020600020905b8154815290600101906020018083116112e157829003601f168201915b5050505050905090565b600061131382612aad565b506000908152600960205260409020546001600160a01b031690565b600080516020614eb98339815191526113478161299c565b611352826001612b11565b5050565b8161136081612bda565b6112718383612cc5565b6040516370a0823160e01b81526001600160a01b03828116600483015260009182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156113d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f99190614b81565b90506000805b828110156114b157604051632f745c5960e01b81526001600160a01b0386811660048301526024820183905261149e917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190614b81565b6114a9578160010191505b6001016113ff565b509392505050565b601480546114c690614b47565b80601f01602080910402602001604051908101604052809291908181526020018280546114f290614b47565b801561153f5780601f106115145761010080835404028352916020019161153f565b820191906000526020600020905b81548152906001019060200180831161152257829003601f168201915b505050505081565b826001600160a01b03811633146115615761156133612bda565b61156c848484612df1565b50505050565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916115f15750604080518082019091526010546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611615906bffffffffffffffffffffffff1687614ae0565b61161f9190614bb0565b915196919550909350505050565b600082815260016020819052604090912001546116498161299c565b6112718383612e77565b600061165e83611f09565b82106116d25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f00565b506001600160a01b03919091166000908152600b60209081526040808320938352929052205490565b600080516020614eb98339815191526117138161299c565b6001805b60125460ff16600881111561172e5761172e61495a565b1461174c576040516328992a5560e21b815260040160405180910390fd5b611352612efe565b6001600160a01b03811633146117d25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610f00565b6113528282612f54565b600080516020614eb98339815191526117f48161299c565b6003805464ff000000001916640100000000841515021790555050565b611819612fd7565b60026000540361186b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b600260009081556040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169047908381818185875af1925050503d80600081146118da576040519150601f19603f3d011682016040523d82523d6000602084013e6118df565b606091505b505090508061191a576040517f750b219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600055565b6040516bffffffffffffffffffffffff19606084901b166020820152600090819060340160405160208183030381529060405280519060200120905061196b8360025483613031565b949350505050565b826001600160a01b038116331461198d5761198d33612bda565b61156c848484613047565b600080516020614eb98339815191526119b08161299c565b600380611717565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a489190614b81565b905060008167ffffffffffffffff811115611a6557611a656142e0565b604051908082528060200260200182016040528015611a8e578160200160208202803683370190505b5090506000805b83811015611b7157604051632f745c5960e01b81526001600160a01b038781166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690632f745c5990604401602060405180830381865afa158015611b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b339190614b81565b9050611b3e81611ccc565b611b685780848481518110611b5557611b55614af7565b6020026020010181815250508260010192505b50600101611a95565b5060008167ffffffffffffffff811115611b8d57611b8d6142e0565b604051908082528060200260200182016040528015611bb6578160200160208202803683370190505b50905060005b82811015611c0357838181518110611bd657611bd6614af7565b6020026020010151828281518110611bf057611bf0614af7565b6020908102919091010152600101611bbc565b5095945050505050565b6000611c18336119b8565b9050611c25600082610e43565b50565b6000611c33600d5490565b8210611ca75760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610f00565b600d8281548110611cba57611cba614af7565b90600052602060002001549050919050565b600881901c600090815260136020526040812054600160ff84161b161515611249565b600080516020614eb9833981519152611d078161299c565b601561156c838583614c12565b600080516020614eb9833981519152611d2c8161299c565b61156c848484613062565b601654600090611d559061ffff640100000000820481169116614cd2565b61ffff16905090565b600080516020614eb9833981519152611d768161299c565b600580611717565b6001600160a01b03811660009081526004602090815260408083208151808301909252546001600160e01b038116825263ffffffff600160e01b90910481169282018390526003549192911603611dd6578051611dd9565b60005b6001600160e01b03169392505050565b600080516020614eb9833981519152611e018161299c565b601654829061042490611e1990839061ffff16614acd565b1115611e3857604051638f0c6ebf60e01b815260040160405180910390fd5b600260005403611e8a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055611e998484612906565b505060016000555050565b6000818152600760205260408120546001600160a01b0316806112495760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f00565b60006001600160a01b038216611f875760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610f00565b506001600160a01b031660009081526008602052604090205490565b611fab612fd7565b611fb5600061317a565b565b600080516020614eb9833981519152611fcf8161299c565b600280611717565b600080516020614eb9833981519152611fef8161299c565b611352826000612b11565b6040516bffffffffffffffffffffffff19606085901b16602082015260348101839052600090819060540160405160208183030381529060405280519060200120905061204a8360025483613031565b95945050505050565b600080516020614eb983398151915261206b8161299c565b50600090815260116020526040812055565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018490526054810183905260009081906074016040516020818303038152906040528051906020012090506120d48360025483613031565b9695505050505050565b600080516020614eb98339815191526120f68161299c565b600780611717565b60606006805461128590614b47565b60058060125460ff1660088111156121275761212761495a565b14612145576040516328992a5560e21b815260040160405180910390fd5b60165482906104249061215d90839061ffff16614acd565b111561217c57604051638f0c6ebf60e01b815260040160405180910390fd5b6002600054036121ce5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055600183111561220e576040517fcd194ce000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b346122216702c68af0bb14000085614ae0565b1461223f576040516352a8207f60e11b815260040160405180910390fd5b6122493384612906565b5050600160005550565b8161225d81612bda565b61127183836131cc565b600080516020614eb983398151915261227f8161299c565b611c256000601055565b836001600160a01b03811633146122a3576122a333612bda565b6122af858585856131d7565b5050505050565b600080516020614eb98339815191526122ce8161299c565b600080611717565b60606122e182612aad565b60006122eb61325f565b9050600081511161230b5760405180602001604052806000815250612336565b806123158461326e565b604051602001612326929190614cf4565b6040516020818303038152906040525b9392505050565b612345612fd7565b6012805482919060ff191660018360088111156123645761236461495a565b021790555050565b600080516020614eb98339815191526123848161299c565b600680611717565b600082815260016020819052604090912001546123a88161299c565b6112718383612f54565b60038060125460ff1660088111156123cc576123cc61495a565b146123ea576040516328992a5560e21b815260040160405180910390fd5b60165485906104249061240290839061ffff16614acd565b111561242157604051638f0c6ebf60e01b815260040160405180910390fd5b6002600054036124735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055346124838588614ae0565b146124a1576040516352a8207f60e11b815260040160405180910390fd5b336001600160a01b038816158015906124c357506001600160a01b0388163314155b1561259c576040517f90c9a2d00000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03891660248201523060448201526d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa15801561253f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125639190614b0d565b612599576040517fb4244fa800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50865b60006125a782611d7e565b9050866125b48983614acd565b11156125ec576040517f651884e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125f88288888861207d565b61262e576040517f60cea48b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612638828961336f565b6126423389612906565b5050600160005550505050505050565b600080516020614eb983398151915261266a8161299c565b600480611717565b61267a612fd7565b6001600160a01b0381166126f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f00565b611c258161317a565b60078060125460ff1660088111156127195761271961495a565b14612737576040516328992a5560e21b815260040160405180910390fd5b6002600054036127895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b60026000819055829081148061279f5750806005145b6127d5576040517f8cec2fe600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561289c5760008585838181106127f4576127f4614af7565b905060200201359050610424811061283b576040517f010c075b00000000000000000000000000000000000000000000000000000000815260048101829052602401610f00565b612846335b82613459565b61287c576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612885816134d7565b6000908152601160205260408120556001016127d8565b5080601660048282829054906101000a900461ffff166128bc9190614d23565b92506101000a81548161ffff021916908361ffff160217905550611e9933600161357e565b600080516020614eb98339815191526128f98161299c565b601461156c838583614c12565b60165461ffff166129178282614acd565b6016805461ffff191661ffff9290921691909117905560005b8281101561156c5761294b846129468385614acd565b6135f2565b600101612930565b60006001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000148061124957506112498261360c565b60006112498261367e565b611c2581336136bc565b6127106bffffffffffffffffffffffff82161115612a195760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f00565b6001600160a01b038216612a6f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f00565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217601055565b6000818152600760205260409020546001600160a01b0316611c255760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f00565b600354640100000000900460ff1615612b56576040517fc2ef408100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282905580612b9b576003805460019190600090612b7c90849063ffffffff16614d3e565b92506101000a81548163ffffffff021916908363ffffffff1602179055505b7f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c600254604051612bce91815260200190565b60405180910390a15050565b6daaeb6d7670e522a718067333cd4e3b15611c25576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c849190614b0d565b611c25576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610f00565b6000612cd082611ea4565b9050806001600160a01b0316836001600160a01b031603612d595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610f00565b336001600160a01b0382161480612d755750612d758133610da0565b612de75760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610f00565b611271838361373c565b612dfa33612840565b612e6c5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610f00565b6112718383836137aa565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166113525760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60125460ff166008811115612f1557612f1561495a565b612f20906001614acd565b6008811115612f3157612f3161495a565b6012805460ff19166001836008811115612f4d57612f4d61495a565b0217905550565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156113525760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600f546001600160a01b03163314611fb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f00565b60008261303e8584613982565b14949350505050565b61127183838360405180602001604052806000815250612289565b6127106bffffffffffffffffffffffff821611156130d55760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f00565b6001600160a01b03821661312b5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f00565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752601190529190942093519051909116600160a01b029116179055565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113523383836139c7565b6131e13383613459565b6132535760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610f00565b61156c84848484613a95565b60606015805461128590614b47565b6060816000036132955750506040805180820190915260018152600360fc1b602082015290565b8160005b81156132bf57806132a981614d5b565b91506132b89050600a83614bb0565b9150613299565b60008167ffffffffffffffff8111156132da576132da6142e0565b6040519080825280601f01601f191660200182016040528015613304576020820181803683370190505b5090505b841561196b57613319600183614d74565b9150613326600a86614d87565b613331906030614acd565b60f81b81838151811061334657613346614af7565b60200101906001600160f81b031916908160001a905350613368600a86614bb0565b9450613308565b6001600160a01b0382166000908152600460205260409020805460035463ffffffff908116600160e01b90920416146133cf576003546001600160e01b031963ffffffff909116600160e01b02166001600160e01b038316178155613411565b8054829082906000906133ec9084906001600160e01b0316614d9b565b92506101000a8154816001600160e01b0302191690836001600160e01b031602179055505b826001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8360405161344c91815260200190565b60405180910390a2505050565b60008061346583611ea4565b9050806001600160a01b0316846001600160a01b031614806134ac57506001600160a01b038082166000908152600a602090815260408083209388168352929052205460ff165b8061196b5750836001600160a01b03166134c584611308565b6001600160a01b031614949350505050565b60006134e282611ea4565b90506134f081600084613b13565b6134fb60008361373c565b6001600160a01b0381166000908152600860205260408120805460019290613524908490614d74565b909155505060008281526007602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60165460009061359a9062010000900461ffff166107d0614acd565b6016549091506135b590839062010000900461ffff16614acd565b601660026101000a81548161ffff021916908361ffff16021790555060005b8281101561156c576135ea846129468385614acd565b6001016135d4565b611352828260405180602001604052806000815250613bcb565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061366f57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80611249575061124982613c49565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480611249575061124982612953565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16611352576136fa816001600160a01b03166014613cb0565b613705836020613cb0565b604051602001613716929190614dbb565b60408051601f198184030181529082905262461bcd60e51b8252610f00916004016144cf565b600081815260096020526040902080546001600160a01b0319166001600160a01b038416908117909155819061377182611ea4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b03166137bd82611ea4565b6001600160a01b0316146138395760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f00565b6001600160a01b0382166138b45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f00565b6138bf838383613b13565b6138ca60008261373c565b6001600160a01b03831660009081526008602052604081208054600192906138f3908490614d74565b90915550506001600160a01b0382166000908152600860205260408120805460019290613921908490614acd565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b84518110156114b1576139b3828683815181106139a6576139a6614af7565b6020026020010151613e75565b9150806139bf81614d5b565b915050613987565b816001600160a01b0316836001600160a01b031603613a285760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f00565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613aa08484846137aa565b613aac84848484613ea4565b61156c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b6001600160a01b038316613b6e57613b6981600d80546000838152600e60205260408120829055600182018355919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155565b613b91565b816001600160a01b0316836001600160a01b031614613b9157613b918382613fed565b6001600160a01b038216613ba8576112718161408a565b826001600160a01b0316826001600160a01b031614611271576112718282614139565b613bd5838361417d565b613be26000848484613ea4565b6112715760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061124957507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614611249565b60606000613cbf836002614ae0565b613cca906002614acd565b67ffffffffffffffff811115613ce257613ce26142e0565b6040519080825280601f01601f191660200182016040528015613d0c576020820181803683370190505b509050600360fc1b81600081518110613d2757613d27614af7565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613d7257613d72614af7565b60200101906001600160f81b031916908160001a9053506000613d96846002614ae0565b613da1906001614acd565b90505b6001811115613e26577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613de257613de2614af7565b1a60f81b828281518110613df857613df8614af7565b60200101906001600160f81b031916908160001a90535060049490941c93613e1f81614e3c565b9050613da4565b5083156123365760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f00565b6000818310613e91576000828152602084905260409020612336565b6000838152602083905260409020612336565b60006001600160a01b0384163b15613fe557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613ee8903390899088908890600401614e53565b6020604051808303816000875af1925050508015613f23575060408051601f3d908101601f19168201909252613f2091810190614e85565b60015b613fcb573d808015613f51576040519150601f19603f3d011682016040523d82523d6000602084013e613f56565b606091505b508051600003613fc35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061196b565b50600161196b565b60006001613ffa84611f09565b6140049190614d74565b6000838152600c6020526040902054909150808214614057576001600160a01b0384166000908152600b602090815260408083208584528252808320548484528184208190558352600c90915290208190555b506000918252600c602090815260408084208490556001600160a01b039094168352600b81528383209183525290812055565b600d5460009061409c90600190614d74565b6000838152600e6020526040812054600d80549394509092849081106140c4576140c4614af7565b9060005260206000200154905080600d83815481106140e5576140e5614af7565b6000918252602080832090910192909255828152600e9091526040808220849055858252812055600d80548061411d5761411d614ea2565b6001900381819060005260206000200160009055905550505050565b600061414483611f09565b6001600160a01b039093166000908152600b602090815260408083208684528252808320859055938252600c9052919091209190915550565b6001600160a01b0382166141d35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f00565b6000818152600760205260409020546001600160a01b0316156142385760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f00565b61424460008383613b13565b6001600160a01b038216600090815260086020526040812080546001929061426d908490614acd565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0381168114611c2557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561431f5761431f6142e0565b604052919050565b600067ffffffffffffffff821115614341576143416142e0565b5060051b60200190565b6000806040838503121561435e57600080fd5b8235614369816142cb565b915060208381013567ffffffffffffffff81111561438657600080fd5b8401601f8101861361439757600080fd5b80356143aa6143a582614327565b6142f6565b81815260059190911b820183019083810190888311156143c957600080fd5b928401925b828410156143e7578335825292840192908401906143ce565b80955050505050509250929050565b6001600160e01b031981168114611c2557600080fd5b60006020828403121561441e57600080fd5b8135612336816143f6565b80356bffffffffffffffffffffffff8116811461444557600080fd5b919050565b6000806040838503121561445d57600080fd5b8235614468816142cb565b915061447660208401614429565b90509250929050565b60005b8381101561449a578181015183820152602001614482565b50506000910152565b600081518084526144bb81602086016020860161447f565b601f01601f19169290920160200192915050565b60208152600061233660208301846144a3565b6000602082840312156144f457600080fd5b5035919050565b6000806040838503121561450e57600080fd5b8235614519816142cb565b946020939093013593505050565b60006020828403121561453957600080fd5b8135612336816142cb565b60008060006060848603121561455957600080fd5b8335614564816142cb565b92506020840135614574816142cb565b929592945050506040919091013590565b6000806040838503121561459857600080fd5b50508035926020909101359150565b600080604083850312156145ba57600080fd5b8235915060208301356145cc816142cb565b809150509250929050565b8015158114611c2557600080fd5b6000602082840312156145f757600080fd5b8135612336816145d7565b600082601f83011261461357600080fd5b813560206146236143a583614327565b82815260059290921b8401810191818101908684111561464257600080fd5b8286015b8481101561465d5780358352918301918301614646565b509695505050505050565b6000806040838503121561467b57600080fd5b8235614686816142cb565b9150602083013567ffffffffffffffff8111156146a257600080fd5b6146ae85828601614602565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156146f0578351835292840192918401916001016146d4565b50909695505050505050565b6000806020838503121561470f57600080fd5b823567ffffffffffffffff8082111561472757600080fd5b818501915085601f83011261473b57600080fd5b81358181111561474a57600080fd5b86602082850101111561475c57600080fd5b60209290920196919550909350505050565b60008060006060848603121561478357600080fd5b833592506020840135614795816142cb565b91506147a360408501614429565b90509250925092565b6000806000606084860312156147c157600080fd5b83356147cc816142cb565b925060208401359150604084013567ffffffffffffffff8111156147ef57600080fd5b6147fb86828701614602565b9150509250925092565b6000806000806080858703121561481b57600080fd5b8435614826816142cb565b93506020850135925060408501359150606085013567ffffffffffffffff81111561485057600080fd5b61485c87828801614602565b91505092959194509250565b6000806040838503121561487b57600080fd5b8235614886816142cb565b915060208301356145cc816145d7565b600080600080608085870312156148ac57600080fd5b84356148b7816142cb565b93506020858101356148c8816142cb565b935060408601359250606086013567ffffffffffffffff808211156148ec57600080fd5b818801915088601f83011261490057600080fd5b813581811115614912576149126142e0565b614924601f8201601f191685016142f6565b9150808252898482850101111561493a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b634e487b7160e01b600052602160045260246000fd5b602081016009831061499257634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156149aa57600080fd5b81356009811061233657600080fd5b600080600080600060a086880312156149d157600080fd5b85356149dc816142cb565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff811115614a0d57600080fd5b614a1988828901614602565b9150509295509295909350565b60008060408385031215614a3957600080fd5b8235614a44816142cb565b915060208301356145cc816142cb565b60008060208385031215614a6757600080fd5b823567ffffffffffffffff80821115614a7f57600080fd5b818501915085601f830112614a9357600080fd5b813581811115614aa257600080fd5b8660208260051b850101111561475c57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561124957611249614ab7565b808202811582820484141761124957611249614ab7565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614b1f57600080fd5b8151612336816145d7565b600060208284031215614b3c57600080fd5b8151612336816142cb565b600181811c90821680614b5b57607f821691505b602082108103614b7b57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215614b9357600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082614bbf57614bbf614b9a565b500490565b601f82111561127157600081815260208120601f850160051c81016020861015614beb5750805b601f850160051c820191505b81811015614c0a57828155600101614bf7565b505050505050565b67ffffffffffffffff831115614c2a57614c2a6142e0565b614c3e83614c388354614b47565b83614bc4565b6000601f841160018114614c725760008515614c5a5750838201355b600019600387901b1c1916600186901b1783556122af565b600083815260209020601f19861690835b82811015614ca35786850135825560209485019460019092019101614c83565b5086821015614cc05760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b61ffff828116828216039080821115614ced57614ced614ab7565b5092915050565b60008351614d0681846020880161447f565b835190830190614d1a81836020880161447f565b01949350505050565b61ffff818116838216019080821115614ced57614ced614ab7565b63ffffffff818116838216019080821115614ced57614ced614ab7565b600060018201614d6d57614d6d614ab7565b5060010190565b8181038181111561124957611249614ab7565b600082614d9657614d96614b9a565b500690565b6001600160e01b03818116838216019080821115614ced57614ced614ab7565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614df381601785016020880161447f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614e3081602884016020880161447f565b01602801949350505050565b600081614e4b57614e4b614ab7565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526120d460808301846144a3565b600060208284031215614e9757600080fd5b8151612336816143f6565b634e487b7160e01b600052603160045260246000fdfed8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663ba2646970667358221220b35b7dd4cc5cfd760c6433f2c8df451747108df6ea0299d2681e1c1bf189742864736f6c6343000812003300000000000000000000000092718eebc387b9e6038d152df1307b9131d39a580000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd42
Deployed Bytecode
0x6080604052600436106104eb5760003560e01c80635f1ca7011161029457806396ca71cf1161015e578063c87b56dd116100d6578063e985e9c51161008a578063f2fde38b1161006f578063f2fde38b14610de3578063f9afb26a14610e03578063ffe630b514610e2357600080fd5b8063e985e9c514610d85578063f1b541c214610dce57600080fd5b8063d434dae7116100bb578063d434dae714610d3d578063d547741f14610d52578063def449e314610d7257600080fd5b8063c87b56dd14610cfd578063ce3cd99714610d1d57600080fd5b8063aa1b103f1161012d578063bd90b15d11610112578063bd90b15d14610ca2578063c040e6b814610cb7578063c2e6a01214610cde57600080fd5b8063aa1b103f14610c6d578063b88d4fde14610c8257600080fd5b806396ca71cf14610c0f578063a0712d6814610c25578063a217fddf14610c38578063a22cb46514610c4d57600080fd5b8063861ba6f01161020c5780639062dcf9116101c0578063943d40e7116101a5578063943d40e714610ba457806394b059ab14610bd857806395d89b4114610bfa57600080fd5b80639062dcf914610b4957806391d1485414610b5e57600080fd5b80638a616bc0116101f15780638a616bc014610aeb5780638c0e05a514610b0b5780638da5cb5b14610b2b57600080fd5b8063861ba6f014610ab5578063878e7c4a14610ad557600080fd5b806370a08231116102635780637b44b9e7116102485780637b44b9e714610a64578063833b949914610a7957806384584d0714610a9557600080fd5b806370a0823114610a2f578063715018a614610a4f57600080fd5b80635f1ca701146109a6578063627804af146109da5780636352211e146109fa57806365f1309714610a1a57600080fd5b806335ba6bcc116103d5578063473317f91161034d57806358dec3a1116103015780635c03af2a116102e65780635c03af2a1461095c5780635dd903ab146109715780635ea1ef521461098657600080fd5b806358dec3a1146109195780635944c7531461093c57600080fd5b80634f6ccce7116103325780634f6ccce7146108b9578063536e6689146108d957806355f804b3146108f957600080fd5b8063473317f9146108845780634e71d92d146108b157600080fd5b8063418479a6116103a457806342842e0e1161038957806342842e0e1461082d5780634371e6a01461084d578063457dbf211461086257600080fd5b8063418479a6146107eb57806341f434341461080b57600080fd5b806335ba6bcc1461078157806336568abe146107965780633a73c58d146107b65780633ccfd60b146107d657600080fd5b806318160ddd116104685780632a55205a116104375780632f2ff15d1161041c5780632f2ff15d146107205780632f745c59146107405780633358106b1461076057600080fd5b80632a55205a146106cb5780632eb4a7ab1461070a57600080fd5b806318160ddd1461063757806323b872dd1461064c578063248a9ca31461066c578063293a631a1461069d57600080fd5b8063081812fc116104bf578063095ea7b3116104a4578063095ea7b3146105d45780630da45188146105f45780630f7309e81461062257600080fd5b8063081812fc1461057c578063089b820e146105b457600080fd5b8062763d9a146104f057806301ffc9a71461050557806304634d8d1461053a57806306fdde031461055a575b600080fd5b6105036104fe36600461434b565b610e43565b005b34801561051157600080fd5b5061052561052036600461440c565b61122f565b60405190151581526020015b60405180910390f35b34801561054657600080fd5b5061050361055536600461444a565b61124f565b34801561056657600080fd5b5061056f611276565b60405161053191906144cf565b34801561058857600080fd5b5061059c6105973660046144e2565b611308565b6040516001600160a01b039091168152602001610531565b3480156105c057600080fd5b506105036105cf3660046144e2565b61132f565b3480156105e057600080fd5b506105036105ef3660046144fb565b611356565b34801561060057600080fd5b5061061461060f366004614527565b61136a565b604051908152602001610531565b34801561062e57600080fd5b5061056f6114b9565b34801561064357600080fd5b50600d54610614565b34801561065857600080fd5b50610503610667366004614544565b611547565b34801561067857600080fd5b506106146106873660046144e2565b6000908152600160208190526040909120015490565b3480156106a957600080fd5b506016546106b89061ffff1681565b60405161ffff9091168152602001610531565b3480156106d757600080fd5b506106eb6106e6366004614585565b611572565b604080516001600160a01b039093168352602083019190915201610531565b34801561071657600080fd5b5061061460025481565b34801561072c57600080fd5b5061050361073b3660046145a7565b61162d565b34801561074c57600080fd5b5061061461075b3660046144fb565b611653565b34801561076c57600080fd5b506016546106b89062010000900461ffff1681565b34801561078d57600080fd5b506105036116fb565b3480156107a257600080fd5b506105036107b13660046145a7565b611754565b3480156107c257600080fd5b506105036107d13660046145e5565b6117dc565b3480156107e257600080fd5b50610503611811565b3480156107f757600080fd5b50610525610806366004614668565b611922565b34801561081757600080fd5b5061059c6daaeb6d7670e522a718067333cd4e81565b34801561083957600080fd5b50610503610848366004614544565b611973565b34801561085957600080fd5b50610503611998565b34801561086e57600080fd5b5060035461052590640100000000900460ff1681565b34801561089057600080fd5b506108a461089f366004614527565b6119b8565b60405161053191906146b8565b610503611c0d565b3480156108c557600080fd5b506106146108d43660046144e2565b611c28565b3480156108e557600080fd5b506105256108f43660046144e2565b611ccc565b34801561090557600080fd5b506105036109143660046146fc565b611cef565b34801561092557600080fd5b506016546106b890640100000000900461ffff1681565b34801561094857600080fd5b5061050361095736600461476e565b611d14565b34801561096857600080fd5b50610614611d37565b34801561097d57600080fd5b50610503611d5e565b34801561099257600080fd5b506106146109a1366004614527565b611d7e565b3480156109b257600080fd5b5061059c7f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd4281565b3480156109e657600080fd5b506105036109f53660046144fb565b611de9565b348015610a0657600080fd5b5061059c610a153660046144e2565b611ea4565b348015610a2657600080fd5b50610614600181565b348015610a3b57600080fd5b50610614610a4a366004614527565b611f09565b348015610a5b57600080fd5b50610503611fa3565b348015610a7057600080fd5b50610503611fb7565b348015610a8557600080fd5b506106146702c68af0bb14000081565b348015610aa157600080fd5b50610503610ab03660046144e2565b611fd7565b348015610ac157600080fd5b50610525610ad03660046147ac565b611ffa565b348015610ae157600080fd5b506106146107d081565b348015610af757600080fd5b50610503610b063660046144e2565b612053565b348015610b1757600080fd5b50610525610b26366004614805565b61207d565b348015610b3757600080fd5b50600f546001600160a01b031661059c565b348015610b5557600080fd5b506105036120de565b348015610b6a57600080fd5b50610525610b793660046145a7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610bb057600080fd5b5061059c7f00000000000000000000000092718eebc387b9e6038d152df1307b9131d39a5881565b348015610be457600080fd5b50610614600080516020614eb983398151915281565b348015610c0657600080fd5b5061056f6120fe565b348015610c1b57600080fd5b5061061461042481565b610503610c333660046144e2565b61210d565b348015610c4457600080fd5b50610614600081565b348015610c5957600080fd5b50610503610c68366004614868565b612253565b348015610c7957600080fd5b50610503612267565b348015610c8e57600080fd5b50610503610c9d366004614896565b612289565b348015610cae57600080fd5b506105036122b6565b348015610cc357600080fd5b50601254610cd19060ff1681565b6040516105319190614970565b348015610cea57600080fd5b5060165462010000900461ffff16610614565b348015610d0957600080fd5b5061056f610d183660046144e2565b6122d6565b348015610d2957600080fd5b50610503610d38366004614998565b61233d565b348015610d4957600080fd5b5061050361236c565b348015610d5e57600080fd5b50610503610d6d3660046145a7565b61238c565b610503610d803660046149b9565b6123b2565b348015610d9157600080fd5b50610525610da0366004614a26565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b348015610dda57600080fd5b50610503612652565b348015610def57600080fd5b50610503610dfe366004614527565b612672565b348015610e0f57600080fd5b50610503610e1e366004614a54565b6126ff565b348015610e2f57600080fd5b50610503610e3e3660046146fc565b6128e1565b60018060125460ff166008811115610e5d57610e5d61495a565b14610e7b576040516328992a5560e21b815260040160405180910390fd5b815160165461042490610e9390839061ffff16614acd565b1115610eb257604051638f0c6ebf60e01b815260040160405180910390fd5b600260005403610f095760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055825134610f23826702c68af0bb140000614ae0565b14610f41576040516352a8207f60e11b815260040160405180910390fd5b60005b81811015611218576000858281518110610f6057610f60614af7565b6020026020010151905060003390506103e88210610faa576040517ff7ce3e0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fb382611ccc565b15610fed576040517fa648790500000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b6001600160a01b0388161580159061100e57506001600160a01b0388163314155b15611113576040517faba69cf80000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03808a1660248301527f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd42166044820152606481018390526d76a84fef008cdabe6409d2fe638b9063aba69cf890608401602060405180830381865afa1580156110b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d79190614b0d565b611110576040517fc72d6de900000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b50865b806001600160a01b03167f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd426001600160a01b0316636352211e846040518263ffffffff1660e01b815260040161116b91815260200190565b602060405180830381865afa158015611188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ac9190614b2a565b6001600160a01b0316146111ef576040517fbe32a28500000000000000000000000000000000000000000000000000000000815260048101839052602401610f00565b600882901c60009081526013602052604090208054600160ff85161b1790555050600101610f44565b506112233382612906565b50506001600055505050565b600061123a82612953565b80611249575061124982612991565b92915050565b600080516020614eb98339815191526112678161299c565b61127183836129a6565b505050565b60606005805461128590614b47565b80601f01602080910402602001604051908101604052809291908181526020018280546112b190614b47565b80156112fe5780601f106112d3576101008083540402835291602001916112fe565b820191906000526020600020905b8154815290600101906020018083116112e157829003601f168201915b5050505050905090565b600061131382612aad565b506000908152600960205260409020546001600160a01b031690565b600080516020614eb98339815191526113478161299c565b611352826001612b11565b5050565b8161136081612bda565b6112718383612cc5565b6040516370a0823160e01b81526001600160a01b03828116600483015260009182917f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd4216906370a0823190602401602060405180830381865afa1580156113d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f99190614b81565b90506000805b828110156114b157604051632f745c5960e01b81526001600160a01b0386811660048301526024820183905261149e917f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd4290911690632f745c5990604401602060405180830381865afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190614b81565b6114a9578160010191505b6001016113ff565b509392505050565b601480546114c690614b47565b80601f01602080910402602001604051908101604052809291908181526020018280546114f290614b47565b801561153f5780601f106115145761010080835404028352916020019161153f565b820191906000526020600020905b81548152906001019060200180831161152257829003601f168201915b505050505081565b826001600160a01b03811633146115615761156133612bda565b61156c848484612df1565b50505050565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916115f15750604080518082019091526010546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611615906bffffffffffffffffffffffff1687614ae0565b61161f9190614bb0565b915196919550909350505050565b600082815260016020819052604090912001546116498161299c565b6112718383612e77565b600061165e83611f09565b82106116d25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f00565b506001600160a01b03919091166000908152600b60209081526040808320938352929052205490565b600080516020614eb98339815191526117138161299c565b6001805b60125460ff16600881111561172e5761172e61495a565b1461174c576040516328992a5560e21b815260040160405180910390fd5b611352612efe565b6001600160a01b03811633146117d25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610f00565b6113528282612f54565b600080516020614eb98339815191526117f48161299c565b6003805464ff000000001916640100000000841515021790555050565b611819612fd7565b60026000540361186b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b600260009081556040516001600160a01b037f00000000000000000000000092718eebc387b9e6038d152df1307b9131d39a58169047908381818185875af1925050503d80600081146118da576040519150601f19603f3d011682016040523d82523d6000602084013e6118df565b606091505b505090508061191a576040517f750b219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600055565b6040516bffffffffffffffffffffffff19606084901b166020820152600090819060340160405160208183030381529060405280519060200120905061196b8360025483613031565b949350505050565b826001600160a01b038116331461198d5761198d33612bda565b61156c848484613047565b600080516020614eb98339815191526119b08161299c565b600380611717565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd4216906370a0823190602401602060405180830381865afa158015611a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a489190614b81565b905060008167ffffffffffffffff811115611a6557611a656142e0565b604051908082528060200260200182016040528015611a8e578160200160208202803683370190505b5090506000805b83811015611b7157604051632f745c5960e01b81526001600160a01b038781166004830152602482018390526000917f0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd4290911690632f745c5990604401602060405180830381865afa158015611b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b339190614b81565b9050611b3e81611ccc565b611b685780848481518110611b5557611b55614af7565b6020026020010181815250508260010192505b50600101611a95565b5060008167ffffffffffffffff811115611b8d57611b8d6142e0565b604051908082528060200260200182016040528015611bb6578160200160208202803683370190505b50905060005b82811015611c0357838181518110611bd657611bd6614af7565b6020026020010151828281518110611bf057611bf0614af7565b6020908102919091010152600101611bbc565b5095945050505050565b6000611c18336119b8565b9050611c25600082610e43565b50565b6000611c33600d5490565b8210611ca75760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610f00565b600d8281548110611cba57611cba614af7565b90600052602060002001549050919050565b600881901c600090815260136020526040812054600160ff84161b161515611249565b600080516020614eb9833981519152611d078161299c565b601561156c838583614c12565b600080516020614eb9833981519152611d2c8161299c565b61156c848484613062565b601654600090611d559061ffff640100000000820481169116614cd2565b61ffff16905090565b600080516020614eb9833981519152611d768161299c565b600580611717565b6001600160a01b03811660009081526004602090815260408083208151808301909252546001600160e01b038116825263ffffffff600160e01b90910481169282018390526003549192911603611dd6578051611dd9565b60005b6001600160e01b03169392505050565b600080516020614eb9833981519152611e018161299c565b601654829061042490611e1990839061ffff16614acd565b1115611e3857604051638f0c6ebf60e01b815260040160405180910390fd5b600260005403611e8a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055611e998484612906565b505060016000555050565b6000818152600760205260408120546001600160a01b0316806112495760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f00565b60006001600160a01b038216611f875760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610f00565b506001600160a01b031660009081526008602052604090205490565b611fab612fd7565b611fb5600061317a565b565b600080516020614eb9833981519152611fcf8161299c565b600280611717565b600080516020614eb9833981519152611fef8161299c565b611352826000612b11565b6040516bffffffffffffffffffffffff19606085901b16602082015260348101839052600090819060540160405160208183030381529060405280519060200120905061204a8360025483613031565b95945050505050565b600080516020614eb983398151915261206b8161299c565b50600090815260116020526040812055565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018490526054810183905260009081906074016040516020818303038152906040528051906020012090506120d48360025483613031565b9695505050505050565b600080516020614eb98339815191526120f68161299c565b600780611717565b60606006805461128590614b47565b60058060125460ff1660088111156121275761212761495a565b14612145576040516328992a5560e21b815260040160405180910390fd5b60165482906104249061215d90839061ffff16614acd565b111561217c57604051638f0c6ebf60e01b815260040160405180910390fd5b6002600054036121ce5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055600183111561220e576040517fcd194ce000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b346122216702c68af0bb14000085614ae0565b1461223f576040516352a8207f60e11b815260040160405180910390fd5b6122493384612906565b5050600160005550565b8161225d81612bda565b61127183836131cc565b600080516020614eb983398151915261227f8161299c565b611c256000601055565b836001600160a01b03811633146122a3576122a333612bda565b6122af858585856131d7565b5050505050565b600080516020614eb98339815191526122ce8161299c565b600080611717565b60606122e182612aad565b60006122eb61325f565b9050600081511161230b5760405180602001604052806000815250612336565b806123158461326e565b604051602001612326929190614cf4565b6040516020818303038152906040525b9392505050565b612345612fd7565b6012805482919060ff191660018360088111156123645761236461495a565b021790555050565b600080516020614eb98339815191526123848161299c565b600680611717565b600082815260016020819052604090912001546123a88161299c565b6112718383612f54565b60038060125460ff1660088111156123cc576123cc61495a565b146123ea576040516328992a5560e21b815260040160405180910390fd5b60165485906104249061240290839061ffff16614acd565b111561242157604051638f0c6ebf60e01b815260040160405180910390fd5b6002600054036124735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b6002600055346124838588614ae0565b146124a1576040516352a8207f60e11b815260040160405180910390fd5b336001600160a01b038816158015906124c357506001600160a01b0388163314155b1561259c576040517f90c9a2d00000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03891660248201523060448201526d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa15801561253f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125639190614b0d565b612599576040517fb4244fa800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50865b60006125a782611d7e565b9050866125b48983614acd565b11156125ec576040517f651884e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125f88288888861207d565b61262e576040517f60cea48b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612638828961336f565b6126423389612906565b5050600160005550505050505050565b600080516020614eb983398151915261266a8161299c565b600480611717565b61267a612fd7565b6001600160a01b0381166126f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f00565b611c258161317a565b60078060125460ff1660088111156127195761271961495a565b14612737576040516328992a5560e21b815260040160405180910390fd5b6002600054036127895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f00565b60026000819055829081148061279f5750806005145b6127d5576040517f8cec2fe600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561289c5760008585838181106127f4576127f4614af7565b905060200201359050610424811061283b576040517f010c075b00000000000000000000000000000000000000000000000000000000815260048101829052602401610f00565b612846335b82613459565b61287c576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612885816134d7565b6000908152601160205260408120556001016127d8565b5080601660048282829054906101000a900461ffff166128bc9190614d23565b92506101000a81548161ffff021916908361ffff160217905550611e9933600161357e565b600080516020614eb98339815191526128f98161299c565b601461156c838583614c12565b60165461ffff166129178282614acd565b6016805461ffff191661ffff9290921691909117905560005b8281101561156c5761294b846129468385614acd565b6135f2565b600101612930565b60006001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000148061124957506112498261360c565b60006112498261367e565b611c2581336136bc565b6127106bffffffffffffffffffffffff82161115612a195760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f00565b6001600160a01b038216612a6f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f00565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217601055565b6000818152600760205260409020546001600160a01b0316611c255760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610f00565b600354640100000000900460ff1615612b56576040517fc2ef408100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282905580612b9b576003805460019190600090612b7c90849063ffffffff16614d3e565b92506101000a81548163ffffffff021916908363ffffffff1602179055505b7f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c600254604051612bce91815260200190565b60405180910390a15050565b6daaeb6d7670e522a718067333cd4e3b15611c25576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c849190614b0d565b611c25576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610f00565b6000612cd082611ea4565b9050806001600160a01b0316836001600160a01b031603612d595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610f00565b336001600160a01b0382161480612d755750612d758133610da0565b612de75760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610f00565b611271838361373c565b612dfa33612840565b612e6c5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610f00565b6112718383836137aa565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166113525760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60125460ff166008811115612f1557612f1561495a565b612f20906001614acd565b6008811115612f3157612f3161495a565b6012805460ff19166001836008811115612f4d57612f4d61495a565b0217905550565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156113525760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600f546001600160a01b03163314611fb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f00565b60008261303e8584613982565b14949350505050565b61127183838360405180602001604052806000815250612289565b6127106bffffffffffffffffffffffff821611156130d55760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f00565b6001600160a01b03821661312b5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f00565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752601190529190942093519051909116600160a01b029116179055565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113523383836139c7565b6131e13383613459565b6132535760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610f00565b61156c84848484613a95565b60606015805461128590614b47565b6060816000036132955750506040805180820190915260018152600360fc1b602082015290565b8160005b81156132bf57806132a981614d5b565b91506132b89050600a83614bb0565b9150613299565b60008167ffffffffffffffff8111156132da576132da6142e0565b6040519080825280601f01601f191660200182016040528015613304576020820181803683370190505b5090505b841561196b57613319600183614d74565b9150613326600a86614d87565b613331906030614acd565b60f81b81838151811061334657613346614af7565b60200101906001600160f81b031916908160001a905350613368600a86614bb0565b9450613308565b6001600160a01b0382166000908152600460205260409020805460035463ffffffff908116600160e01b90920416146133cf576003546001600160e01b031963ffffffff909116600160e01b02166001600160e01b038316178155613411565b8054829082906000906133ec9084906001600160e01b0316614d9b565b92506101000a8154816001600160e01b0302191690836001600160e01b031602179055505b826001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8360405161344c91815260200190565b60405180910390a2505050565b60008061346583611ea4565b9050806001600160a01b0316846001600160a01b031614806134ac57506001600160a01b038082166000908152600a602090815260408083209388168352929052205460ff165b8061196b5750836001600160a01b03166134c584611308565b6001600160a01b031614949350505050565b60006134e282611ea4565b90506134f081600084613b13565b6134fb60008361373c565b6001600160a01b0381166000908152600860205260408120805460019290613524908490614d74565b909155505060008281526007602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60165460009061359a9062010000900461ffff166107d0614acd565b6016549091506135b590839062010000900461ffff16614acd565b601660026101000a81548161ffff021916908361ffff16021790555060005b8281101561156c576135ea846129468385614acd565b6001016135d4565b611352828260405180602001604052806000815250613bcb565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061366f57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80611249575061124982613c49565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480611249575061124982612953565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16611352576136fa816001600160a01b03166014613cb0565b613705836020613cb0565b604051602001613716929190614dbb565b60408051601f198184030181529082905262461bcd60e51b8252610f00916004016144cf565b600081815260096020526040902080546001600160a01b0319166001600160a01b038416908117909155819061377182611ea4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b03166137bd82611ea4565b6001600160a01b0316146138395760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610f00565b6001600160a01b0382166138b45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f00565b6138bf838383613b13565b6138ca60008261373c565b6001600160a01b03831660009081526008602052604081208054600192906138f3908490614d74565b90915550506001600160a01b0382166000908152600860205260408120805460019290613921908490614acd565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b84518110156114b1576139b3828683815181106139a6576139a6614af7565b6020026020010151613e75565b9150806139bf81614d5b565b915050613987565b816001600160a01b0316836001600160a01b031603613a285760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f00565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613aa08484846137aa565b613aac84848484613ea4565b61156c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b6001600160a01b038316613b6e57613b6981600d80546000838152600e60205260408120829055600182018355919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155565b613b91565b816001600160a01b0316836001600160a01b031614613b9157613b918382613fed565b6001600160a01b038216613ba8576112718161408a565b826001600160a01b0316826001600160a01b031614611271576112718282614139565b613bd5838361417d565b613be26000848484613ea4565b6112715760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061124957507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614611249565b60606000613cbf836002614ae0565b613cca906002614acd565b67ffffffffffffffff811115613ce257613ce26142e0565b6040519080825280601f01601f191660200182016040528015613d0c576020820181803683370190505b509050600360fc1b81600081518110613d2757613d27614af7565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613d7257613d72614af7565b60200101906001600160f81b031916908160001a9053506000613d96846002614ae0565b613da1906001614acd565b90505b6001811115613e26577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613de257613de2614af7565b1a60f81b828281518110613df857613df8614af7565b60200101906001600160f81b031916908160001a90535060049490941c93613e1f81614e3c565b9050613da4565b5083156123365760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f00565b6000818310613e91576000828152602084905260409020612336565b6000838152602083905260409020612336565b60006001600160a01b0384163b15613fe557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613ee8903390899088908890600401614e53565b6020604051808303816000875af1925050508015613f23575060408051601f3d908101601f19168201909252613f2091810190614e85565b60015b613fcb573d808015613f51576040519150601f19603f3d011682016040523d82523d6000602084013e613f56565b606091505b508051600003613fc35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f00565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061196b565b50600161196b565b60006001613ffa84611f09565b6140049190614d74565b6000838152600c6020526040902054909150808214614057576001600160a01b0384166000908152600b602090815260408083208584528252808320548484528184208190558352600c90915290208190555b506000918252600c602090815260408084208490556001600160a01b039094168352600b81528383209183525290812055565b600d5460009061409c90600190614d74565b6000838152600e6020526040812054600d80549394509092849081106140c4576140c4614af7565b9060005260206000200154905080600d83815481106140e5576140e5614af7565b6000918252602080832090910192909255828152600e9091526040808220849055858252812055600d80548061411d5761411d614ea2565b6001900381819060005260206000200160009055905550505050565b600061414483611f09565b6001600160a01b039093166000908152600b602090815260408083208684528252808320859055938252600c9052919091209190915550565b6001600160a01b0382166141d35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f00565b6000818152600760205260409020546001600160a01b0316156142385760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f00565b61424460008383613b13565b6001600160a01b038216600090815260086020526040812080546001929061426d908490614acd565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0381168114611c2557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561431f5761431f6142e0565b604052919050565b600067ffffffffffffffff821115614341576143416142e0565b5060051b60200190565b6000806040838503121561435e57600080fd5b8235614369816142cb565b915060208381013567ffffffffffffffff81111561438657600080fd5b8401601f8101861361439757600080fd5b80356143aa6143a582614327565b6142f6565b81815260059190911b820183019083810190888311156143c957600080fd5b928401925b828410156143e7578335825292840192908401906143ce565b80955050505050509250929050565b6001600160e01b031981168114611c2557600080fd5b60006020828403121561441e57600080fd5b8135612336816143f6565b80356bffffffffffffffffffffffff8116811461444557600080fd5b919050565b6000806040838503121561445d57600080fd5b8235614468816142cb565b915061447660208401614429565b90509250929050565b60005b8381101561449a578181015183820152602001614482565b50506000910152565b600081518084526144bb81602086016020860161447f565b601f01601f19169290920160200192915050565b60208152600061233660208301846144a3565b6000602082840312156144f457600080fd5b5035919050565b6000806040838503121561450e57600080fd5b8235614519816142cb565b946020939093013593505050565b60006020828403121561453957600080fd5b8135612336816142cb565b60008060006060848603121561455957600080fd5b8335614564816142cb565b92506020840135614574816142cb565b929592945050506040919091013590565b6000806040838503121561459857600080fd5b50508035926020909101359150565b600080604083850312156145ba57600080fd5b8235915060208301356145cc816142cb565b809150509250929050565b8015158114611c2557600080fd5b6000602082840312156145f757600080fd5b8135612336816145d7565b600082601f83011261461357600080fd5b813560206146236143a583614327565b82815260059290921b8401810191818101908684111561464257600080fd5b8286015b8481101561465d5780358352918301918301614646565b509695505050505050565b6000806040838503121561467b57600080fd5b8235614686816142cb565b9150602083013567ffffffffffffffff8111156146a257600080fd5b6146ae85828601614602565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156146f0578351835292840192918401916001016146d4565b50909695505050505050565b6000806020838503121561470f57600080fd5b823567ffffffffffffffff8082111561472757600080fd5b818501915085601f83011261473b57600080fd5b81358181111561474a57600080fd5b86602082850101111561475c57600080fd5b60209290920196919550909350505050565b60008060006060848603121561478357600080fd5b833592506020840135614795816142cb565b91506147a360408501614429565b90509250925092565b6000806000606084860312156147c157600080fd5b83356147cc816142cb565b925060208401359150604084013567ffffffffffffffff8111156147ef57600080fd5b6147fb86828701614602565b9150509250925092565b6000806000806080858703121561481b57600080fd5b8435614826816142cb565b93506020850135925060408501359150606085013567ffffffffffffffff81111561485057600080fd5b61485c87828801614602565b91505092959194509250565b6000806040838503121561487b57600080fd5b8235614886816142cb565b915060208301356145cc816145d7565b600080600080608085870312156148ac57600080fd5b84356148b7816142cb565b93506020858101356148c8816142cb565b935060408601359250606086013567ffffffffffffffff808211156148ec57600080fd5b818801915088601f83011261490057600080fd5b813581811115614912576149126142e0565b614924601f8201601f191685016142f6565b9150808252898482850101111561493a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b634e487b7160e01b600052602160045260246000fd5b602081016009831061499257634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156149aa57600080fd5b81356009811061233657600080fd5b600080600080600060a086880312156149d157600080fd5b85356149dc816142cb565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff811115614a0d57600080fd5b614a1988828901614602565b9150509295509295909350565b60008060408385031215614a3957600080fd5b8235614a44816142cb565b915060208301356145cc816142cb565b60008060208385031215614a6757600080fd5b823567ffffffffffffffff80821115614a7f57600080fd5b818501915085601f830112614a9357600080fd5b813581811115614aa257600080fd5b8660208260051b850101111561475c57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561124957611249614ab7565b808202811582820484141761124957611249614ab7565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614b1f57600080fd5b8151612336816145d7565b600060208284031215614b3c57600080fd5b8151612336816142cb565b600181811c90821680614b5b57607f821691505b602082108103614b7b57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215614b9357600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082614bbf57614bbf614b9a565b500490565b601f82111561127157600081815260208120601f850160051c81016020861015614beb5750805b601f850160051c820191505b81811015614c0a57828155600101614bf7565b505050505050565b67ffffffffffffffff831115614c2a57614c2a6142e0565b614c3e83614c388354614b47565b83614bc4565b6000601f841160018114614c725760008515614c5a5750838201355b600019600387901b1c1916600186901b1783556122af565b600083815260209020601f19861690835b82811015614ca35786850135825560209485019460019092019101614c83565b5086821015614cc05760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b61ffff828116828216039080821115614ced57614ced614ab7565b5092915050565b60008351614d0681846020880161447f565b835190830190614d1a81836020880161447f565b01949350505050565b61ffff818116838216019080821115614ced57614ced614ab7565b63ffffffff818116838216019080821115614ced57614ced614ab7565b600060018201614d6d57614d6d614ab7565b5060010190565b8181038181111561124957611249614ab7565b600082614d9657614d96614b9a565b500690565b6001600160e01b03818116838216019080821115614ced57614ced614ab7565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614df381601785016020880161447f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614e3081602884016020880161447f565b01602801949350505050565b600081614e4b57614e4b614ab7565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526120d460808301846144a3565b600060208284031215614e9757600080fd5b8151612336816143f6565b634e487b7160e01b600052603160045260246000fdfed8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663ba2646970667358221220b35b7dd4cc5cfd760c6433f2c8df451747108df6ea0299d2681e1c1bf189742864736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000092718eebc387b9e6038d152df1307b9131d39a580000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd42
-----Decoded View---------------
Arg [0] : shareholderAddress_ (address): 0x92718EEbc387B9E6038d152DF1307B9131D39A58
Arg [1] : contractAddress (address): 0x0A36f2178c0dB2C85471c45334a1DD17D130fd42
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000092718eebc387b9e6038d152df1307b9131d39a58
Arg [1] : 0000000000000000000000000a36f2178c0db2c85471c45334a1dd17d130fd42
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.