Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Sponsored
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 33730169 | 712 days ago | IN | 0 POL | 0.17959944 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
DropERC1155
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 490 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; // ========== External imports ========== import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/BitMapsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; // ========== Internal imports ========== import "../interfaces/IThirdwebContract.sol"; // ========== Features ========== import "../extension/interface/IPlatformFee.sol"; import "../extension/interface/IPrimarySale.sol"; import "../extension/interface/IRoyalty.sol"; import "../extension/interface/IOwnable.sol"; import { IDropERC1155 } from "../interfaces/drop/IDropERC1155.sol"; import "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol"; import "../lib/CurrencyTransferLib.sol"; import "../lib/FeeType.sol"; import "../lib/MerkleProof.sol"; contract DropERC1155 is Initializable, IThirdwebContract, IOwnable, IRoyalty, IPrimarySale, IPlatformFee, ReentrancyGuardUpgradeable, ERC2771ContextUpgradeable, MulticallUpgradeable, AccessControlEnumerableUpgradeable, ERC1155Upgradeable, IDropERC1155 { using BitMapsUpgradeable for BitMapsUpgradeable.BitMap; using StringsUpgradeable for uint256; /*/////////////////////////////////////////////////////////////// State variables //////////////////////////////////////////////////////////////*/ bytes32 private constant MODULE_TYPE = bytes32("DropERC1155"); uint256 private constant VERSION = 2; // Token name string public name; // Token symbol string public symbol; /// @dev Only transfers to or from TRANSFER_ROLE holders are valid, when transfers are restricted. bytes32 private constant TRANSFER_ROLE = keccak256("TRANSFER_ROLE"); /// @dev Only MINTER_ROLE holders can lazy mint NFTs. bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @dev Max bps in the thirdweb system uint256 private constant MAX_BPS = 10_000; /// @dev Owner of the contract (purpose: OpenSea compatibility) address private _owner; // @dev The next token ID of the NFT to "lazy mint". uint256 public nextTokenIdToMint; /// @dev The address that receives all primary sales value. address public primarySaleRecipient; /// @dev The address that receives all platform fees from all sales. address private platformFeeRecipient; /// @dev The % of primary sales collected as platform fees. uint16 private platformFeeBps; /// @dev The recipient of who gets the royalty. address private royaltyRecipient; /// @dev The (default) address that receives all royalty value. uint16 private royaltyBps; /// @dev Contract level metadata. string public contractURI; /// @dev Largest tokenId of each batch of tokens with the same baseURI uint256[] private baseURIIndices; /*/////////////////////////////////////////////////////////////// Mappings //////////////////////////////////////////////////////////////*/ /** * @dev Mapping from 'Largest tokenId of a batch of tokens with the same baseURI' * to base URI for the respective batch of tokens. **/ mapping(uint256 => string) private baseURI; /// @dev Mapping from token ID => total circulating supply of tokens with that ID. mapping(uint256 => uint256) public totalSupply; /// @dev Mapping from token ID => maximum possible total circulating supply of tokens with that ID. mapping(uint256 => uint256) public maxTotalSupply; /// @dev Mapping from token ID => the set of all claim conditions, at any given moment, for tokens of the token ID. mapping(uint256 => ClaimConditionList) public claimCondition; /// @dev Mapping from token ID => the address of the recipient of primary sales. mapping(uint256 => address) public saleRecipient; /// @dev Mapping from token ID => royalty recipient and bps for tokens of the token ID. mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken; /// @dev Mapping from token ID => claimer wallet address => total number of NFTs of the token ID a wallet has claimed. mapping(uint256 => mapping(address => uint256)) public walletClaimCount; /// @dev Mapping from token ID => the max number of NFTs of the token ID a wallet can claim. mapping(uint256 => uint256) public maxWalletClaimCount; /*/////////////////////////////////////////////////////////////// Constructor + initializer logic //////////////////////////////////////////////////////////////*/ constructor() initializer {} /// @dev Initiliazes the contract, like a constructor. function initialize( address _defaultAdmin, string memory _name, string memory _symbol, string memory _contractURI, address[] memory _trustedForwarders, address _saleRecipient, address _royaltyRecipient, uint128 _royaltyBps, uint128 _platformFeeBps, address _platformFeeRecipient ) external initializer { // Initialize inherited contracts, most base-like -> most derived. __ReentrancyGuard_init(); __ERC2771Context_init_unchained(_trustedForwarders); __ERC1155_init_unchained(""); // Initialize this contract's state. name = _name; symbol = _symbol; royaltyRecipient = _royaltyRecipient; royaltyBps = uint16(_royaltyBps); platformFeeRecipient = _platformFeeRecipient; primarySaleRecipient = _saleRecipient; contractURI = _contractURI; platformFeeBps = uint16(_platformFeeBps); _owner = _defaultAdmin; _setupRole(DEFAULT_ADMIN_ROLE, _defaultAdmin); _setupRole(MINTER_ROLE, _defaultAdmin); _setupRole(TRANSFER_ROLE, _defaultAdmin); _setupRole(TRANSFER_ROLE, address(0)); } /*/////////////////////////////////////////////////////////////// Generic contract logic //////////////////////////////////////////////////////////////*/ /// @dev Returns the type of the contract. function contractType() external pure returns (bytes32) { return MODULE_TYPE; } /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8) { return uint8(VERSION); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return hasRole(DEFAULT_ADMIN_ROLE, _owner) ? _owner : address(0); } /*/////////////////////////////////////////////////////////////// ERC 165 / 1155 / 2981 logic //////////////////////////////////////////////////////////////*/ /// @dev Returns the URI for a given tokenId. function uri(uint256 _tokenId) public view override returns (string memory _tokenURI) { for (uint256 i = 0; i < baseURIIndices.length; i += 1) { if (_tokenId < baseURIIndices[i]) { return string(abi.encodePacked(baseURI[baseURIIndices[i]], _tokenId.toString())); } } return ""; } /// @dev See ERC 165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155Upgradeable, AccessControlEnumerableUpgradeable, IERC165Upgradeable, IERC165) returns (bool) { return super.supportsInterface(interfaceId) || type(IERC2981Upgradeable).interfaceId == interfaceId; } /// @dev Returns the royalty recipient and amount, given a tokenId and sale price. function royaltyInfo(uint256 tokenId, uint256 salePrice) external view virtual returns (address receiver, uint256 royaltyAmount) { (address recipient, uint256 bps) = getRoyaltyInfoForToken(tokenId); receiver = recipient; royaltyAmount = (salePrice * bps) / MAX_BPS; } /*/////////////////////////////////////////////////////////////// Minting logic //////////////////////////////////////////////////////////////*/ /** * @dev Lets an account with `MINTER_ROLE` lazy mint 'n' NFTs. * The URIs for each token is the provided `_baseURIForTokens` + `{tokenId}`. */ function lazyMint(uint256 _amount, string calldata _baseURIForTokens) external onlyRole(MINTER_ROLE) { uint256 startId = nextTokenIdToMint; uint256 baseURIIndex = startId + _amount; nextTokenIdToMint = baseURIIndex; baseURI[baseURIIndex] = _baseURIForTokens; baseURIIndices.push(baseURIIndex); emit TokensLazyMinted(startId, startId + _amount - 1, _baseURIForTokens); } /*/////////////////////////////////////////////////////////////// Claim logic //////////////////////////////////////////////////////////////*/ /// @dev Lets an account claim a given quantity of NFTs, of a single tokenId. function claim( address _receiver, uint256 _tokenId, uint256 _quantity, address _currency, uint256 _pricePerToken, bytes32[] calldata _proofs, uint256 _proofMaxQuantityPerTransaction ) external payable nonReentrant { require(isTrustedForwarder(msg.sender) || _msgSender() == tx.origin, "BOT"); // Get the active claim condition index. uint256 activeConditionId = getActiveClaimConditionId(_tokenId); /** * We make allowlist checks (i.e. verifyClaimMerkleProof) before verifying the claim's general * validity (i.e. verifyClaim) because we give precedence to the check of allow list quantity * restriction over the check of the general claim condition's quantityLimitPerTransaction * restriction. */ // Verify inclusion in allowlist. (bool validMerkleProof, ) = verifyClaimMerkleProof( activeConditionId, _msgSender(), _tokenId, _quantity, _proofs, _proofMaxQuantityPerTransaction ); // Verify claim validity. If not valid, revert. // when there's allowlist present --> verifyClaimMerkleProof will verify the _proofMaxQuantityPerTransaction value with hashed leaf in the allowlist // when there's no allowlist, this check is true --> verifyClaim will check for _quantity being less/equal than the limit bool toVerifyMaxQuantityPerTransaction = _proofMaxQuantityPerTransaction == 0 || claimCondition[_tokenId].phases[activeConditionId].merkleRoot == bytes32(0); verifyClaim( activeConditionId, _msgSender(), _tokenId, _quantity, _currency, _pricePerToken, toVerifyMaxQuantityPerTransaction ); if (validMerkleProof && _proofMaxQuantityPerTransaction > 0) { /** * Mark the claimer's use of their position in the allowlist. A spot in an allowlist * can be used only once. */ claimCondition[_tokenId].limitMerkleProofClaim[activeConditionId].set(uint256(uint160(_msgSender()))); } // If there's a price, collect price. collectClaimPrice(_quantity, _currency, _pricePerToken, _tokenId); // Mint the relevant tokens to claimer. transferClaimedTokens(_receiver, activeConditionId, _tokenId, _quantity); emit TokensClaimed(activeConditionId, _tokenId, _msgSender(), _receiver, _quantity); } /// @dev Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions, for a tokenId. function setClaimConditions( uint256 _tokenId, ClaimCondition[] calldata _phases, bool _resetClaimEligibility ) external onlyRole(DEFAULT_ADMIN_ROLE) { ClaimConditionList storage condition = claimCondition[_tokenId]; uint256 existingStartIndex = condition.currentStartId; uint256 existingPhaseCount = condition.count; /** * `limitLastClaimTimestamp` and `limitMerkleProofClaim` are mappings that use a * claim condition's UID as a key. * * If `_resetClaimEligibility == true`, we assign completely new UIDs to the claim * conditions in `_phases`, effectively resetting the restrictions on claims expressed * by `limitLastClaimTimestamp` and `limitMerkleProofClaim`. */ uint256 newStartIndex = existingStartIndex; if (_resetClaimEligibility) { newStartIndex = existingStartIndex + existingPhaseCount; } condition.count = _phases.length; condition.currentStartId = newStartIndex; uint256 lastConditionStartTimestamp; for (uint256 i = 0; i < _phases.length; i++) { require( i == 0 || lastConditionStartTimestamp < _phases[i].startTimestamp, "startTimestamp must be in ascending order." ); uint256 supplyClaimedAlready = condition.phases[newStartIndex + i].supplyClaimed; require(supplyClaimedAlready <= _phases[i].maxClaimableSupply, "max supply claimed already"); condition.phases[newStartIndex + i] = _phases[i]; condition.phases[newStartIndex + i].supplyClaimed = supplyClaimedAlready; lastConditionStartTimestamp = _phases[i].startTimestamp; } /** * Gas refunds (as much as possible) * * If `_resetClaimEligibility == true`, we assign completely new UIDs to the claim * conditions in `_phases`. So, we delete claim conditions with UID < `newStartIndex`. * * If `_resetClaimEligibility == false`, and there are more existing claim conditions * than in `_phases`, we delete the existing claim conditions that don't get replaced * by the conditions in `_phases`. */ if (_resetClaimEligibility) { for (uint256 i = existingStartIndex; i < newStartIndex; i++) { delete condition.phases[i]; delete condition.limitMerkleProofClaim[i]; } } else { if (existingPhaseCount > _phases.length) { for (uint256 i = _phases.length; i < existingPhaseCount; i++) { delete condition.phases[newStartIndex + i]; delete condition.limitMerkleProofClaim[newStartIndex + i]; } } } emit ClaimConditionsUpdated(_tokenId, _phases); } /// @dev Collects and distributes the primary sale value of NFTs being claimed. function collectClaimPrice( uint256 _quantityToClaim, address _currency, uint256 _pricePerToken, uint256 _tokenId ) internal { if (_pricePerToken == 0) { return; } uint256 totalPrice = _quantityToClaim * _pricePerToken; uint256 platformFees = (totalPrice * platformFeeBps) / MAX_BPS; if (_currency == CurrencyTransferLib.NATIVE_TOKEN) { require(msg.value == totalPrice, "must send total price."); } address recipient = saleRecipient[_tokenId] == address(0) ? primarySaleRecipient : saleRecipient[_tokenId]; CurrencyTransferLib.transferCurrency(_currency, _msgSender(), platformFeeRecipient, platformFees); CurrencyTransferLib.transferCurrency(_currency, _msgSender(), recipient, totalPrice - platformFees); } /// @dev Transfers the NFTs being claimed. function transferClaimedTokens( address _to, uint256 _conditionId, uint256 _tokenId, uint256 _quantityBeingClaimed ) internal { // Update the supply minted under mint condition. claimCondition[_tokenId].phases[_conditionId].supplyClaimed += _quantityBeingClaimed; // if transfer claimed tokens is called when to != msg.sender, it'd use msg.sender's limits. // behavior would be similar to msg.sender mint for itself, then transfer to `to`. claimCondition[_tokenId].limitLastClaimTimestamp[_conditionId][_msgSender()] = block.timestamp; walletClaimCount[_tokenId][_msgSender()] += _quantityBeingClaimed; _mint(_to, _tokenId, _quantityBeingClaimed, ""); } /// @dev Checks a request to claim NFTs against the active claim condition's criteria. function verifyClaim( uint256 _conditionId, address _claimer, uint256 _tokenId, uint256 _quantity, address _currency, uint256 _pricePerToken, bool verifyMaxQuantityPerTransaction ) public view { ClaimCondition memory currentClaimPhase = claimCondition[_tokenId].phases[_conditionId]; require( _currency == currentClaimPhase.currency && _pricePerToken == currentClaimPhase.pricePerToken, "invalid currency or price specified." ); // If we're checking for an allowlist quantity restriction, ignore the general quantity restriction. require( _quantity > 0 && (!verifyMaxQuantityPerTransaction || _quantity <= currentClaimPhase.quantityLimitPerTransaction), "invalid quantity claimed." ); require( currentClaimPhase.supplyClaimed + _quantity <= currentClaimPhase.maxClaimableSupply, "exceed max mint supply." ); require( maxTotalSupply[_tokenId] == 0 || totalSupply[_tokenId] + _quantity <= maxTotalSupply[_tokenId], "exceed max total supply" ); require( maxWalletClaimCount[_tokenId] == 0 || walletClaimCount[_tokenId][_claimer] + _quantity <= maxWalletClaimCount[_tokenId], "exceed claim limit for wallet" ); (uint256 lastClaimTimestamp, uint256 nextValidClaimTimestamp) = getClaimTimestamp( _tokenId, _conditionId, _claimer ); require(lastClaimTimestamp == 0 || block.timestamp >= nextValidClaimTimestamp, "cannot claim yet."); } /// @dev Checks whether a claimer meets the claim condition's allowlist criteria. function verifyClaimMerkleProof( uint256 _conditionId, address _claimer, uint256 _tokenId, uint256 _quantity, bytes32[] calldata _proofs, uint256 _proofMaxQuantityPerTransaction ) public view returns (bool validMerkleProof, uint256 merkleProofIndex) { ClaimCondition memory currentClaimPhase = claimCondition[_tokenId].phases[_conditionId]; if (currentClaimPhase.merkleRoot != bytes32(0)) { (validMerkleProof, merkleProofIndex) = MerkleProof.verify( _proofs, currentClaimPhase.merkleRoot, keccak256(abi.encodePacked(_claimer, _proofMaxQuantityPerTransaction)) ); require(validMerkleProof, "not in whitelist."); require( !claimCondition[_tokenId].limitMerkleProofClaim[_conditionId].get(uint256(uint160(_claimer))), "proof claimed." ); require( _proofMaxQuantityPerTransaction == 0 || _quantity <= _proofMaxQuantityPerTransaction, "invalid quantity proof." ); } } /*/////////////////////////////////////////////////////////////// Getter functions //////////////////////////////////////////////////////////////*/ /// @dev At any given moment, returns the uid for the active claim condition, for a given tokenId. function getActiveClaimConditionId(uint256 _tokenId) public view returns (uint256) { ClaimConditionList storage conditionList = claimCondition[_tokenId]; for (uint256 i = conditionList.currentStartId + conditionList.count; i > conditionList.currentStartId; i--) { if (block.timestamp >= conditionList.phases[i - 1].startTimestamp) { return i - 1; } } revert("no active mint condition."); } /// @dev Returns the platform fee recipient and bps. function getPlatformFeeInfo() external view returns (address, uint16) { return (platformFeeRecipient, uint16(platformFeeBps)); } /// @dev Returns the default royalty recipient and bps. function getDefaultRoyaltyInfo() external view returns (address, uint16) { return (royaltyRecipient, uint16(royaltyBps)); } /// @dev Returns the royalty recipient and bps for a particular token Id. function getRoyaltyInfoForToken(uint256 _tokenId) public view returns (address, uint16) { RoyaltyInfo memory royaltyForToken = royaltyInfoForToken[_tokenId]; return royaltyForToken.recipient == address(0) ? (royaltyRecipient, uint16(royaltyBps)) : (royaltyForToken.recipient, uint16(royaltyForToken.bps)); } /// @dev Returns the timestamp for when a claimer is eligible for claiming NFTs again. function getClaimTimestamp( uint256 _tokenId, uint256 _conditionId, address _claimer ) public view returns (uint256 lastClaimTimestamp, uint256 nextValidClaimTimestamp) { lastClaimTimestamp = claimCondition[_tokenId].limitLastClaimTimestamp[_conditionId][_claimer]; unchecked { nextValidClaimTimestamp = lastClaimTimestamp + claimCondition[_tokenId].phases[_conditionId].waitTimeInSecondsBetweenClaims; if (nextValidClaimTimestamp < lastClaimTimestamp) { nextValidClaimTimestamp = type(uint256).max; } } } /// @dev Returns the claim condition at the given uid. function getClaimConditionById(uint256 _tokenId, uint256 _conditionId) external view returns (ClaimCondition memory condition) { condition = claimCondition[_tokenId].phases[_conditionId]; } /*/////////////////////////////////////////////////////////////// Setter functions //////////////////////////////////////////////////////////////*/ /// @dev Lets a contract admin set a claim count for a wallet. function setWalletClaimCount( uint256 _tokenId, address _claimer, uint256 _count ) external onlyRole(DEFAULT_ADMIN_ROLE) { walletClaimCount[_tokenId][_claimer] = _count; emit WalletClaimCountUpdated(_tokenId, _claimer, _count); } /// @dev Lets a contract admin set a maximum number of NFTs of a tokenId that can be claimed by any wallet. function setMaxWalletClaimCount(uint256 _tokenId, uint256 _count) external onlyRole(DEFAULT_ADMIN_ROLE) { maxWalletClaimCount[_tokenId] = _count; emit MaxWalletClaimCountUpdated(_tokenId, _count); } /// @dev Lets a module admin set a max total supply for token. function setMaxTotalSupply(uint256 _tokenId, uint256 _maxTotalSupply) external onlyRole(DEFAULT_ADMIN_ROLE) { maxTotalSupply[_tokenId] = _maxTotalSupply; emit MaxTotalSupplyUpdated(_tokenId, _maxTotalSupply); } /// @dev Lets a contract admin set the recipient for all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { primarySaleRecipient = _saleRecipient; emit PrimarySaleRecipientUpdated(_saleRecipient); } /// @dev Lets a contract admin set the recipient for all primary sales. function setSaleRecipientForToken(uint256 _tokenId, address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { saleRecipient[_tokenId] = _saleRecipient; emit SaleRecipientForTokenUpdated(_tokenId, _saleRecipient); } /// @dev Lets a contract admin update the default royalty recipient and bps. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_royaltyBps <= MAX_BPS, "exceed royalty bps"); royaltyRecipient = _royaltyRecipient; royaltyBps = uint16(_royaltyBps); emit DefaultRoyalty(_royaltyRecipient, _royaltyBps); } /// @dev Lets a contract admin set the royalty recipient and bps for a particular token Id. function setRoyaltyInfoForToken( uint256 _tokenId, address _recipient, uint256 _bps ) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_bps <= MAX_BPS, "exceed royalty bps"); royaltyInfoForToken[_tokenId] = RoyaltyInfo({ recipient: _recipient, bps: _bps }); emit RoyaltyForToken(_tokenId, _recipient, _bps); } /// @dev Lets a contract admin update the platform fee recipient and bps function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_platformFeeBps <= MAX_BPS, "bps <= 10000."); platformFeeBps = uint16(_platformFeeBps); platformFeeRecipient = _platformFeeRecipient; emit PlatformFeeInfoUpdated(_platformFeeRecipient, _platformFeeBps); } /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin. function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { require(hasRole(DEFAULT_ADMIN_ROLE, _newOwner), "new owner not module admin."); emit OwnerUpdated(_owner, _newOwner); _owner = _newOwner; } /// @dev Lets a contract admin set the URI for contract-level metadata. function setContractURI(string calldata _uri) external onlyRole(DEFAULT_ADMIN_ROLE) { contractURI = _uri; } /*/////////////////////////////////////////////////////////////// Miscellaneous //////////////////////////////////////////////////////////////*/ /// @dev Lets a token owner burn the tokens they own (i.e. destroy for good) function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved." ); _burn(account, id, value); } /// @dev Lets a token owner burn multiple tokens they own at once (i.e. destroy for good) function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved." ); _burnBatch(account, ids, values); } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); // if transfer is restricted on the contract, we still want to allow burning and minting if (!hasRole(TRANSFER_ROLE, address(0)) && from != address(0) && to != address(0)) { require(hasRole(TRANSFER_ROLE, from) || hasRole(TRANSFER_ROLE, to), "restricted to TRANSFER_ROLE holders."); } if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { totalSupply[ids[i]] -= amounts[i]; } } } function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address sender) { return ERC2771ContextUpgradeable._msgSender(); } function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) { return ERC2771ContextUpgradeable._msgData(); } }
// 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 * [EIP](https://eips.ethereum.org/EIPS/eip-165). * * 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 * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: Apache 2.0 pragma solidity ^0.8.0; import "./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 payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading * who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses * information about who the contract's owner is. */ interface IOwnable { /// @dev Returns the owner of the contract. function owner() external view returns (address); /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin. function setOwner(address _newOwner) external; /// @dev Emitted when a new Owner is set. event OwnerUpdated(address indexed prevOwner, address indexed newOwner); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `PlatformFee` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of platform fee and the platform fee basis points, and lets the inheriting contract perform conditional logic * that uses information about platform fees, if desired. */ interface IPlatformFee { /// @dev Returns the platform fee bps and recipient. function getPlatformFeeInfo() external view returns (address, uint16); /// @dev Lets a module admin update the fees on primary sales. function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external; /// @dev Emitted when fee on primary sales is updated. event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `Primary` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about * primary sales, if desired. */ interface IPrimarySale { /// @dev The adress that receives all primary sales value. function primarySaleRecipient() external view returns (address); /// @dev Lets a module admin set the default recipient of all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external; /// @dev Emitted when a new sale recipient is set. event PrimarySaleRecipientUpdated(address indexed recipient); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "../../eip/interface/IERC2981.sol"; /** * Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic * that uses information about royalty fees, if desired. * * The `Royalty` contract is ERC2981 compliant. */ interface IRoyalty is IERC2981 { struct RoyaltyInfo { address recipient; uint256 bps; } /// @dev Returns the royalty recipient and fee bps. function getDefaultRoyaltyInfo() external view returns (address, uint16); /// @dev Lets a module admin update the royalty bps and recipient. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external; /// @dev Lets a module admin set the royalty recipient for a particular token Id. function setRoyaltyInfoForToken( uint256 tokenId, address recipient, uint256 bps ) external; /// @dev Returns the royalty recipient for a particular token Id. function getRoyaltyInfoForToken(uint256 tokenId) external view returns (address, uint16); /// @dev Emitted when royalty info is updated. event DefaultRoyalty(address indexed newRoyaltyRecipient, uint256 newRoyaltyBps); /// @dev Emitted when royalty recipient for tokenId is set event RoyaltyForToken(uint256 indexed tokenId, address indexed royaltyRecipient, uint256 royaltyBps); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; interface IThirdwebContract { /// @dev Returns the module type of the contract. function contractType() external pure returns (bytes32); /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8); /// @dev Returns the metadata URI of the contract. function contractURI() external view returns (string memory); /** * @dev Sets contract URI for the storefront-level metadata of the contract. * Only module admin can call this function. */ function setContractURI(string calldata _uri) external; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; interface IWETH { function deposit() external payable; function withdraw(uint256 amount) external; function transfer(address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/structs/BitMapsUpgradeable.sol"; /** * Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. * * A contract admin (i.e. a holder of `DEFAULT_ADMIN_ROLE`) can set a series of claim conditions, * ordered by their respective `startTimestamp`. A claim condition defines criteria under which * accounts can mint tokens. Claim conditions can be overwritten or added to by the contract admin. * At any moment, there is only one active claim condition. */ interface IDropClaimCondition { /** * @notice The criteria that make up a claim condition. * * @param startTimestamp The unix timestamp after which the claim condition applies. * The same claim condition applies until the `startTimestamp` * of the next claim condition. * * @param maxClaimableSupply The maximum total number of tokens that can be claimed under * the claim condition. * * @param supplyClaimed At any given point, the number of tokens that have been claimed * under the claim condition. * * @param quantityLimitPerTransaction The maximum number of tokens that can be claimed in a single * transaction. * * @param waitTimeInSecondsBetweenClaims The least number of seconds an account must wait after claiming * tokens, to be able to claim tokens again. * * @param merkleRoot The allowlist of addresses that can claim tokens under the claim * condition. * * @param pricePerToken The price required to pay per token claimed. * * @param currency The currency in which the `pricePerToken` must be paid. */ struct ClaimCondition { uint256 startTimestamp; uint256 maxClaimableSupply; uint256 supplyClaimed; uint256 quantityLimitPerTransaction; uint256 waitTimeInSecondsBetweenClaims; bytes32 merkleRoot; uint256 pricePerToken; address currency; } /** * @notice The set of all claim conditions, at any given moment. * Claim Phase ID = [currentStartId, currentStartId + length - 1]; * * @param currentStartId The uid for the first claim condition amongst the current set of * claim conditions. The uid for each next claim condition is one * more than the previous claim condition's uid. * * @param count The total number of phases / claim conditions in the list * of claim conditions. * * @param phases The claim conditions at a given uid. Claim conditions * are ordered in an ascending order by their `startTimestamp`. * * @param limitLastClaimTimestamp Map from an account and uid for a claim condition, to the last timestamp * at which the account claimed tokens under that claim condition. * * @param limitMerkleProofClaim Map from a claim condition uid to whether an address in an allowlist * has already claimed tokens i.e. used their place in the allowlist. */ struct ClaimConditionList { uint256 currentStartId; uint256 count; mapping(uint256 => ClaimCondition) phases; mapping(uint256 => mapping(address => uint256)) limitLastClaimTimestamp; mapping(uint256 => BitMapsUpgradeable.BitMap) limitMerkleProofClaim; } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "./IDropClaimCondition.sol"; /** * Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. The * `DropERC721` contract is a distribution mechanism for ERC721 tokens. * * A minter wallet (i.e. holder of `MINTER_ROLE`) can (lazy)mint 'n' tokens * at once by providing a single base URI for all tokens being lazy minted. * The URI for each of the 'n' tokens lazy minted is the provided base URI + * `{tokenId}` of the respective token. (e.g. "ipsf://Qmece.../1"). * * A minter can choose to lazy mint 'delayed-reveal' tokens. More on 'delayed-reveal' * tokens in [this article](https://blog.thirdweb.com/delayed-reveal-nfts). * * A contract admin (i.e. holder of `DEFAULT_ADMIN_ROLE`) can create claim conditions * with non-overlapping time windows, and accounts can claim the tokens according to * restrictions defined in the claim condition that is active at the time of the transaction. */ interface IDropERC1155 is IERC1155Upgradeable, IDropClaimCondition { /// @dev Emitted when tokens are claimed. event TokensClaimed( uint256 indexed claimConditionIndex, uint256 indexed tokenId, address indexed claimer, address receiver, uint256 quantityClaimed ); /// @dev Emitted when tokens are lazy minted. event TokensLazyMinted(uint256 startTokenId, uint256 endTokenId, string baseURI); /// @dev Emitted when new claim conditions are set for a token. event ClaimConditionsUpdated(uint256 indexed tokenId, ClaimCondition[] claimConditions); /// @dev Emitted when the global max supply of a token is updated. event MaxTotalSupplyUpdated(uint256 tokenId, uint256 maxTotalSupply); /// @dev Emitted when the wallet claim count for a given tokenId and address is updated. event WalletClaimCountUpdated(uint256 tokenId, address indexed wallet, uint256 count); /// @dev Emitted when the max wallet claim count for a given tokenId is updated. event MaxWalletClaimCountUpdated(uint256 tokenId, uint256 count); /// @dev Emitted when the sale recipient for a particular tokenId is updated. event SaleRecipientForTokenUpdated(uint256 indexed tokenId, address saleRecipient); /** * @notice Lets an account with `MINTER_ROLE` lazy mint 'n' NFTs. * The URIs for each token is the provided `_baseURIForTokens` + `{tokenId}`. * * @param amount The amount of NFTs to lazy mint. * @param baseURIForTokens The URI for the NFTs to lazy mint. */ function lazyMint(uint256 amount, string calldata baseURIForTokens) external; /** * @notice Lets an account claim a given quantity of NFTs. * * @param receiver The receiver of the NFTs to claim. * @param tokenId The unique ID of the token to claim. * @param quantity The quantity of NFTs to claim. * @param currency The currency in which to pay for the claim. * @param pricePerToken The price per token to pay for the claim. * @param proofs The proof of the claimer's inclusion in the merkle root allowlist * of the claim conditions that apply. * @param proofMaxQuantityPerTransaction (Optional) The maximum number of NFTs an address included in an * allowlist can claim. */ function claim( address receiver, uint256 tokenId, uint256 quantity, address currency, uint256 pricePerToken, bytes32[] calldata proofs, uint256 proofMaxQuantityPerTransaction ) external payable; /** * @notice Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions. * * @param tokenId The token ID for which to set mint conditions. * @param phases Claim conditions in ascending order by `startTimestamp`. * @param resetClaimEligibility Whether to reset `limitLastClaimTimestamp` and * `limitMerkleProofClaim` values when setting new * claim conditions. */ function setClaimConditions( uint256 tokenId, ClaimCondition[] calldata phases, bool resetClaimEligibility ) external; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; // Helper interfaces import { IWETH } from "../interfaces/IWETH.sol"; import "../openzeppelin-presets/token/ERC20/utils/SafeERC20.sol"; library CurrencyTransferLib { using SafeERC20 for IERC20; /// @dev The address interpreted as native token of the chain. address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev Transfers a given amount of currency. function transferCurrency( address _currency, address _from, address _to, uint256 _amount ) internal { if (_amount == 0) { return; } if (_currency == NATIVE_TOKEN) { safeTransferNativeToken(_to, _amount); } else { safeTransferERC20(_currency, _from, _to, _amount); } } /// @dev Transfers a given amount of currency. (With native token wrapping) function transferCurrencyWithWrapper( address _currency, address _from, address _to, uint256 _amount, address _nativeTokenWrapper ) internal { if (_amount == 0) { return; } if (_currency == NATIVE_TOKEN) { if (_from == address(this)) { // withdraw from weth then transfer withdrawn native token to recipient IWETH(_nativeTokenWrapper).withdraw(_amount); safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper); } else if (_to == address(this)) { // store native currency in weth require(_amount == msg.value, "msg.value != amount"); IWETH(_nativeTokenWrapper).deposit{ value: _amount }(); } else { safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper); } } else { safeTransferERC20(_currency, _from, _to, _amount); } } /// @dev Transfer `amount` of ERC20 token from `from` to `to`. function safeTransferERC20( address _currency, address _from, address _to, uint256 _amount ) internal { if (_from == _to) { return; } if (_from == address(this)) { IERC20(_currency).safeTransfer(_to, _amount); } else { IERC20(_currency).safeTransferFrom(_from, _to, _amount); } } /// @dev Transfers `amount` of native token to `to`. function safeTransferNativeToken(address to, uint256 value) internal { // solhint-disable avoid-low-level-calls // slither-disable-next-line low-level-calls (bool success, ) = to.call{ value: value }(""); require(success, "native token transfer failed"); } /// @dev Transfers `amount` of native token to `to`. (With native token wrapping) function safeTransferNativeTokenWithWrapper( address to, uint256 value, address _nativeTokenWrapper ) internal { // solhint-disable avoid-low-level-calls // slither-disable-next-line low-level-calls (bool success, ) = to.call{ value: value }(""); if (!success) { IWETH(_nativeTokenWrapper).deposit{ value: value }(); IERC20(_nativeTokenWrapper).safeTransfer(to, value); } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; library FeeType { uint256 internal constant PRIMARY_SALE = 0; uint256 internal constant MARKET_SALE = 1; uint256 internal constant SPLIT = 2; }
// SPDX-License-Identifier: MIT // Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.3.0/contracts/utils/cryptography/MerkleProof.sol // Copied from https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees 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. * * Source: https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol */ 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, uint256) { bytes32 computedHash = leaf; uint256 index = 0; for (uint256 i = 0; i < proof.length; i++) { index *= 2; bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); index += 1; } } // Check if the computed hash (root) is equal to the provided root return (computedHash == root, index); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library TWAddress { /** * @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. * * [EIP1884](https://eips.ethereum.org/EIPS/eip-1884) 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (metatx/ERC2771Context.sol) pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Context variant with ERC2771 support. */ abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { mapping(address => bool) private _trustedForwarder; function __ERC2771Context_init(address[] memory trustedForwarder) internal onlyInitializing { __Context_init_unchained(); __ERC2771Context_init_unchained(trustedForwarder); } function __ERC2771Context_init_unchained(address[] memory trustedForwarder) internal onlyInitializing { for (uint256 i = 0; i < trustedForwarder.length; i++) { _trustedForwarder[trustedForwarder[i]] = true; } } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return _trustedForwarder[forwarder]; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../../../../eip/interface/IERC20.sol"; import "../../../../lib/TWAddress.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using TWAddress for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerableUpgradeable.sol"; import "./AccessControlUpgradeable.sol"; import "../utils/structs/EnumerableSetUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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(IAccessControlUpgradeable).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 ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.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()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// 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 IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.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 IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal onlyInitializing { __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol) pragma solidity ^0.8.0; import "./AddressUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. * * _Available since v4.1._ */ abstract contract MulticallUpgradeable is Initializable { function __Multicall_init() internal onlyInitializing { } function __Multicall_init_unchained() internal onlyInitializing { } /** * @dev Receives and executes a batch of function calls on this contract. */ function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { results[i] = _functionDelegateCall(address(this), data[i]); } return results; } /** * @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) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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 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 BitMapsUpgradeable { 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 // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 490 }, "evmVersion": "london", "remappings": [ ":@chainlink/contracts/src/=node_modules/@chainlink/contracts/src/", ":@ds-test/=lib/ds-test/src/", ":@openzeppelin/=node_modules/@openzeppelin/", ":@std/=lib/forge-std/src/", ":contracts/=contracts/", ":ds-test/=lib/ds-test/src/", ":erc721a-upgradeable/=node_modules/erc721a-upgradeable/", ":erc721a/=node_modules/erc721a/", ":forge-std/=lib/forge-std/src/" ], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"indexed":false,"internalType":"struct IDropClaimCondition.ClaimCondition[]","name":"claimConditions","type":"tuple[]"}],"name":"ClaimConditionsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRoyaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyaltyBps","type":"uint256"}],"name":"DefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxTotalSupply","type":"uint256"}],"name":"MaxTotalSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"MaxWalletClaimCountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"platformFeeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"platformFeeBps","type":"uint256"}],"name":"PlatformFeeInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleRecipientUpdated","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBps","type":"uint256"}],"name":"RoyaltyForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"saleRecipient","type":"address"}],"name":"SaleRecipientForTokenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"claimConditionIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantityClaimed","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"TokensLazyMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"WalletClaimCountUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"uint256","name":"_proofMaxQuantityPerTransaction","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimCondition","outputs":[{"internalType":"uint256","name":"currentStartId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getActiveClaimConditionId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_conditionId","type":"uint256"}],"name":"getClaimConditionById","outputs":[{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropClaimCondition.ClaimCondition","name":"condition","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"}],"name":"getClaimTimestamp","outputs":[{"internalType":"uint256","name":"lastClaimTimestamp","type":"uint256"},{"internalType":"uint256","name":"nextValidClaimTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlatformFeeInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"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":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyaltyInfoForToken","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"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":"_defaultAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address[]","name":"_trustedForwarders","type":"address[]"},{"internalType":"address","name":"_saleRecipient","type":"address"},{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint128","name":"_royaltyBps","type":"uint128"},{"internalType":"uint128","name":"_platformFeeBps","type":"uint128"},{"internalType":"address","name":"_platformFeeRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_baseURIForTokens","type":"string"}],"name":"lazyMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxWalletClaimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"saleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropClaimCondition.ClaimCondition[]","name":"_phases","type":"tuple[]"},{"internalType":"bool","name":"_resetClaimEligibility","type":"bool"}],"name":"setClaimConditions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint256","name":"_royaltyBps","type":"uint256"}],"name":"setDefaultRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_maxTotalSupply","type":"uint256"}],"name":"setMaxTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setMaxWalletClaimCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_platformFeeRecipient","type":"address"},{"internalType":"uint256","name":"_platformFeeBps","type":"uint256"}],"name":"setPlatformFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setPrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setRoyaltyInfoForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setSaleRecipientForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setWalletClaimCount","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"internalType":"bool","name":"verifyMaxQuantityPerTransaction","type":"bool"}],"name":"verifyClaim","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"uint256","name":"_proofMaxQuantityPerTransaction","type":"uint256"}],"name":"verifyClaimMerkleProof","outputs":[{"internalType":"bool","name":"validMerkleProof","type":"bool"},{"internalType":"uint256","name":"merkleProofIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"walletClaimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50600054610100900460ff1615808015620000335750600054600160ff909116105b8062000063575062000050306200013d60201b62002b4e1760201c565b15801562000063575060005460ff166001145b620000cb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff191660011790558015620000ef576000805461ff0019166101001790555b801562000136576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b506200014c565b6001600160a01b03163b151590565b615e30806200015c6000396000f3fe6080604052600436106103755760003560e01c80639010d07c116101d1578063b79cade411610102578063d45b28d7116100a0578063e9703d251161006f578063e9703d2514610bc7578063e985e9c514610bfc578063f242432a14610c46578063f5298aca14610c6657600080fd5b8063d45b28d714610ae8578063d547741f14610b72578063e159163414610b92578063e8a3d48514610bb257600080fd5b8063c7337d6b116100dc578063c7337d6b14610a44578063ca15c87314610a7b578063cb2ef6f714610a9b578063d45573f614610abc57600080fd5b8063b79cade4146109af578063bd85b039146109dd578063c16ce64e14610a0b57600080fd5b8063a217fddf1161016f578063ac9650d811610149578063ac9650d814610923578063b101440014610950578063b24f2d3914610970578063b4c5faa11461099c57600080fd5b8063a217fddf146108ce578063a22cb465146108e3578063ab073c221461090357600080fd5b806395d89b41116101ab57806395d89b411461085d5780639bcf7a1514610872578063a0a8e46014610892578063a157f71c146108ae57600080fd5b80639010d07c146107d757806391d14854146107f7578063938e3d7b1461083d57600080fd5b80633b1475a7116102ab578063622a6c311161024957806371d53a5b1161022357806371d53a5b1461074b578063832c3a581461078257806387198cf2146107a25780638da5cb5b146107c257600080fd5b8063622a6c31146106d65780636b20c4541461070b5780636f4f28371461072b57600080fd5b80634e1273f4116102855780634e1273f414610630578063572b6c051461065d5780635ab063e814610696578063600dd5ea146106b657600080fd5b80633b1475a7146105b757806347158264146105ce5780634cc157df146105ee57600080fd5b8063248a9ca3116103185780632a55205a116102f25780632a55205a146105185780632eb2c2d6146105575780632f2ff15d1461057757806336568abe1461059757600080fd5b8063248a9ca31461049a57806324aaffaa146104ca57806329c49b9b146104f857600080fd5b8063079fe40e11610354578063079fe40e146103ff5780630e89341c1461043857806313af4035146104585780631e7ac4881461047a57600080fd5b8062fdd58e1461037a57806301ffc9a7146103ad57806306fdde03146103dd575b600080fd5b34801561038657600080fd5b5061039a610395366004614c80565b610c86565b6040519081526020015b60405180910390f35b3480156103b957600080fd5b506103cd6103c8366004614cc2565b610d22565b60405190151581526020016103a4565b3480156103e957600080fd5b506103f2610d4a565b6040516103a49190614d37565b34801561040b57600080fd5b5061019554610420906001600160a01b031681565b6040516001600160a01b0390911681526020016103a4565b34801561044457600080fd5b506103f2610453366004614d4a565b610dd9565b34801561046457600080fd5b50610478610473366004614d63565b610e9a565b005b34801561048657600080fd5b50610478610495366004614c80565b610f8b565b3480156104a657600080fd5b5061039a6104b5366004614d4a565b600090815260fb602052604090206001015490565b3480156104d657600080fd5b5061039a6104e5366004614d4a565b61019c6020526000908152604090205481565b34801561050457600080fd5b50610478610513366004614d80565b611046565b34801561052457600080fd5b50610538610533366004614db0565b6110af565b604080516001600160a01b0390931683526020830191909152016103a4565b34801561056357600080fd5b50610478610572366004614f1e565b6110ec565b34801561058357600080fd5b50610478610592366004614d80565b611192565b3480156105a357600080fd5b506104786105b2366004614d80565b6111bc565b3480156105c357600080fd5b5061039a6101945481565b3480156105da57600080fd5b506104786105e9366004615015565b611258565b3480156105fa57600080fd5b5061060e610609366004614d4a565b611347565b604080516001600160a01b03909316835261ffff9091166020830152016103a4565b34801561063c57600080fd5b5061065061064b3660046150d0565b6113b4565b6040516103a4919061516f565b34801561066957600080fd5b506103cd610678366004614d63565b6001600160a01b031660009081526065602052604090205460ff1690565b3480156106a257600080fd5b5061039a6106b1366004614d4a565b6114de565b3480156106c257600080fd5b506104786106d1366004614c80565b6115a2565b3480156106e257600080fd5b506106f66106f1366004615182565b611650565b604080519283526020830191909152016103a4565b34801561071757600080fd5b506104786107263660046151bb565b6116a9565b34801561073757600080fd5b50610478610746366004614d63565b611741565b34801561075757600080fd5b5061076b610766366004615276565b611798565b6040805192151583526020830191909152016103a4565b34801561078e57600080fd5b5061047861079d366004614db0565b6119da565b3480156107ae57600080fd5b506104786107bd366004614db0565b611a37565b3480156107ce57600080fd5b50610420611a8b565b3480156107e357600080fd5b506104206107f2366004614db0565b611ae6565b34801561080357600080fd5b506103cd610812366004614d80565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561084957600080fd5b506104786108583660046152f2565b611b06565b34801561086957600080fd5b506103f2611b24565b34801561087e57600080fd5b5061047861088d366004615334565b611b32565b34801561089e57600080fd5b50604051600281526020016103a4565b3480156108ba57600080fd5b506104786108c936600461537a565b611c0b565b3480156108da57600080fd5b5061039a600081565b3480156108ef57600080fd5b506104786108fe3660046153ec565b611f68565b34801561090f57600080fd5b5061047861091e36600461541a565b611f7a565b34801561092f57600080fd5b5061094361093e3660046154ac565b6122e1565b6040516103a491906154e2565b34801561095c57600080fd5b5061047861096b366004615334565b6123d6565b34801561097c57600080fd5b50610197546001600160a01b03811690600160a01b900461ffff1661060e565b6104786109aa366004615544565b612446565b3480156109bb57600080fd5b5061039a6109ca366004614d4a565b6101a16020526000908152604090205481565b3480156109e957600080fd5b5061039a6109f8366004614d4a565b61019b6020526000908152604090205481565b348015610a1757600080fd5b5061039a610a26366004614d80565b6101a060209081526000928352604080842090915290825290205481565b348015610a5057600080fd5b50610420610a5f366004614d4a565b61019e602052600090815260409020546001600160a01b031681565b348015610a8757600080fd5b5061039a610a96366004614d4a565b612662565b348015610aa757600080fd5b506a44726f704552433131353560a81b61039a565b348015610ac857600080fd5b50610196546001600160a01b03811690600160a01b900461ffff1661060e565b348015610af457600080fd5b50610b08610b03366004614db0565b61267a565b6040516103a49190600061010082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c08301526001600160a01b0360e08401511660e083015292915050565b348015610b7e57600080fd5b50610478610b8d366004614d80565b612750565b348015610b9e57600080fd5b50610478610bad3660046155f1565b612775565b348015610bbe57600080fd5b506103f2612a09565b348015610bd357600080fd5b506106f6610be2366004614d4a565b61019d602052600090815260409020805460019091015482565b348015610c0857600080fd5b506103cd610c17366004615704565b6001600160a01b0391821660009081526101606020908152604080832093909416825291909152205460ff1690565b348015610c5257600080fd5b50610478610c61366004615732565b612a17565b348015610c7257600080fd5b50610478610c8136600461579b565b612ab6565b60006001600160a01b038316610cf65760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815261015f602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610d2d82612b5d565b80610d1c5750506001600160e01b03191663152a902d60e11b1490565b6101918054610d58906157d0565b80601f0160208091040260200160405190810160405280929190818152602001828054610d84906157d0565b8015610dd15780601f10610da657610100808354040283529160200191610dd1565b820191906000526020600020905b815481529060010190602001808311610db457829003601f168201915b505050505081565b606060005b61019954811015610e84576101998181548110610dfd57610dfd61580b565b9060005260206000200154831015610e725761019a60006101998381548110610e2857610e2861580b565b90600052602060002001548152602001908152602001600020610e4a84612b9d565b604051602001610e5b92919061583d565b604051602081830303815290604052915050919050565b610e7d6001826158f1565b9050610dde565b5050604080516020810190915260008152919050565b6000610ea581612c9b565b6001600160a01b03821660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604090205460ff16610f2c5760405162461bcd60e51b815260206004820152601b60248201527f6e6577206f776e6572206e6f74206d6f64756c652061646d696e2e00000000006044820152606401610ced565b610193546040516001600160a01b038085169216907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35061019380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610f9681612c9b565b612710821115610fd85760405162461bcd60e51b815260206004820152600d60248201526c313839901e1e9018981818181760991b6044820152606401610ced565b61019680546001600160b01b031916600160a01b61ffff8516026001600160a01b031916176001600160a01b0385169081179091556040518381527fe2497bd806ec41a6e0dd992c29a72efc0ef8fec9092d1978fd4a1e00b2f18304906020015b60405180910390a2505050565b600061105181612c9b565b600083815261019e602090815260409182902080546001600160a01b0319166001600160a01b038616908117909155915191825284917f359479172ba65a6639b0df237f704e030498cb7135d5e89b56f598bd1d84b0169101611039565b6000806000806110be86611347565b90945084925061ffff1690506127106110d78287615909565b6110e1919061593e565b925050509250929050565b6110f4612caf565b6001600160a01b0316856001600160a01b0316148061111a575061111a85610c17612caf565b61117e5760405162461bcd60e51b815260206004820152602f60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526e195c881b9bdc88185c1c1c9bdd9959608a1b6064820152608401610ced565b61118b8585858585612cb9565b5050505050565b600082815260fb60205260409020600101546111ad81612c9b565b6111b78383612f35565b505050565b6111c4612caf565b6001600160a01b0316816001600160a01b03161461124a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ced565b6112548282612f58565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661128281612c9b565b61019454600061129286836158f1565b610194819055600081815261019a602052604090209091506112b5908686614b4e565b506101998054600181810183556000929092527f960942b7bcefc06c4573016a89cb45882597f73bb18f9afb0df2c0e01c496e1b018290557f4e6c698792b8dfb7c94c60c7e9e91f82932832d5e1ec0870ed42cf674e6af44590839061131b89836158f1565b6113259190615952565b87876040516113379493929190615969565b60405180910390a1505050505050565b600081815261019f60209081526040808320815180830190925280546001600160a01b03168083526001909101549282019290925282911561138f57805160208201516113aa565b610197546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b606081518351146114195760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ced565b6000835167ffffffffffffffff81111561143557611435614dd2565b60405190808252806020026020018201604052801561145e578160200160208202803683370190505b50905060005b84518110156114d6576114a98582815181106114825761148261580b565b602002602001015185838151811061149c5761149c61580b565b6020026020010151610c86565b8282815181106114bb576114bb61580b565b60209081029190910101526114cf816159a6565b9050611464565b509392505050565b600081815261019d602052604081206001810154815483916114ff916158f1565b90505b81548111156115595760028201600061151c600184615952565b81526020019081526020016000206000015442106115475761153f600182615952565b949350505050565b80611551816159c1565b915050611502565b5060405162461bcd60e51b815260206004820152601960248201527f6e6f20616374697665206d696e7420636f6e646974696f6e2e000000000000006044820152606401610ced565b60006115ad81612c9b565b6127108211156115f45760405162461bcd60e51b815260206004820152601260248201527165786365656420726f79616c74792062707360701b6044820152606401610ced565b61019780546001600160a01b0385166001600160b01b03199091168117600160a01b61ffff861602179091556040518381527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb90602001611039565b600083815261019d602090815260408083208584526003810183528184206001600160a01b03861685528352818420548685526002909101909252909120600401548101818110156116a157506000195b935093915050565b6116b1612caf565b6001600160a01b0316836001600160a01b031614806116d757506116d783610c17612caf565b6117365760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152691030b8383937bb32b21760b11b6064820152608401610ced565b6111b7838383612f7b565b600061174c81612c9b565b61019580546001600160a01b0319166001600160a01b0384169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a25050565b600085815261019d602090815260408083208a8452600290810183528184208251610100810184528154815260018201549481019490945290810154918301919091526003810154606083015260048101546080830152600581015460a08301819052600682015460c08401526007909101546001600160a01b031660e0830152829190156119cd5761189d86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060a08301516040516bffffffffffffffffffffffff1960608e901b16602082015260348101889052605401604051602081830303815290604052805190602001206131dc565b9093509150826118ef5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420696e2077686974656c6973742e0000000000000000000000000000006044820152606401610ced565b600088815261019d602090815260408083208d8452600401825280832072ffffffffffffffffffffffffffffffffffffff60088e901c168452909152902054600160ff8b161b16156119745760405162461bcd60e51b815260206004820152600e60248201526d383937b7b31031b630b4b6b2b21760911b6044820152606401610ced565b8315806119815750838711155b6119cd5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964207175616e746974792070726f6f662e0000000000000000006044820152606401610ced565b5097509795505050505050565b60006119e581612c9b565b60008381526101a1602090815260409182902084905581518581529081018490527f07fa2d0eb2fe8b8e6fbee6073cf9d84659d6db054d221579a0373ae29bc9d73d91015b60405180910390a1505050565b6000611a4281612c9b565b600083815261019c602090815260409182902084905581518581529081018490527fc58cd6132bb46df23d468939c03dd023b74b509aaa6b04c39d5a6461c65963bd9101611a2a565b610193546001600160a01b031660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16611ad35750600090565b610193546001600160a01b03165b905090565b600082815261012d60205260408120611aff90836132aa565b9392505050565b6000611b1181612c9b565b611b1e6101988484614b4e565b50505050565b6101928054610d58906157d0565b6000611b3d81612c9b565b612710821115611b845760405162461bcd60e51b815260206004820152601260248201527165786365656420726f79616c74792062707360701b6044820152606401610ced565b6040805180820182526001600160a01b03858116808352602080840187815260008a815261019f8352869020945185546001600160a01b031916941693909317845591516001909301929092559151848152909186917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d910160405180910390a350505050565b600085815261019d602090815260408083208a845260029081018352928190208151610100810183528154815260018201549381019390935292830154908201526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b0390811660e08301819052908516148015611c9f57508060c0015183145b611cf75760405162461bcd60e51b8152602060048201526024808201527f696e76616c69642063757272656e6379206f722070726963652073706563696660448201526334b2b21760e11b6064820152608401610ced565b600085118015611d135750811580611d13575080606001518511155b611d5f5760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207175616e7469747920636c61696d65642e000000000000006044820152606401610ced565b8060200151858260400151611d7491906158f1565b1115611dc25760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178206d696e7420737570706c792e0000000000000000006044820152606401610ced565b600086815261019c60205260409020541580611e045750600086815261019c602090815260408083205461019b90925290912054611e019087906158f1565b11155b611e505760405162461bcd60e51b815260206004820152601760248201527f657863656564206d617820746f74616c20737570706c790000000000000000006044820152606401610ced565b60008681526101a160205260409020541580611ea3575060008681526101a160209081526040808320546101a083528184206001600160a01b038c16855290925290912054611ea09087906158f1565b11155b611eef5760405162461bcd60e51b815260206004820152601d60248201527f65786365656420636c61696d206c696d697420666f722077616c6c65740000006044820152606401610ced565b600080611efd888b8b611650565b915091508160001480611f105750804210155b611f5c5760405162461bcd60e51b815260206004820152601160248201527f63616e6e6f7420636c61696d207965742e0000000000000000000000000000006044820152606401610ced565b50505050505050505050565b611254611f73612caf565b83836132b6565b6000611f8581612c9b565b600085815261019d6020526040902080546001820154818515611faf57611fac82846158f1565b90505b600184018790558084556000805b8881101561217d57801580611fed5750898982818110611fdf57611fdf61580b565b905061010002016000013582105b61204c5760405162461bcd60e51b815260206004820152602a60248201527f737461727454696d657374616d70206d75737420626520696e20617363656e6460448201526934b7339037b93232b91760b11b6064820152608401610ced565b6000600287018161205d84876158f1565b81526020019081526020016000206002015490508a8a838181106120835761208361580b565b90506101000201602001358111156120dd5760405162461bcd60e51b815260206004820152601a60248201527f6d617820737570706c7920636c61696d656420616c72656164790000000000006044820152606401610ced565b8a8a838181106120ef576120ef61580b565b90506101000201876002016000848761210891906158f1565b8152602001908152602001600020818161212291906159d8565b5081905060028801600061213685886158f1565b81526020810191909152604001600020600201558a8a8381811061215c5761215c61580b565b90506101000201600001359250508080612175906159a6565b915050611fbd565b5086156121ff57835b828110156121f9576000818152600280880160209081526040832083815560018101849055918201839055600382018390556004808301849055600583018490556006830193909355600790910180546001600160a01b03191690559087019052806121f1816159a6565b915050612186565b5061229b565b8783111561229b57875b838110156122995760028601600061222183866158f1565b81526020810191909152604001600090812081815560018101829055600281018290556003810182905560048082018390556005820183905560068201839055600790910180546001600160a01b031916905587019061228183866158f1565b81526020015280612291816159a6565b915050612209565b505b897f7822655b74d50f461cbd7ca5dfc8b5e48b21fa2157bd7d277888fccce85af2ae8a8a6040516122cd929190615a49565b60405180910390a250505050505050505050565b60608167ffffffffffffffff8111156122fc576122fc614dd2565b60405190808252806020026020018201604052801561232f57816020015b606081526020019060019003908161231a5790505b50905060005b828110156123cf5761239f308585848181106123535761235361580b565b90506020028101906123659190615ae0565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061339892505050565b8282815181106123b1576123b161580b565b602002602001018190525080806123c7906159a6565b915050612335565b5092915050565b60006123e181612c9b565b60008481526101a0602090815260408083206001600160a01b0387168085529083529281902085905580518781529182018590527f9260cdce30c9abdb65593c1a903e40c87feb886a28aa4335a6695547988aab2f910160405180910390a250505050565b600260015414156124995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ced565b60026001553360009081526065602052604090205460ff16806124cb5750326124c0612caf565b6001600160a01b0316145b6124fd5760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610ced565b6000612508886114de565b9050600061252282612518612caf565b8b8b898989611798565b5090506000831580612552575060008a815261019d60209081526040808320868452600201909152902060050154155b905061256a83612560612caf565b8c8c8c8c87611c0b565b8180156125775750600084115b156125d9576125d9612587612caf565b60008c815261019d60209081526040808320888452600401825280832072ffffffffffffffffffffffffffffffffffffff600886901c16845290915290208054600160ff9093169290921b9091179055565b6125e58989898d61348c565b6125f18b848c8c6135d5565b6125f9612caf565b6001600160a01b03168a847f4f72e6585331094d368e469f11198272039d08cbddfcda1577e192687a83afb68e8d6040516126499291906001600160a01b03929092168252602082015260400190565b60405180910390a4505060018055505050505050505050565b600081815261012d60205260408120610d1c906136c5565b6126ce6040518061010001604052806000815260200160008152602001600081526020016000815260200160008152602001600080191681526020016000815260200160006001600160a01b031681525090565b50600091825261019d6020908152604080842092845260029283018252928390208351610100810185528154815260018201549281019290925291820154928101929092526003810154606083015260048101546080830152600581015460a0830152600681015460c0830152600701546001600160a01b031660e082015290565b600082815260fb602052604090206001015461276b81612c9b565b6111b78383612f58565b600054610100900460ff16158080156127955750600054600160ff909116105b806127af5750303b1580156127af575060005460ff166001145b6128125760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610ced565b6000805460ff191660011790558015612835576000805461ff0019166101001790555b61283d6136cf565b61284687613700565b61285e6040518060200160405280600081525061378f565b8951612872906101919060208d0190614bd2565b508851612887906101929060208c0190614bd2565b5061019780546001600160a01b038781166001600160b01b031990921691909117600160a01b61ffff8816021790915561019680546001600160a01b031990811685841617909155610195805490911691881691909117905587516128f4906101989060208b0190614bd2565b50610196805461ffff60a01b1916600160a01b61ffff86160217905561019380546001600160a01b0319166001600160a01b038d1617905561293760008c6137bf565b6129617f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68c6137bf565b61298b7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c8c6137bf565b6129b67f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c60006137bf565b80156129fc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6101988054610d58906157d0565b612a1f612caf565b6001600160a01b0316856001600160a01b03161480612a455750612a4585610c17612caf565b612aa95760405162461bcd60e51b815260206004820152602f60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526e195c881b9bdc88185c1c1c9bdd9959608a1b6064820152608401610ced565b61118b85858585856137c9565b612abe612caf565b6001600160a01b0316836001600160a01b03161480612ae45750612ae483610c17612caf565b612b435760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152691030b8383937bb32b21760b11b6064820152608401610ced565b6111b7838383613993565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b1480612b8e57506001600160e01b031982166303a24d0760e21b145b80610d1c5750610d1c82613b34565b606081612bc15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612beb5780612bd5816159a6565b9150612be49050600a8361593e565b9150612bc5565b60008167ffffffffffffffff811115612c0657612c06614dd2565b6040519080825280601f01601f191660200182016040528015612c30576020820181803683370190505b5090505b841561153f57612c45600183615952565b9150612c52600a86615b27565b612c5d9060306158f1565b60f81b818381518110612c7257612c7261580b565b60200101906001600160f81b031916908160001a905350612c94600a8661593e565b9450612c34565b612cac81612ca7612caf565b613b59565b50565b6000611ae1613bd9565b8151835114612d1b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610ced565b6001600160a01b038416612d7f5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610ced565b6000612d89612caf565b9050612d99818787878787613c06565b60005b8451811015612ec7576000858281518110612db957612db961580b565b602002602001015190506000858381518110612dd757612dd761580b565b602090810291909101810151600084815261015f835260408082206001600160a01b038e168352909352919091205490915081811015612e6c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610ced565b600083815261015f602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612eac9084906158f1565b9250508190555050505080612ec0906159a6565b9050612d9c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612f17929190615b3b565b60405180910390a4612f2d818787878787613e64565b505050505050565b612f3f828261400a565b600082815261012d602052604090206111b790826140ad565b612f6282826140c2565b600082815261012d602052604090206111b79082614163565b6001600160a01b038316612fdd5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ced565b805182511461303f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610ced565b6000613049612caf565b905061306981856000868660405180602001604052806000815250613c06565b60005b835181101561316f5760008482815181106130895761308961580b565b6020026020010151905060008483815181106130a7576130a761580b565b602090810291909101810151600084815261015f835260408082206001600160a01b038c1683529093529190912054909150818110156131355760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ced565b600092835261015f602090815260408085206001600160a01b038b1686529091529092209103905580613167816159a6565b91505061306c565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516131c0929190615b3b565b60405180910390a4604080516020810190915260009052611b1e565b6000808281805b875181101561329e576131f7600283615909565b9150600088828151811061320d5761320d61580b565b6020026020010151905080841161324f57604080516020810186905290810182905260600160405160208183030381529060405280519060200120935061328b565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361328891906158f1565b92505b5080613296816159a6565b9150506131e3565b50941495939450505050565b6000611aff8383614178565b816001600160a01b0316836001600160a01b0316141561332a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ced565b6001600160a01b0383811660008181526101606020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6134005760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ced565b600080846001600160a01b03168460405161341b9190615b60565b600060405180830381855af49150503d8060008114613456576040519150601f19603f3d011682016040523d82523d6000602084013e61345b565b606091505b50915091506134838282604051806060016040528060278152602001615dd4602791396141a2565b95945050505050565b8161349657611b1e565b60006134a28386615909565b61019654909150600090612710906134c590600160a01b900461ffff1684615909565b6134cf919061593e565b90506001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415613545578134146135455760405162461bcd60e51b815260206004820152601660248201527f6d7573742073656e6420746f74616c2070726963652e000000000000000000006044820152606401610ced565b600083815261019e60205260408120546001600160a01b03161561358157600084815261019e60205260409020546001600160a01b031661358f565b610195546001600160a01b03165b90506135b08661359d612caf565b610196546001600160a01b0316856141db565b6135cc866135bc612caf565b836135c78688615952565b6141db565b50505050505050565b600082815261019d60209081526040808320868452600290810190925282200180548392906136059084906158f1565b9091555050600082815261019d6020908152604080832086845260030190915281204291613631612caf565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550806101a060008481526020019081526020016000206000613674612caf565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546136a391906158f1565b92505081905550611b1e84838360405180602001604052806000815250614225565b6000610d1c825490565b600054610100900460ff166136f65760405162461bcd60e51b8152600401610ced90615b7c565b6136fe61434d565b565b600054610100900460ff166137275760405162461bcd60e51b8152600401610ced90615b7c565b60005b81518110156112545760016065600084848151811061374b5761374b61580b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613787816159a6565b91505061372a565b600054610100900460ff166137b65760405162461bcd60e51b8152600401610ced90615b7c565b612cac8161437a565b6112548282612f35565b6001600160a01b03841661382d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610ced565b6000613837612caf565b905060006138448561438e565b905060006138518561438e565b9050613861838989858589613c06565b600086815261015f602090815260408083206001600160a01b038c168452909152902054858110156138e85760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610ced565b600087815261015f602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906139289084906158f1565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613988848a8a8a8a8a6143d9565b505050505050505050565b6001600160a01b0383166139f55760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ced565b60006139ff612caf565b90506000613a0c8461438e565b90506000613a198461438e565b9050613a3983876000858560405180602001604052806000815250613c06565b600085815261015f602090815260408083206001600160a01b038a16845290915290205484811015613ab95760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ced565b600086815261015f602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526135cc565b60006001600160e01b03198216635a05180f60e01b1480610d1c5750610d1c826144d5565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1661125457613b97816001600160a01b0316601461450a565b613ba283602061450a565b604051602001613bb3929190615bc7565b60408051601f198184030181529082905262461bcd60e51b8252610ced91600401614d37565b3360009081526065602052604081205460ff1615613bfe575060131936013560601c90565b503390565b90565b600080527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a13126020527f70e64e82d0337f3fa9071fdb3266f859725ed1fc29697b2e6e986b76cffbfb085460ff16158015613c6857506001600160a01b03851615155b8015613c7c57506001600160a01b03841615155b15613d56576001600160a01b03851660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff1680613cfe57506001600160a01b03841660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff165b613d565760405162461bcd60e51b8152602060048201526024808201527f7265737472696374656420746f205452414e534645525f524f4c4520686f6c6460448201526332b9399760e11b6064820152608401610ced565b6001600160a01b038516613dde5760005b8351811015613ddc57828181518110613d8257613d8261580b565b602002602001015161019b6000868481518110613da157613da161580b565b602002602001015181526020019081526020016000206000828254613dc691906158f1565b90915550613dd59050816159a6565b9050613d67565b505b6001600160a01b038416612f2d5760005b83518110156135cc57828181518110613e0a57613e0a61580b565b602002602001015161019b6000868481518110613e2957613e2961580b565b602002602001015181526020019081526020016000206000828254613e4e9190615952565b90915550613e5d9050816159a6565b9050613def565b6001600160a01b0384163b15612f2d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ea89089908990889088908890600401615c48565b6020604051808303816000875af1925050508015613ee3575060408051601f3d908101601f19168201909252613ee091810190615ca6565b60015b613f9957613eef615cc3565b806308c379a01415613f295750613f04615cde565b80613f0f5750613f2b565b8060405162461bcd60e51b8152600401610ced9190614d37565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610ced565b6001600160e01b0319811663bc197c8160e01b146135cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610ced565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1661125457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055614069612caf565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611aff836001600160a01b0384166146b3565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff161561125457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff1916905561411f612caf565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611aff836001600160a01b038416614702565b600082600001828154811061418f5761418f61580b565b9060005260206000200154905092915050565b606083156141b1575081611aff565b8251156141c15782518084602001fd5b8160405162461bcd60e51b8152600401610ced9190614d37565b806141e557611b1e565b6001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156142195761421482826147f5565b611b1e565b611b1e84848484614898565b6001600160a01b0384166142855760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610ced565b600061428f612caf565b9050600061429c8561438e565b905060006142a98561438e565b90506142ba83600089858589613c06565b600086815261015f602090815260408083206001600160a01b038b168452909152812080548792906142ed9084906158f1565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46135cc836000898989896143d9565b600054610100900460ff166143745760405162461bcd60e51b8152600401610ced90615b7c565b60018055565b805161125490610161906020840190614bd2565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106143c8576143c861580b565b602090810291909101015292915050565b6001600160a01b0384163b15612f2d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061441d9089908990889088908890600401615d68565b6020604051808303816000875af1925050508015614458575060408051601f3d908101601f1916820190925261445591810190615ca6565b60015b61446457613eef615cc3565b6001600160e01b0319811663f23a6e6160e01b146135cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610ced565b60006001600160e01b03198216637965db0b60e01b1480610d1c57506301ffc9a760e01b6001600160e01b0319831614610d1c565b60606000614519836002615909565b6145249060026158f1565b67ffffffffffffffff81111561453c5761453c614dd2565b6040519080825280601f01601f191660200182016040528015614566576020820181803683370190505b509050600360fc1b816000815181106145815761458161580b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106145b0576145b061580b565b60200101906001600160f81b031916908160001a90535060006145d4846002615909565b6145df9060016158f1565b90505b6001811115614664577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106146205761462061580b565b1a60f81b8282815181106146365761463661580b565b60200101906001600160f81b031916908160001a90535060049490941c9361465d816159c1565b90506145e2565b508315611aff5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ced565b60008181526001830160205260408120546146fa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d1c565b506000610d1c565b600081815260018301602052604081205480156147eb576000614726600183615952565b855490915060009061473a90600190615952565b905081811461479f57600086600001828154811061475a5761475a61580b565b906000526020600020015490508087600001848154811061477d5761477d61580b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806147b0576147b0615da0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d1c565b6000915050610d1c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614842576040519150601f19603f3d011682016040523d82523d6000602084013e614847565b606091505b50509050806111b75760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610ced565b816001600160a01b0316836001600160a01b031614156148b757611b1e565b6001600160a01b0383163014156148dc576142146001600160a01b03851683836148f1565b611b1e6001600160a01b038516848484614969565b6040516001600160a01b0383166024820152604481018290526111b790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526149a1565b6040516001600160a01b0380851660248301528316604482015260648101829052611b1e9085906323b872dd60e01b9060840161491d565b60006149f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a739092919063ffffffff16565b8051909150156111b75780806020019051810190614a149190615db6565b6111b75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ced565b606061153f8484600085856001600160a01b0385163b614ad55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ced565b600080866001600160a01b03168587604051614af19190615b60565b60006040518083038185875af1925050503d8060008114614b2e576040519150601f19603f3d011682016040523d82523d6000602084013e614b33565b606091505b5091509150614b438282866141a2565b979650505050505050565b828054614b5a906157d0565b90600052602060002090601f016020900481019282614b7c5760008555614bc2565b82601f10614b955782800160ff19823516178555614bc2565b82800160010185558215614bc2579182015b82811115614bc2578235825591602001919060010190614ba7565b50614bce929150614c46565b5090565b828054614bde906157d0565b90600052602060002090601f016020900481019282614c005760008555614bc2565b82601f10614c1957805160ff1916838001178555614bc2565b82800160010185558215614bc2579182015b82811115614bc2578251825591602001919060010190614c2b565b5b80821115614bce5760008155600101614c47565b6001600160a01b0381168114612cac57600080fd5b8035614c7b81614c5b565b919050565b60008060408385031215614c9357600080fd5b8235614c9e81614c5b565b946020939093013593505050565b6001600160e01b031981168114612cac57600080fd5b600060208284031215614cd457600080fd5b8135611aff81614cac565b60005b83811015614cfa578181015183820152602001614ce2565b83811115611b1e5750506000910152565b60008151808452614d23816020860160208601614cdf565b601f01601f19169290920160200192915050565b602081526000611aff6020830184614d0b565b600060208284031215614d5c57600080fd5b5035919050565b600060208284031215614d7557600080fd5b8135611aff81614c5b565b60008060408385031215614d9357600080fd5b823591506020830135614da581614c5b565b809150509250929050565b60008060408385031215614dc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715614e0e57614e0e614dd2565b6040525050565b600067ffffffffffffffff821115614e2f57614e2f614dd2565b5060051b60200190565b600082601f830112614e4a57600080fd5b81356020614e5782614e15565b604051614e648282614de8565b83815260059390931b8501820192828101915086841115614e8457600080fd5b8286015b84811015614e9f5780358352918301918301614e88565b509695505050505050565b600082601f830112614ebb57600080fd5b813567ffffffffffffffff811115614ed557614ed5614dd2565b604051614eec601f8301601f191660200182614de8565b818152846020838601011115614f0157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614f3657600080fd5b8535614f4181614c5b565b94506020860135614f5181614c5b565b9350604086013567ffffffffffffffff80821115614f6e57600080fd5b614f7a89838a01614e39565b94506060880135915080821115614f9057600080fd5b614f9c89838a01614e39565b93506080880135915080821115614fb257600080fd5b50614fbf88828901614eaa565b9150509295509295909350565b60008083601f840112614fde57600080fd5b50813567ffffffffffffffff811115614ff657600080fd5b60208301915083602082850101111561500e57600080fd5b9250929050565b60008060006040848603121561502a57600080fd5b83359250602084013567ffffffffffffffff81111561504857600080fd5b61505486828701614fcc565b9497909650939450505050565b600082601f83011261507257600080fd5b8135602061507f82614e15565b60405161508c8282614de8565b83815260059390931b85018201928281019150868411156150ac57600080fd5b8286015b84811015614e9f5780356150c381614c5b565b83529183019183016150b0565b600080604083850312156150e357600080fd5b823567ffffffffffffffff808211156150fb57600080fd5b61510786838701615061565b9350602085013591508082111561511d57600080fd5b5061512a85828601614e39565b9150509250929050565b600081518084526020808501945080840160005b8381101561516457815187529582019590820190600101615148565b509495945050505050565b602081526000611aff6020830184615134565b60008060006060848603121561519757600080fd5b833592506020840135915060408401356151b081614c5b565b809150509250925092565b6000806000606084860312156151d057600080fd5b83356151db81614c5b565b9250602084013567ffffffffffffffff808211156151f857600080fd5b61520487838801614e39565b9350604086013591508082111561521a57600080fd5b5061522786828701614e39565b9150509250925092565b60008083601f84011261524357600080fd5b50813567ffffffffffffffff81111561525b57600080fd5b6020830191508360208260051b850101111561500e57600080fd5b600080600080600080600060c0888a03121561529157600080fd5b8735965060208801356152a381614c5b565b95506040880135945060608801359350608088013567ffffffffffffffff8111156152cd57600080fd5b6152d98a828b01615231565b989b979a5095989497959660a090950135949350505050565b6000806020838503121561530557600080fd5b823567ffffffffffffffff81111561531c57600080fd5b61532885828601614fcc565b90969095509350505050565b60008060006060848603121561534957600080fd5b83359250602084013561535b81614c5b565b929592945050506040919091013590565b8015158114612cac57600080fd5b600080600080600080600060e0888a03121561539557600080fd5b8735965060208801356153a781614c5b565b9550604088013594506060880135935060808801356153c581614c5b565b925060a0880135915060c08801356153dc8161536c565b8091505092959891949750929550565b600080604083850312156153ff57600080fd5b823561540a81614c5b565b91506020830135614da58161536c565b6000806000806060858703121561543057600080fd5b84359350602085013567ffffffffffffffff8082111561544f57600080fd5b818701915087601f83011261546357600080fd5b81358181111561547257600080fd5b8860208260081b850101111561548757600080fd5b60208301955080945050505060408501356154a18161536c565b939692955090935050565b600080602083850312156154bf57600080fd5b823567ffffffffffffffff8111156154d657600080fd5b61532885828601615231565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561553757603f19888603018452615525858351614d0b565b94509285019290850190600101615509565b5092979650505050505050565b60008060008060008060008060e0898b03121561556057600080fd5b883561556b81614c5b565b97506020890135965060408901359550606089013561558981614c5b565b94506080890135935060a089013567ffffffffffffffff8111156155ac57600080fd5b6155b88b828c01615231565b999c989b50969995989497949560c00135949350505050565b80356fffffffffffffffffffffffffffffffff81168114614c7b57600080fd5b6000806000806000806000806000806101408b8d03121561561157600080fd5b61561a8b614c70565b995060208b013567ffffffffffffffff8082111561563757600080fd5b6156438e838f01614eaa565b9a5060408d013591508082111561565957600080fd5b6156658e838f01614eaa565b995060608d013591508082111561567b57600080fd5b6156878e838f01614eaa565b985060808d013591508082111561569d57600080fd5b506156aa8d828e01615061565b9650506156b960a08c01614c70565b94506156c760c08c01614c70565b93506156d560e08c016155d1565b92506156e46101008c016155d1565b91506156f36101208c01614c70565b90509295989b9194979a5092959850565b6000806040838503121561571757600080fd5b823561572281614c5b565b91506020830135614da581614c5b565b600080600080600060a0868803121561574a57600080fd5b853561575581614c5b565b9450602086013561576581614c5b565b93506040860135925060608601359150608086013567ffffffffffffffff81111561578f57600080fd5b614fbf88828901614eaa565b6000806000606084860312156157b057600080fd5b83356157bb81614c5b565b95602085013595506040909401359392505050565b600181811c908216806157e457607f821691505b6020821081141561580557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008151615833818560208601614cdf565b9290920192915050565b600080845481600182811c91508083168061585957607f831692505b602080841082141561587957634e487b7160e01b86526022600452602486fd5b81801561588d576001811461589e576158cb565b60ff198616895284890196506158cb565b60008b81526020902060005b868110156158c35781548b8201529085019083016158aa565b505084890196505b5050505050506134838185615821565b634e487b7160e01b600052601160045260246000fd5b60008219821115615904576159046158db565b500190565b6000816000190483118215151615615923576159236158db565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261594d5761594d615928565b500490565b600082821015615964576159646158db565b500390565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60006000198214156159ba576159ba6158db565b5060010190565b6000816159d0576159d06158db565b506000190190565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c082013560068201556007810160e0830135615a2a81614c5b565b81546001600160a01b0319166001600160a01b03919091161790555050565b6020808252818101839052600090604080840186845b87811015615ad3578135835284820135858401528382013584840152606080830135908401526080808301359084015260a0808301359084015260c0808301359084015260e080830135615ab281614c5b565b6001600160a01b031690840152610100928301929190910190600101615a5f565b5090979650505050505050565b6000808335601e19843603018112615af757600080fd5b83018035915067ffffffffffffffff821115615b1257600080fd5b60200191503681900382131561500e57600080fd5b600082615b3657615b36615928565b500690565b604081526000615b4e6040830185615134565b82810360208401526134838185615134565b60008251615b72818460208701614cdf565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615bff816017850160208801614cdf565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615c3c816028840160208801614cdf565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152615c7460a0830186615134565b8281036060840152615c868186615134565b90508281036080840152615c9a8185614d0b565b98975050505050505050565b600060208284031215615cb857600080fd5b8151611aff81614cac565b600060033d1115613c035760046000803e5060005160e01c90565b600060443d1015615cec5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615d1c57505050505090565b8285019150815181811115615d345750505050505090565b843d8701016020828501011115615d4e5750505050505090565b615d5d60208286010187614de8565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152614b4360a0830184614d0b565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615dc857600080fd5b8151611aff8161536c56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c6e781d0fe0e40709b5790973bc8f2b3b672388c1903baed0590de6977e9740964736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106103755760003560e01c80639010d07c116101d1578063b79cade411610102578063d45b28d7116100a0578063e9703d251161006f578063e9703d2514610bc7578063e985e9c514610bfc578063f242432a14610c46578063f5298aca14610c6657600080fd5b8063d45b28d714610ae8578063d547741f14610b72578063e159163414610b92578063e8a3d48514610bb257600080fd5b8063c7337d6b116100dc578063c7337d6b14610a44578063ca15c87314610a7b578063cb2ef6f714610a9b578063d45573f614610abc57600080fd5b8063b79cade4146109af578063bd85b039146109dd578063c16ce64e14610a0b57600080fd5b8063a217fddf1161016f578063ac9650d811610149578063ac9650d814610923578063b101440014610950578063b24f2d3914610970578063b4c5faa11461099c57600080fd5b8063a217fddf146108ce578063a22cb465146108e3578063ab073c221461090357600080fd5b806395d89b41116101ab57806395d89b411461085d5780639bcf7a1514610872578063a0a8e46014610892578063a157f71c146108ae57600080fd5b80639010d07c146107d757806391d14854146107f7578063938e3d7b1461083d57600080fd5b80633b1475a7116102ab578063622a6c311161024957806371d53a5b1161022357806371d53a5b1461074b578063832c3a581461078257806387198cf2146107a25780638da5cb5b146107c257600080fd5b8063622a6c31146106d65780636b20c4541461070b5780636f4f28371461072b57600080fd5b80634e1273f4116102855780634e1273f414610630578063572b6c051461065d5780635ab063e814610696578063600dd5ea146106b657600080fd5b80633b1475a7146105b757806347158264146105ce5780634cc157df146105ee57600080fd5b8063248a9ca3116103185780632a55205a116102f25780632a55205a146105185780632eb2c2d6146105575780632f2ff15d1461057757806336568abe1461059757600080fd5b8063248a9ca31461049a57806324aaffaa146104ca57806329c49b9b146104f857600080fd5b8063079fe40e11610354578063079fe40e146103ff5780630e89341c1461043857806313af4035146104585780631e7ac4881461047a57600080fd5b8062fdd58e1461037a57806301ffc9a7146103ad57806306fdde03146103dd575b600080fd5b34801561038657600080fd5b5061039a610395366004614c80565b610c86565b6040519081526020015b60405180910390f35b3480156103b957600080fd5b506103cd6103c8366004614cc2565b610d22565b60405190151581526020016103a4565b3480156103e957600080fd5b506103f2610d4a565b6040516103a49190614d37565b34801561040b57600080fd5b5061019554610420906001600160a01b031681565b6040516001600160a01b0390911681526020016103a4565b34801561044457600080fd5b506103f2610453366004614d4a565b610dd9565b34801561046457600080fd5b50610478610473366004614d63565b610e9a565b005b34801561048657600080fd5b50610478610495366004614c80565b610f8b565b3480156104a657600080fd5b5061039a6104b5366004614d4a565b600090815260fb602052604090206001015490565b3480156104d657600080fd5b5061039a6104e5366004614d4a565b61019c6020526000908152604090205481565b34801561050457600080fd5b50610478610513366004614d80565b611046565b34801561052457600080fd5b50610538610533366004614db0565b6110af565b604080516001600160a01b0390931683526020830191909152016103a4565b34801561056357600080fd5b50610478610572366004614f1e565b6110ec565b34801561058357600080fd5b50610478610592366004614d80565b611192565b3480156105a357600080fd5b506104786105b2366004614d80565b6111bc565b3480156105c357600080fd5b5061039a6101945481565b3480156105da57600080fd5b506104786105e9366004615015565b611258565b3480156105fa57600080fd5b5061060e610609366004614d4a565b611347565b604080516001600160a01b03909316835261ffff9091166020830152016103a4565b34801561063c57600080fd5b5061065061064b3660046150d0565b6113b4565b6040516103a4919061516f565b34801561066957600080fd5b506103cd610678366004614d63565b6001600160a01b031660009081526065602052604090205460ff1690565b3480156106a257600080fd5b5061039a6106b1366004614d4a565b6114de565b3480156106c257600080fd5b506104786106d1366004614c80565b6115a2565b3480156106e257600080fd5b506106f66106f1366004615182565b611650565b604080519283526020830191909152016103a4565b34801561071757600080fd5b506104786107263660046151bb565b6116a9565b34801561073757600080fd5b50610478610746366004614d63565b611741565b34801561075757600080fd5b5061076b610766366004615276565b611798565b6040805192151583526020830191909152016103a4565b34801561078e57600080fd5b5061047861079d366004614db0565b6119da565b3480156107ae57600080fd5b506104786107bd366004614db0565b611a37565b3480156107ce57600080fd5b50610420611a8b565b3480156107e357600080fd5b506104206107f2366004614db0565b611ae6565b34801561080357600080fd5b506103cd610812366004614d80565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561084957600080fd5b506104786108583660046152f2565b611b06565b34801561086957600080fd5b506103f2611b24565b34801561087e57600080fd5b5061047861088d366004615334565b611b32565b34801561089e57600080fd5b50604051600281526020016103a4565b3480156108ba57600080fd5b506104786108c936600461537a565b611c0b565b3480156108da57600080fd5b5061039a600081565b3480156108ef57600080fd5b506104786108fe3660046153ec565b611f68565b34801561090f57600080fd5b5061047861091e36600461541a565b611f7a565b34801561092f57600080fd5b5061094361093e3660046154ac565b6122e1565b6040516103a491906154e2565b34801561095c57600080fd5b5061047861096b366004615334565b6123d6565b34801561097c57600080fd5b50610197546001600160a01b03811690600160a01b900461ffff1661060e565b6104786109aa366004615544565b612446565b3480156109bb57600080fd5b5061039a6109ca366004614d4a565b6101a16020526000908152604090205481565b3480156109e957600080fd5b5061039a6109f8366004614d4a565b61019b6020526000908152604090205481565b348015610a1757600080fd5b5061039a610a26366004614d80565b6101a060209081526000928352604080842090915290825290205481565b348015610a5057600080fd5b50610420610a5f366004614d4a565b61019e602052600090815260409020546001600160a01b031681565b348015610a8757600080fd5b5061039a610a96366004614d4a565b612662565b348015610aa757600080fd5b506a44726f704552433131353560a81b61039a565b348015610ac857600080fd5b50610196546001600160a01b03811690600160a01b900461ffff1661060e565b348015610af457600080fd5b50610b08610b03366004614db0565b61267a565b6040516103a49190600061010082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c08301526001600160a01b0360e08401511660e083015292915050565b348015610b7e57600080fd5b50610478610b8d366004614d80565b612750565b348015610b9e57600080fd5b50610478610bad3660046155f1565b612775565b348015610bbe57600080fd5b506103f2612a09565b348015610bd357600080fd5b506106f6610be2366004614d4a565b61019d602052600090815260409020805460019091015482565b348015610c0857600080fd5b506103cd610c17366004615704565b6001600160a01b0391821660009081526101606020908152604080832093909416825291909152205460ff1690565b348015610c5257600080fd5b50610478610c61366004615732565b612a17565b348015610c7257600080fd5b50610478610c8136600461579b565b612ab6565b60006001600160a01b038316610cf65760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815261015f602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610d2d82612b5d565b80610d1c5750506001600160e01b03191663152a902d60e11b1490565b6101918054610d58906157d0565b80601f0160208091040260200160405190810160405280929190818152602001828054610d84906157d0565b8015610dd15780601f10610da657610100808354040283529160200191610dd1565b820191906000526020600020905b815481529060010190602001808311610db457829003601f168201915b505050505081565b606060005b61019954811015610e84576101998181548110610dfd57610dfd61580b565b9060005260206000200154831015610e725761019a60006101998381548110610e2857610e2861580b565b90600052602060002001548152602001908152602001600020610e4a84612b9d565b604051602001610e5b92919061583d565b604051602081830303815290604052915050919050565b610e7d6001826158f1565b9050610dde565b5050604080516020810190915260008152919050565b6000610ea581612c9b565b6001600160a01b03821660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604090205460ff16610f2c5760405162461bcd60e51b815260206004820152601b60248201527f6e6577206f776e6572206e6f74206d6f64756c652061646d696e2e00000000006044820152606401610ced565b610193546040516001600160a01b038085169216907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35061019380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610f9681612c9b565b612710821115610fd85760405162461bcd60e51b815260206004820152600d60248201526c313839901e1e9018981818181760991b6044820152606401610ced565b61019680546001600160b01b031916600160a01b61ffff8516026001600160a01b031916176001600160a01b0385169081179091556040518381527fe2497bd806ec41a6e0dd992c29a72efc0ef8fec9092d1978fd4a1e00b2f18304906020015b60405180910390a2505050565b600061105181612c9b565b600083815261019e602090815260409182902080546001600160a01b0319166001600160a01b038616908117909155915191825284917f359479172ba65a6639b0df237f704e030498cb7135d5e89b56f598bd1d84b0169101611039565b6000806000806110be86611347565b90945084925061ffff1690506127106110d78287615909565b6110e1919061593e565b925050509250929050565b6110f4612caf565b6001600160a01b0316856001600160a01b0316148061111a575061111a85610c17612caf565b61117e5760405162461bcd60e51b815260206004820152602f60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526e195c881b9bdc88185c1c1c9bdd9959608a1b6064820152608401610ced565b61118b8585858585612cb9565b5050505050565b600082815260fb60205260409020600101546111ad81612c9b565b6111b78383612f35565b505050565b6111c4612caf565b6001600160a01b0316816001600160a01b03161461124a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ced565b6112548282612f58565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661128281612c9b565b61019454600061129286836158f1565b610194819055600081815261019a602052604090209091506112b5908686614b4e565b506101998054600181810183556000929092527f960942b7bcefc06c4573016a89cb45882597f73bb18f9afb0df2c0e01c496e1b018290557f4e6c698792b8dfb7c94c60c7e9e91f82932832d5e1ec0870ed42cf674e6af44590839061131b89836158f1565b6113259190615952565b87876040516113379493929190615969565b60405180910390a1505050505050565b600081815261019f60209081526040808320815180830190925280546001600160a01b03168083526001909101549282019290925282911561138f57805160208201516113aa565b610197546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b606081518351146114195760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ced565b6000835167ffffffffffffffff81111561143557611435614dd2565b60405190808252806020026020018201604052801561145e578160200160208202803683370190505b50905060005b84518110156114d6576114a98582815181106114825761148261580b565b602002602001015185838151811061149c5761149c61580b565b6020026020010151610c86565b8282815181106114bb576114bb61580b565b60209081029190910101526114cf816159a6565b9050611464565b509392505050565b600081815261019d602052604081206001810154815483916114ff916158f1565b90505b81548111156115595760028201600061151c600184615952565b81526020019081526020016000206000015442106115475761153f600182615952565b949350505050565b80611551816159c1565b915050611502565b5060405162461bcd60e51b815260206004820152601960248201527f6e6f20616374697665206d696e7420636f6e646974696f6e2e000000000000006044820152606401610ced565b60006115ad81612c9b565b6127108211156115f45760405162461bcd60e51b815260206004820152601260248201527165786365656420726f79616c74792062707360701b6044820152606401610ced565b61019780546001600160a01b0385166001600160b01b03199091168117600160a01b61ffff861602179091556040518381527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb90602001611039565b600083815261019d602090815260408083208584526003810183528184206001600160a01b03861685528352818420548685526002909101909252909120600401548101818110156116a157506000195b935093915050565b6116b1612caf565b6001600160a01b0316836001600160a01b031614806116d757506116d783610c17612caf565b6117365760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152691030b8383937bb32b21760b11b6064820152608401610ced565b6111b7838383612f7b565b600061174c81612c9b565b61019580546001600160a01b0319166001600160a01b0384169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a25050565b600085815261019d602090815260408083208a8452600290810183528184208251610100810184528154815260018201549481019490945290810154918301919091526003810154606083015260048101546080830152600581015460a08301819052600682015460c08401526007909101546001600160a01b031660e0830152829190156119cd5761189d86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060a08301516040516bffffffffffffffffffffffff1960608e901b16602082015260348101889052605401604051602081830303815290604052805190602001206131dc565b9093509150826118ef5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420696e2077686974656c6973742e0000000000000000000000000000006044820152606401610ced565b600088815261019d602090815260408083208d8452600401825280832072ffffffffffffffffffffffffffffffffffffff60088e901c168452909152902054600160ff8b161b16156119745760405162461bcd60e51b815260206004820152600e60248201526d383937b7b31031b630b4b6b2b21760911b6044820152606401610ced565b8315806119815750838711155b6119cd5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964207175616e746974792070726f6f662e0000000000000000006044820152606401610ced565b5097509795505050505050565b60006119e581612c9b565b60008381526101a1602090815260409182902084905581518581529081018490527f07fa2d0eb2fe8b8e6fbee6073cf9d84659d6db054d221579a0373ae29bc9d73d91015b60405180910390a1505050565b6000611a4281612c9b565b600083815261019c602090815260409182902084905581518581529081018490527fc58cd6132bb46df23d468939c03dd023b74b509aaa6b04c39d5a6461c65963bd9101611a2a565b610193546001600160a01b031660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16611ad35750600090565b610193546001600160a01b03165b905090565b600082815261012d60205260408120611aff90836132aa565b9392505050565b6000611b1181612c9b565b611b1e6101988484614b4e565b50505050565b6101928054610d58906157d0565b6000611b3d81612c9b565b612710821115611b845760405162461bcd60e51b815260206004820152601260248201527165786365656420726f79616c74792062707360701b6044820152606401610ced565b6040805180820182526001600160a01b03858116808352602080840187815260008a815261019f8352869020945185546001600160a01b031916941693909317845591516001909301929092559151848152909186917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d910160405180910390a350505050565b600085815261019d602090815260408083208a845260029081018352928190208151610100810183528154815260018201549381019390935292830154908201526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b0390811660e08301819052908516148015611c9f57508060c0015183145b611cf75760405162461bcd60e51b8152602060048201526024808201527f696e76616c69642063757272656e6379206f722070726963652073706563696660448201526334b2b21760e11b6064820152608401610ced565b600085118015611d135750811580611d13575080606001518511155b611d5f5760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207175616e7469747920636c61696d65642e000000000000006044820152606401610ced565b8060200151858260400151611d7491906158f1565b1115611dc25760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178206d696e7420737570706c792e0000000000000000006044820152606401610ced565b600086815261019c60205260409020541580611e045750600086815261019c602090815260408083205461019b90925290912054611e019087906158f1565b11155b611e505760405162461bcd60e51b815260206004820152601760248201527f657863656564206d617820746f74616c20737570706c790000000000000000006044820152606401610ced565b60008681526101a160205260409020541580611ea3575060008681526101a160209081526040808320546101a083528184206001600160a01b038c16855290925290912054611ea09087906158f1565b11155b611eef5760405162461bcd60e51b815260206004820152601d60248201527f65786365656420636c61696d206c696d697420666f722077616c6c65740000006044820152606401610ced565b600080611efd888b8b611650565b915091508160001480611f105750804210155b611f5c5760405162461bcd60e51b815260206004820152601160248201527f63616e6e6f7420636c61696d207965742e0000000000000000000000000000006044820152606401610ced565b50505050505050505050565b611254611f73612caf565b83836132b6565b6000611f8581612c9b565b600085815261019d6020526040902080546001820154818515611faf57611fac82846158f1565b90505b600184018790558084556000805b8881101561217d57801580611fed5750898982818110611fdf57611fdf61580b565b905061010002016000013582105b61204c5760405162461bcd60e51b815260206004820152602a60248201527f737461727454696d657374616d70206d75737420626520696e20617363656e6460448201526934b7339037b93232b91760b11b6064820152608401610ced565b6000600287018161205d84876158f1565b81526020019081526020016000206002015490508a8a838181106120835761208361580b565b90506101000201602001358111156120dd5760405162461bcd60e51b815260206004820152601a60248201527f6d617820737570706c7920636c61696d656420616c72656164790000000000006044820152606401610ced565b8a8a838181106120ef576120ef61580b565b90506101000201876002016000848761210891906158f1565b8152602001908152602001600020818161212291906159d8565b5081905060028801600061213685886158f1565b81526020810191909152604001600020600201558a8a8381811061215c5761215c61580b565b90506101000201600001359250508080612175906159a6565b915050611fbd565b5086156121ff57835b828110156121f9576000818152600280880160209081526040832083815560018101849055918201839055600382018390556004808301849055600583018490556006830193909355600790910180546001600160a01b03191690559087019052806121f1816159a6565b915050612186565b5061229b565b8783111561229b57875b838110156122995760028601600061222183866158f1565b81526020810191909152604001600090812081815560018101829055600281018290556003810182905560048082018390556005820183905560068201839055600790910180546001600160a01b031916905587019061228183866158f1565b81526020015280612291816159a6565b915050612209565b505b897f7822655b74d50f461cbd7ca5dfc8b5e48b21fa2157bd7d277888fccce85af2ae8a8a6040516122cd929190615a49565b60405180910390a250505050505050505050565b60608167ffffffffffffffff8111156122fc576122fc614dd2565b60405190808252806020026020018201604052801561232f57816020015b606081526020019060019003908161231a5790505b50905060005b828110156123cf5761239f308585848181106123535761235361580b565b90506020028101906123659190615ae0565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061339892505050565b8282815181106123b1576123b161580b565b602002602001018190525080806123c7906159a6565b915050612335565b5092915050565b60006123e181612c9b565b60008481526101a0602090815260408083206001600160a01b0387168085529083529281902085905580518781529182018590527f9260cdce30c9abdb65593c1a903e40c87feb886a28aa4335a6695547988aab2f910160405180910390a250505050565b600260015414156124995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ced565b60026001553360009081526065602052604090205460ff16806124cb5750326124c0612caf565b6001600160a01b0316145b6124fd5760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610ced565b6000612508886114de565b9050600061252282612518612caf565b8b8b898989611798565b5090506000831580612552575060008a815261019d60209081526040808320868452600201909152902060050154155b905061256a83612560612caf565b8c8c8c8c87611c0b565b8180156125775750600084115b156125d9576125d9612587612caf565b60008c815261019d60209081526040808320888452600401825280832072ffffffffffffffffffffffffffffffffffffff600886901c16845290915290208054600160ff9093169290921b9091179055565b6125e58989898d61348c565b6125f18b848c8c6135d5565b6125f9612caf565b6001600160a01b03168a847f4f72e6585331094d368e469f11198272039d08cbddfcda1577e192687a83afb68e8d6040516126499291906001600160a01b03929092168252602082015260400190565b60405180910390a4505060018055505050505050505050565b600081815261012d60205260408120610d1c906136c5565b6126ce6040518061010001604052806000815260200160008152602001600081526020016000815260200160008152602001600080191681526020016000815260200160006001600160a01b031681525090565b50600091825261019d6020908152604080842092845260029283018252928390208351610100810185528154815260018201549281019290925291820154928101929092526003810154606083015260048101546080830152600581015460a0830152600681015460c0830152600701546001600160a01b031660e082015290565b600082815260fb602052604090206001015461276b81612c9b565b6111b78383612f58565b600054610100900460ff16158080156127955750600054600160ff909116105b806127af5750303b1580156127af575060005460ff166001145b6128125760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610ced565b6000805460ff191660011790558015612835576000805461ff0019166101001790555b61283d6136cf565b61284687613700565b61285e6040518060200160405280600081525061378f565b8951612872906101919060208d0190614bd2565b508851612887906101929060208c0190614bd2565b5061019780546001600160a01b038781166001600160b01b031990921691909117600160a01b61ffff8816021790915561019680546001600160a01b031990811685841617909155610195805490911691881691909117905587516128f4906101989060208b0190614bd2565b50610196805461ffff60a01b1916600160a01b61ffff86160217905561019380546001600160a01b0319166001600160a01b038d1617905561293760008c6137bf565b6129617f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68c6137bf565b61298b7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c8c6137bf565b6129b67f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c60006137bf565b80156129fc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6101988054610d58906157d0565b612a1f612caf565b6001600160a01b0316856001600160a01b03161480612a455750612a4585610c17612caf565b612aa95760405162461bcd60e51b815260206004820152602f60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526e195c881b9bdc88185c1c1c9bdd9959608a1b6064820152608401610ced565b61118b85858585856137c9565b612abe612caf565b6001600160a01b0316836001600160a01b03161480612ae45750612ae483610c17612caf565b612b435760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152691030b8383937bb32b21760b11b6064820152608401610ced565b6111b7838383613993565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b1480612b8e57506001600160e01b031982166303a24d0760e21b145b80610d1c5750610d1c82613b34565b606081612bc15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612beb5780612bd5816159a6565b9150612be49050600a8361593e565b9150612bc5565b60008167ffffffffffffffff811115612c0657612c06614dd2565b6040519080825280601f01601f191660200182016040528015612c30576020820181803683370190505b5090505b841561153f57612c45600183615952565b9150612c52600a86615b27565b612c5d9060306158f1565b60f81b818381518110612c7257612c7261580b565b60200101906001600160f81b031916908160001a905350612c94600a8661593e565b9450612c34565b612cac81612ca7612caf565b613b59565b50565b6000611ae1613bd9565b8151835114612d1b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610ced565b6001600160a01b038416612d7f5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610ced565b6000612d89612caf565b9050612d99818787878787613c06565b60005b8451811015612ec7576000858281518110612db957612db961580b565b602002602001015190506000858381518110612dd757612dd761580b565b602090810291909101810151600084815261015f835260408082206001600160a01b038e168352909352919091205490915081811015612e6c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610ced565b600083815261015f602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612eac9084906158f1565b9250508190555050505080612ec0906159a6565b9050612d9c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612f17929190615b3b565b60405180910390a4612f2d818787878787613e64565b505050505050565b612f3f828261400a565b600082815261012d602052604090206111b790826140ad565b612f6282826140c2565b600082815261012d602052604090206111b79082614163565b6001600160a01b038316612fdd5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ced565b805182511461303f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610ced565b6000613049612caf565b905061306981856000868660405180602001604052806000815250613c06565b60005b835181101561316f5760008482815181106130895761308961580b565b6020026020010151905060008483815181106130a7576130a761580b565b602090810291909101810151600084815261015f835260408082206001600160a01b038c1683529093529190912054909150818110156131355760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ced565b600092835261015f602090815260408085206001600160a01b038b1686529091529092209103905580613167816159a6565b91505061306c565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516131c0929190615b3b565b60405180910390a4604080516020810190915260009052611b1e565b6000808281805b875181101561329e576131f7600283615909565b9150600088828151811061320d5761320d61580b565b6020026020010151905080841161324f57604080516020810186905290810182905260600160405160208183030381529060405280519060200120935061328b565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361328891906158f1565b92505b5080613296816159a6565b9150506131e3565b50941495939450505050565b6000611aff8383614178565b816001600160a01b0316836001600160a01b0316141561332a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ced565b6001600160a01b0383811660008181526101606020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6134005760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ced565b600080846001600160a01b03168460405161341b9190615b60565b600060405180830381855af49150503d8060008114613456576040519150601f19603f3d011682016040523d82523d6000602084013e61345b565b606091505b50915091506134838282604051806060016040528060278152602001615dd4602791396141a2565b95945050505050565b8161349657611b1e565b60006134a28386615909565b61019654909150600090612710906134c590600160a01b900461ffff1684615909565b6134cf919061593e565b90506001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415613545578134146135455760405162461bcd60e51b815260206004820152601660248201527f6d7573742073656e6420746f74616c2070726963652e000000000000000000006044820152606401610ced565b600083815261019e60205260408120546001600160a01b03161561358157600084815261019e60205260409020546001600160a01b031661358f565b610195546001600160a01b03165b90506135b08661359d612caf565b610196546001600160a01b0316856141db565b6135cc866135bc612caf565b836135c78688615952565b6141db565b50505050505050565b600082815261019d60209081526040808320868452600290810190925282200180548392906136059084906158f1565b9091555050600082815261019d6020908152604080832086845260030190915281204291613631612caf565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550806101a060008481526020019081526020016000206000613674612caf565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546136a391906158f1565b92505081905550611b1e84838360405180602001604052806000815250614225565b6000610d1c825490565b600054610100900460ff166136f65760405162461bcd60e51b8152600401610ced90615b7c565b6136fe61434d565b565b600054610100900460ff166137275760405162461bcd60e51b8152600401610ced90615b7c565b60005b81518110156112545760016065600084848151811061374b5761374b61580b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613787816159a6565b91505061372a565b600054610100900460ff166137b65760405162461bcd60e51b8152600401610ced90615b7c565b612cac8161437a565b6112548282612f35565b6001600160a01b03841661382d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610ced565b6000613837612caf565b905060006138448561438e565b905060006138518561438e565b9050613861838989858589613c06565b600086815261015f602090815260408083206001600160a01b038c168452909152902054858110156138e85760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610ced565b600087815261015f602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906139289084906158f1565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613988848a8a8a8a8a6143d9565b505050505050505050565b6001600160a01b0383166139f55760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ced565b60006139ff612caf565b90506000613a0c8461438e565b90506000613a198461438e565b9050613a3983876000858560405180602001604052806000815250613c06565b600085815261015f602090815260408083206001600160a01b038a16845290915290205484811015613ab95760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ced565b600086815261015f602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526135cc565b60006001600160e01b03198216635a05180f60e01b1480610d1c5750610d1c826144d5565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1661125457613b97816001600160a01b0316601461450a565b613ba283602061450a565b604051602001613bb3929190615bc7565b60408051601f198184030181529082905262461bcd60e51b8252610ced91600401614d37565b3360009081526065602052604081205460ff1615613bfe575060131936013560601c90565b503390565b90565b600080527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a13126020527f70e64e82d0337f3fa9071fdb3266f859725ed1fc29697b2e6e986b76cffbfb085460ff16158015613c6857506001600160a01b03851615155b8015613c7c57506001600160a01b03841615155b15613d56576001600160a01b03851660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff1680613cfe57506001600160a01b03841660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff165b613d565760405162461bcd60e51b8152602060048201526024808201527f7265737472696374656420746f205452414e534645525f524f4c4520686f6c6460448201526332b9399760e11b6064820152608401610ced565b6001600160a01b038516613dde5760005b8351811015613ddc57828181518110613d8257613d8261580b565b602002602001015161019b6000868481518110613da157613da161580b565b602002602001015181526020019081526020016000206000828254613dc691906158f1565b90915550613dd59050816159a6565b9050613d67565b505b6001600160a01b038416612f2d5760005b83518110156135cc57828181518110613e0a57613e0a61580b565b602002602001015161019b6000868481518110613e2957613e2961580b565b602002602001015181526020019081526020016000206000828254613e4e9190615952565b90915550613e5d9050816159a6565b9050613def565b6001600160a01b0384163b15612f2d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ea89089908990889088908890600401615c48565b6020604051808303816000875af1925050508015613ee3575060408051601f3d908101601f19168201909252613ee091810190615ca6565b60015b613f9957613eef615cc3565b806308c379a01415613f295750613f04615cde565b80613f0f5750613f2b565b8060405162461bcd60e51b8152600401610ced9190614d37565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610ced565b6001600160e01b0319811663bc197c8160e01b146135cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610ced565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1661125457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055614069612caf565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611aff836001600160a01b0384166146b3565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff161561125457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff1916905561411f612caf565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611aff836001600160a01b038416614702565b600082600001828154811061418f5761418f61580b565b9060005260206000200154905092915050565b606083156141b1575081611aff565b8251156141c15782518084602001fd5b8160405162461bcd60e51b8152600401610ced9190614d37565b806141e557611b1e565b6001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156142195761421482826147f5565b611b1e565b611b1e84848484614898565b6001600160a01b0384166142855760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610ced565b600061428f612caf565b9050600061429c8561438e565b905060006142a98561438e565b90506142ba83600089858589613c06565b600086815261015f602090815260408083206001600160a01b038b168452909152812080548792906142ed9084906158f1565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46135cc836000898989896143d9565b600054610100900460ff166143745760405162461bcd60e51b8152600401610ced90615b7c565b60018055565b805161125490610161906020840190614bd2565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106143c8576143c861580b565b602090810291909101015292915050565b6001600160a01b0384163b15612f2d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061441d9089908990889088908890600401615d68565b6020604051808303816000875af1925050508015614458575060408051601f3d908101601f1916820190925261445591810190615ca6565b60015b61446457613eef615cc3565b6001600160e01b0319811663f23a6e6160e01b146135cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610ced565b60006001600160e01b03198216637965db0b60e01b1480610d1c57506301ffc9a760e01b6001600160e01b0319831614610d1c565b60606000614519836002615909565b6145249060026158f1565b67ffffffffffffffff81111561453c5761453c614dd2565b6040519080825280601f01601f191660200182016040528015614566576020820181803683370190505b509050600360fc1b816000815181106145815761458161580b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106145b0576145b061580b565b60200101906001600160f81b031916908160001a90535060006145d4846002615909565b6145df9060016158f1565b90505b6001811115614664577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106146205761462061580b565b1a60f81b8282815181106146365761463661580b565b60200101906001600160f81b031916908160001a90535060049490941c9361465d816159c1565b90506145e2565b508315611aff5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ced565b60008181526001830160205260408120546146fa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d1c565b506000610d1c565b600081815260018301602052604081205480156147eb576000614726600183615952565b855490915060009061473a90600190615952565b905081811461479f57600086600001828154811061475a5761475a61580b565b906000526020600020015490508087600001848154811061477d5761477d61580b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806147b0576147b0615da0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d1c565b6000915050610d1c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614842576040519150601f19603f3d011682016040523d82523d6000602084013e614847565b606091505b50509050806111b75760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610ced565b816001600160a01b0316836001600160a01b031614156148b757611b1e565b6001600160a01b0383163014156148dc576142146001600160a01b03851683836148f1565b611b1e6001600160a01b038516848484614969565b6040516001600160a01b0383166024820152604481018290526111b790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526149a1565b6040516001600160a01b0380851660248301528316604482015260648101829052611b1e9085906323b872dd60e01b9060840161491d565b60006149f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a739092919063ffffffff16565b8051909150156111b75780806020019051810190614a149190615db6565b6111b75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ced565b606061153f8484600085856001600160a01b0385163b614ad55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ced565b600080866001600160a01b03168587604051614af19190615b60565b60006040518083038185875af1925050503d8060008114614b2e576040519150601f19603f3d011682016040523d82523d6000602084013e614b33565b606091505b5091509150614b438282866141a2565b979650505050505050565b828054614b5a906157d0565b90600052602060002090601f016020900481019282614b7c5760008555614bc2565b82601f10614b955782800160ff19823516178555614bc2565b82800160010185558215614bc2579182015b82811115614bc2578235825591602001919060010190614ba7565b50614bce929150614c46565b5090565b828054614bde906157d0565b90600052602060002090601f016020900481019282614c005760008555614bc2565b82601f10614c1957805160ff1916838001178555614bc2565b82800160010185558215614bc2579182015b82811115614bc2578251825591602001919060010190614c2b565b5b80821115614bce5760008155600101614c47565b6001600160a01b0381168114612cac57600080fd5b8035614c7b81614c5b565b919050565b60008060408385031215614c9357600080fd5b8235614c9e81614c5b565b946020939093013593505050565b6001600160e01b031981168114612cac57600080fd5b600060208284031215614cd457600080fd5b8135611aff81614cac565b60005b83811015614cfa578181015183820152602001614ce2565b83811115611b1e5750506000910152565b60008151808452614d23816020860160208601614cdf565b601f01601f19169290920160200192915050565b602081526000611aff6020830184614d0b565b600060208284031215614d5c57600080fd5b5035919050565b600060208284031215614d7557600080fd5b8135611aff81614c5b565b60008060408385031215614d9357600080fd5b823591506020830135614da581614c5b565b809150509250929050565b60008060408385031215614dc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715614e0e57614e0e614dd2565b6040525050565b600067ffffffffffffffff821115614e2f57614e2f614dd2565b5060051b60200190565b600082601f830112614e4a57600080fd5b81356020614e5782614e15565b604051614e648282614de8565b83815260059390931b8501820192828101915086841115614e8457600080fd5b8286015b84811015614e9f5780358352918301918301614e88565b509695505050505050565b600082601f830112614ebb57600080fd5b813567ffffffffffffffff811115614ed557614ed5614dd2565b604051614eec601f8301601f191660200182614de8565b818152846020838601011115614f0157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614f3657600080fd5b8535614f4181614c5b565b94506020860135614f5181614c5b565b9350604086013567ffffffffffffffff80821115614f6e57600080fd5b614f7a89838a01614e39565b94506060880135915080821115614f9057600080fd5b614f9c89838a01614e39565b93506080880135915080821115614fb257600080fd5b50614fbf88828901614eaa565b9150509295509295909350565b60008083601f840112614fde57600080fd5b50813567ffffffffffffffff811115614ff657600080fd5b60208301915083602082850101111561500e57600080fd5b9250929050565b60008060006040848603121561502a57600080fd5b83359250602084013567ffffffffffffffff81111561504857600080fd5b61505486828701614fcc565b9497909650939450505050565b600082601f83011261507257600080fd5b8135602061507f82614e15565b60405161508c8282614de8565b83815260059390931b85018201928281019150868411156150ac57600080fd5b8286015b84811015614e9f5780356150c381614c5b565b83529183019183016150b0565b600080604083850312156150e357600080fd5b823567ffffffffffffffff808211156150fb57600080fd5b61510786838701615061565b9350602085013591508082111561511d57600080fd5b5061512a85828601614e39565b9150509250929050565b600081518084526020808501945080840160005b8381101561516457815187529582019590820190600101615148565b509495945050505050565b602081526000611aff6020830184615134565b60008060006060848603121561519757600080fd5b833592506020840135915060408401356151b081614c5b565b809150509250925092565b6000806000606084860312156151d057600080fd5b83356151db81614c5b565b9250602084013567ffffffffffffffff808211156151f857600080fd5b61520487838801614e39565b9350604086013591508082111561521a57600080fd5b5061522786828701614e39565b9150509250925092565b60008083601f84011261524357600080fd5b50813567ffffffffffffffff81111561525b57600080fd5b6020830191508360208260051b850101111561500e57600080fd5b600080600080600080600060c0888a03121561529157600080fd5b8735965060208801356152a381614c5b565b95506040880135945060608801359350608088013567ffffffffffffffff8111156152cd57600080fd5b6152d98a828b01615231565b989b979a5095989497959660a090950135949350505050565b6000806020838503121561530557600080fd5b823567ffffffffffffffff81111561531c57600080fd5b61532885828601614fcc565b90969095509350505050565b60008060006060848603121561534957600080fd5b83359250602084013561535b81614c5b565b929592945050506040919091013590565b8015158114612cac57600080fd5b600080600080600080600060e0888a03121561539557600080fd5b8735965060208801356153a781614c5b565b9550604088013594506060880135935060808801356153c581614c5b565b925060a0880135915060c08801356153dc8161536c565b8091505092959891949750929550565b600080604083850312156153ff57600080fd5b823561540a81614c5b565b91506020830135614da58161536c565b6000806000806060858703121561543057600080fd5b84359350602085013567ffffffffffffffff8082111561544f57600080fd5b818701915087601f83011261546357600080fd5b81358181111561547257600080fd5b8860208260081b850101111561548757600080fd5b60208301955080945050505060408501356154a18161536c565b939692955090935050565b600080602083850312156154bf57600080fd5b823567ffffffffffffffff8111156154d657600080fd5b61532885828601615231565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561553757603f19888603018452615525858351614d0b565b94509285019290850190600101615509565b5092979650505050505050565b60008060008060008060008060e0898b03121561556057600080fd5b883561556b81614c5b565b97506020890135965060408901359550606089013561558981614c5b565b94506080890135935060a089013567ffffffffffffffff8111156155ac57600080fd5b6155b88b828c01615231565b999c989b50969995989497949560c00135949350505050565b80356fffffffffffffffffffffffffffffffff81168114614c7b57600080fd5b6000806000806000806000806000806101408b8d03121561561157600080fd5b61561a8b614c70565b995060208b013567ffffffffffffffff8082111561563757600080fd5b6156438e838f01614eaa565b9a5060408d013591508082111561565957600080fd5b6156658e838f01614eaa565b995060608d013591508082111561567b57600080fd5b6156878e838f01614eaa565b985060808d013591508082111561569d57600080fd5b506156aa8d828e01615061565b9650506156b960a08c01614c70565b94506156c760c08c01614c70565b93506156d560e08c016155d1565b92506156e46101008c016155d1565b91506156f36101208c01614c70565b90509295989b9194979a5092959850565b6000806040838503121561571757600080fd5b823561572281614c5b565b91506020830135614da581614c5b565b600080600080600060a0868803121561574a57600080fd5b853561575581614c5b565b9450602086013561576581614c5b565b93506040860135925060608601359150608086013567ffffffffffffffff81111561578f57600080fd5b614fbf88828901614eaa565b6000806000606084860312156157b057600080fd5b83356157bb81614c5b565b95602085013595506040909401359392505050565b600181811c908216806157e457607f821691505b6020821081141561580557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008151615833818560208601614cdf565b9290920192915050565b600080845481600182811c91508083168061585957607f831692505b602080841082141561587957634e487b7160e01b86526022600452602486fd5b81801561588d576001811461589e576158cb565b60ff198616895284890196506158cb565b60008b81526020902060005b868110156158c35781548b8201529085019083016158aa565b505084890196505b5050505050506134838185615821565b634e487b7160e01b600052601160045260246000fd5b60008219821115615904576159046158db565b500190565b6000816000190483118215151615615923576159236158db565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261594d5761594d615928565b500490565b600082821015615964576159646158db565b500390565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60006000198214156159ba576159ba6158db565b5060010190565b6000816159d0576159d06158db565b506000190190565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c082013560068201556007810160e0830135615a2a81614c5b565b81546001600160a01b0319166001600160a01b03919091161790555050565b6020808252818101839052600090604080840186845b87811015615ad3578135835284820135858401528382013584840152606080830135908401526080808301359084015260a0808301359084015260c0808301359084015260e080830135615ab281614c5b565b6001600160a01b031690840152610100928301929190910190600101615a5f565b5090979650505050505050565b6000808335601e19843603018112615af757600080fd5b83018035915067ffffffffffffffff821115615b1257600080fd5b60200191503681900382131561500e57600080fd5b600082615b3657615b36615928565b500690565b604081526000615b4e6040830185615134565b82810360208401526134838185615134565b60008251615b72818460208701614cdf565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615bff816017850160208801614cdf565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615c3c816028840160208801614cdf565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152615c7460a0830186615134565b8281036060840152615c868186615134565b90508281036080840152615c9a8185614d0b565b98975050505050505050565b600060208284031215615cb857600080fd5b8151611aff81614cac565b600060033d1115613c035760046000803e5060005160e01c90565b600060443d1015615cec5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615d1c57505050505090565b8285019150815181811115615d345750505050505090565b843d8701016020828501011115615d4e5750505050505090565b615d5d60208286010187614de8565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152614b4360a0830184614d0b565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615dc857600080fd5b8151611aff8161536c56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c6e781d0fe0e40709b5790973bc8f2b3b672388c1903baed0590de6977e9740964736f6c634300080c0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.