Overview
CRO Balance
CRO Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
LaunchpadERC721
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "./ERC721EnumerableRoyaltyUpgradeable.sol"; import "./interfaces/ILaunchpadERC721.sol"; contract LaunchpadERC721 is ERC721EnumerableRoyaltyUpgradeable, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable, ILaunchpadERC721 { using Strings for uint256; // General constants enum MintTypes { WHITELIST, PUBLIC } struct SaleCharacteristics { MintTypes mintType; // Type of sale bool configured; // whether this phase is configured uint256 price; // mint price uint256 startTime; // mint start time uint256 endTime; // mint end time. If no end, set it to some value large uint256 limitMintPerTx; // limit mint per transaction uint256 limitMintPerWallet; // limit mint per wallet bytes32 merkleRoot; // merkle root of wallets } uint8 public constant MAX_NUMBER_SALES = 4; uint256 public constant MINT_FEE_DENOMINATOR = 10000; uint256 public maxSupply; uint256 public maxNftAvailableForSale; // only sell this much to the public and private rounds uint256 public numNftOwnerMinted; // how many owner minted string public baseURI; string public defaultBaseURI; uint256 private mintFee; // between 0 and 10000. 5% is 500/10000 address private mintFeeRecipient; address public primarySaleRecipient; // Convention: phase sequence of time from left to right SaleCharacteristics[MAX_NUMBER_SALES] public saleInformation; // User => Sale phase id => amount minted mapping(address => mapping(uint8 => uint256)) public minted; event UpdateBaseURI(string baseURI); event UpdatePrimarySaleRecipient(address primarySaleRecipient); event UpdateMaxNftAvailableForSale(uint256 maxNftAvailableForSale); event UpdateDefaultBaseURI(string defaultBaseURI); event SetDefaultRoyalty(address indexed receiver, uint96 feeNumerator); event SetSalePhaseById( uint8 sid, uint256 price, uint256 startTime, uint256 endTime, uint256 limitMintPerTx, uint256 limitMintPerWallet, MintTypes mintType, bytes32 merkleRoot ); event MintNFT(address indexed receiver, uint256 tokenId); event OwnerMintNFT(address indexed receiver, uint256 tokenId); event WithdrawFund(address indexed receiver, uint256 amount); /** * @dev Initializes this contract with the given parameters. * * @param _name the name of the collection * @param _symbol the symbol of the collection * @param _defaultBaseURI default base URI * @param _maxSupply max supply of the collection * @param _ownerAddress address of the contract owner * @param _mintFee protocol mint fee * @param _mintFeeRecipient protocol mint fee recipient * @param _royaltyFee royalty fee numerator, 0 -> 10000 eg. 100 = 1%, 10000 = 100% * @param _royaltyFeeRecipient Royalty receiver */ function initialize( string memory _name, string memory _symbol, string memory _defaultBaseURI, uint256 _maxSupply, address _ownerAddress, uint256 _mintFee, address _mintFeeRecipient, uint96 _royaltyFee, address _royaltyFeeRecipient ) public override initializer { __ERC721_init(_name, _symbol); __Ownable_init(); __Pausable_init_unchained(); __ReentrancyGuard_init(); require(_ownerAddress != address(0), "owner address 0"); require(_maxSupply > 0, "max supply is zero"); require((bytes(_defaultBaseURI)).length > 0, "empty default base URI"); defaultBaseURI = _defaultBaseURI; maxSupply = _maxSupply; maxNftAvailableForSale = maxSupply; transferOwnership(_ownerAddress); // Fees. Could be empty in some cases require(_mintFee <= MINT_FEE_DENOMINATOR, "mint fee will exceed balance"); mintFeeRecipient = _mintFeeRecipient; mintFee = _mintFee; // Default primarySaleRecipient as owner primarySaleRecipient = _ownerAddress; // Royalty _setDefaultRoyalty(_royaltyFeeRecipient, _royaltyFee); } /** * @dev Make sure that each phase is in sequence from left to right, one must end before another starts * * @param _sid the sale id * @param _startTime start time of the sale phase * @param _endTime end time of the sale phase */ modifier onlyValidPhase(uint8 _sid, uint256 _startTime, uint256 _endTime) { require(_sid < MAX_NUMBER_SALES, "invalid sid"); // If set before if (saleInformation[_sid].configured) { require( saleInformation[_sid].startTime > block.timestamp, "sale started" ); } // Check if phases are set in the order of time, i.e. // phase 0 must end for phase 1 to start and so on, till phase 3. // For that: // - startTime must be greater than endTime of previous phases if available // - endTime must be smaller than startTime of later phases if available require(_startTime > block.timestamp, "startTime in the past"); require(_endTime > _startTime, "endTime must be greater than startTime"); for (uint8 i = 0; i < MAX_NUMBER_SALES; i++) { if (i < _sid && saleInformation[i].configured) { require(_startTime > saleInformation[i].endTime, "invalid startTime" ); } if (i > _sid && saleInformation[i].configured) { require(_endTime < saleInformation[i].startTime, "invalid endTime" ); } } _; } /** * @dev Allows only owner to set sale, phase by phase. * * @param _sid the sale phase id * @param _price price of the sale * @param _startTime sale start time * @param _endTime sale end time * @param _limitMintPerTx limit of the amount to be minted by a transaction * @param _limitMintPerWallet limit of the amount to be minted by a wallet * @param _mintType type of mint * @param _merkleRoot merkle root which controls the whitelist */ function setSalePhaseById( uint8 _sid, uint256 _price, uint256 _startTime, uint256 _endTime, uint256 _limitMintPerTx, uint256 _limitMintPerWallet, MintTypes _mintType, bytes32 _merkleRoot ) external onlyOwner onlyValidPhase(_sid, _startTime, _endTime) { require(_limitMintPerTx > 0, "limitMintPerTx is zero"); require(_limitMintPerWallet > 0, "limitMintPerWallet is zero"); require(_limitMintPerTx <= _limitMintPerWallet, "limitMintPerTx must be <= limitMintPerWallet"); if (_mintType == MintTypes.WHITELIST) { require(_merkleRoot != 0, "empty merkle root"); } saleInformation[_sid].price = _price; saleInformation[_sid].startTime = _startTime; saleInformation[_sid].endTime = _endTime; saleInformation[_sid].limitMintPerTx = _limitMintPerTx; saleInformation[_sid].limitMintPerWallet = _limitMintPerWallet; saleInformation[_sid].mintType = _mintType; saleInformation[_sid].merkleRoot = _merkleRoot; saleInformation[_sid].configured = true; emit SetSalePhaseById( _sid, _price, _startTime, _endTime, _limitMintPerTx, _limitMintPerWallet, _mintType, _merkleRoot ); } /** * @dev Allows only owner to update base URI. * * @param _uri the default URI of the collection that is shown as placeholder. * To be replaced by baseURI to reveal NFTs. */ function updateDefaultBaseURI(string memory _uri) external onlyOwner { defaultBaseURI = _uri; emit UpdateDefaultBaseURI(defaultBaseURI); } /** * @dev Allows only owner to update base URI. * * @param _uri the URI of the collection */ function updateBaseURI(string memory _uri) external onlyOwner { baseURI = _uri; emit UpdateBaseURI(baseURI); } /** * @dev Allows only owner to update primary sale recipient. * * @param _primarySaleRecipient the new primary sale recipient address */ function updatePrimarySaleRecipient(address _primarySaleRecipient) external onlyOwner { require(block.timestamp < _getStartSale(), "sale started"); require(_primarySaleRecipient != address(0), "primary sale recipient address 0"); primarySaleRecipient = _primarySaleRecipient; emit UpdatePrimarySaleRecipient(_primarySaleRecipient); } /** * @dev Allows only owner to update max sale. * * @param _maxNftAvailableForSale the new maxNftAvailableForSale */ function updateMaxNftAvailableForSale(uint256 _maxNftAvailableForSale) external onlyOwner { require(_maxNftAvailableForSale <= maxSupply, "too high max sale"); require(_maxNftAvailableForSale > 0, "too low max sale"); maxNftAvailableForSale = _maxNftAvailableForSale; emit UpdateMaxNftAvailableForSale(maxNftAvailableForSale); } /** * @dev Allows only owner to set royalty for all NFTs. * * @param _receiver Royalty receiver * @param _feeNumerator royalty numerator, 0 -> 10000 eg. 100 = 1%, 10000 = 100% */ function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner { _setDefaultRoyalty(_receiver, _feeNumerator); emit SetDefaultRoyalty(_receiver, _feeNumerator); } /** * @dev Collect and distribute sale fund to primary sale recipient, * commission is calculated and set for minted treasury. */ function withdrawFund() external nonReentrant onlyOwner { require(block.timestamp > _getEndSale(), "sale not over"); require(primarySaleRecipient != address(0), "primary sale recipient address 0"); if (mintFee > 0) { uint256 bal = address(this).balance; uint256 amount = bal * mintFee / MINT_FEE_DENOMINATOR; (bool _success, ) = mintFeeRecipient.call{value: amount}(""); require(_success, "transfer to mintFeeRecipient failed."); emit WithdrawFund(mintFeeRecipient, amount); } uint256 remaining = address(this).balance; (bool success, ) = primarySaleRecipient.call{value: remaining}(""); require(success, "transfer to msg sender failed."); emit WithdrawFund(primarySaleRecipient, remaining); } /** * @dev Allows only owner to mint the NFTs, * before and after the sale. There is no limit (limit is max supply) that the owner can mint. * * @param _receiver the receiver of the minted tokens * @param _amount amount to be minted */ function ownerMint(address _receiver, uint256 _amount) external payable nonReentrant onlyOwner { require(!isSaleLive(), "sale is on going"); require(_receiver != address(0), "address 0 not allowed"); require(_amount > 0, "minting 0 NFTs not allowed"); require((_amount + totalSupply()) <= maxSupply, "exceed max supply"); for (uint256 i = 0; i < _amount; i++) { uint256 newItemId = totalSupply(); _safeMint(_receiver, newItemId); emit OwnerMintNFT(_receiver, newItemId); } numNftOwnerMinted += _amount; } /** * @dev Pause the contract. Revert if already paused. */ function pause() external onlyOwner { PausableUpgradeable._pause(); } /** * @dev Unpause the contract. Revert if already unpaused. */ function unpause() external onlyOwner { PausableUpgradeable._unpause(); } /**************************************************************************************************** PUBLIC FUNCTIONS *****************************************************************************************************/ /** * @dev Allows public users to mint * * @param _amount amount to be minted * @param _sid the sale phase id * @param _proof: the proof (containing sibling hashes on the branch from the leaf to the root of the tree) */ function mint(uint256 _amount, uint8 _sid, bytes32[] calldata _proof) external override payable nonReentrant whenNotPaused { require(_sid < MAX_NUMBER_SALES, "invalid sale id"); SaleCharacteristics memory sale = saleInformation[_sid]; require(sale.configured, "sale is not configured"); require(_isWhitelisted(msg.sender, _sid, _proof), "user is not whitelisted"); require(sale.startTime <= block.timestamp, "mint not started"); require(sale.endTime >= block.timestamp, "mint has ended"); require(_amount > 0, "minting 0 NFT not allowed"); require(_amount <= sale.limitMintPerTx, "exceed max mint per txn"); require(minted[msg.sender][_sid] + _amount <= sale.limitMintPerWallet, "exceed max mint per wallet"); require(_amount <= getRemainingForSale(), "mint amount exceed max allocation for sale"); require(msg.value >= sale.price * _amount, "not enough payment provided"); if (msg.value > sale.price * _amount) { uint256 remainder = msg.value - sale.price * _amount; (bool _success, ) = msg.sender.call{value: remainder}(""); require(_success, "refund to buyer failed."); } minted[msg.sender][_sid] += _amount; for (uint256 i = 0; i < _amount; i++) { uint256 newItemId = totalSupply(); _safeMint(msg.sender, newItemId); emit MintNFT(msg.sender, newItemId); } } /**************************************************************************************************** VIEW FUNCTIONS *****************************************************************************************************/ /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _currentBaseURI = _baseURI(); return bytes(_currentBaseURI).length > 0 ? string(abi.encodePacked(_currentBaseURI, tokenId.toString())) : defaultBaseURI; } /** * @dev Check remaining available amount for selling. SOLD OUT when it's zero */ function getRemainingForSale() public view returns (uint256) { uint256 totalMintedByPublic = totalSupply() - numNftOwnerMinted; // If owner mint more than supposed to, and `eat` in the public sale allocation if (numNftOwnerMinted + maxNftAvailableForSale > maxSupply) { return maxSupply - totalSupply(); } else { return maxNftAvailableForSale - totalMintedByPublic; } } /** * @dev Check remaining available amount for a user by phase. * * @param _user: address of the user * @param _sid: id of the sale */ function getRemainingInPhase(address _user, uint8 _sid) external view returns (uint256) { require(_sid < MAX_NUMBER_SALES, "invalid sale id"); SaleCharacteristics memory sale = saleInformation[_sid]; require(sale.configured, "sale is not configured"); return sale.limitMintPerWallet - minted[_user][_sid]; } /** * @dev Check if a user is whitelisted for a round * * @param _user: address of the user * @param _sid: id of the sale * @param _proof: the proof (containing sibling hashes on the branch from the leaf to the root of the tree) */ function isWhitelisted( address _user, uint8 _sid, bytes32[] calldata _proof ) external view returns (bool) { return _isWhitelisted(_user, _sid, _proof); } /** * @dev Check if a sale phase is ended * * @param _sid: id of the sale */ function isPhaseEnded(uint8 _sid) external view returns (bool) { require(_sid < MAX_NUMBER_SALES, "invalid sale id"); require(saleInformation[_sid].configured, "sale is not configured"); return block.timestamp > saleInformation[_sid].endTime; } /** * @dev Sale is live when there is a phase that is still happening */ function isSaleLive() public view returns (bool) { uint256 startSale = _getStartSale(); uint256 endSale = _getEndSale(); return block.timestamp >= startSale && block.timestamp <= endSale; } /** * @dev Sale is over when the last phase is done */ function isSaleOver() external view returns (bool) { return block.timestamp > _getEndSale(); } function _getStartSale() internal view returns(uint256) { uint256 startSale = 0; for (uint8 i = 0; i < MAX_NUMBER_SALES; i++) { if (saleInformation[i].configured) { startSale = saleInformation[i].startTime; break; } } return startSale; } function _getEndSale() internal view returns(uint256) { uint256 endSale = 0; for (uint8 i = MAX_NUMBER_SALES; i > 0 ; i--) { if (saleInformation[i - 1].configured) { endSale = saleInformation[i - 1].endTime; break; } } return endSale; } /** * @dev Check if a user is whitelisted for a round * * @param _account: address of the user * @param _sid: id of the sale * @param _proof: the proof (containing sibling hashes on the branch from the leaf to the root of the tree) */ function _isWhitelisted(address _account, uint8 _sid, bytes32[] memory _proof) internal view returns (bool) { require(_sid < MAX_NUMBER_SALES, "invalid sale id"); require(saleInformation[_sid].configured, "sale is not configured"); if (saleInformation[_sid].mintType == MintTypes.PUBLIC) { return true; } require(saleInformation[_sid].merkleRoot != 0, "whitelist is not set"); bytes32 leaf = keccak256(abi.encodePacked(_account)); return MerkleProof.verify(_proof, saleInformation[_sid].merkleRoot, leaf); } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/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. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @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 (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 pragma solidity 0.8.7; import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; // Mimic ERC721Royalty implementation from openzeppelin, but remove ERC721 because ERC721Enumberable is such ERC721 abstract contract ERC721EnumerableRoyaltyUpgradeable is ERC2981Upgradeable, ERC721EnumerableUpgradeable { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721EnumerableUpgradeable, ERC2981Upgradeable) returns (bool) { return ERC2981Upgradeable.supportsInterface(interfaceId) || ERC721EnumerableUpgradeable.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; interface ILaunchpadERC721 { function initialize( string memory _name, string memory _symbol, string memory _defaultBaseURI, uint256 _maxSupply, address _ownerAddress, uint256 _mintFee, address _mintFeeRecipient, uint96 _royaltyFee, address _royaltyFeeRecipient ) external; function mint(uint256 _amount, uint8 _sid, bytes32[] calldata _proof) external payable; }
// 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.6.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 = _setInitializedVersion(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) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _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 { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981Upgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981Upgradeable */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } /** * @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[48] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @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[46] private __gap; }
// 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 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 (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @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[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MintNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"OwnerMintNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"SetDefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"sid","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"limitMintPerTx","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"limitMintPerWallet","type":"uint256"},{"indexed":false,"internalType":"enum LaunchpadERC721.MintTypes","name":"mintType","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"SetSalePhaseById","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"UpdateBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"defaultBaseURI","type":"string"}],"name":"UpdateDefaultBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxNftAvailableForSale","type":"uint256"}],"name":"UpdateMaxNftAvailableForSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"primarySaleRecipient","type":"address"}],"name":"UpdatePrimarySaleRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFund","type":"event"},{"inputs":[],"name":"MAX_NUMBER_SALES","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemainingForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint8","name":"_sid","type":"uint8"}],"name":"getRemainingInPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_defaultBaseURI","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"address","name":"_ownerAddress","type":"address"},{"internalType":"uint256","name":"_mintFee","type":"uint256"},{"internalType":"address","name":"_mintFeeRecipient","type":"address"},{"internalType":"uint96","name":"_royaltyFee","type":"uint96"},{"internalType":"address","name":"_royaltyFeeRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_sid","type":"uint8"}],"name":"isPhaseEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint8","name":"_sid","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxNftAvailableForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_sid","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numNftOwnerMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"saleInformation","outputs":[{"internalType":"enum LaunchpadERC721.MintTypes","name":"mintType","type":"uint8"},{"internalType":"bool","name":"configured","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"limitMintPerTx","type":"uint256"},{"internalType":"uint256","name":"limitMintPerWallet","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"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":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_sid","type":"uint8"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_limitMintPerTx","type":"uint256"},{"internalType":"uint256","name":"_limitMintPerWallet","type":"uint256"},{"internalType":"enum LaunchpadERC721.MintTypes","name":"_mintType","type":"uint8"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setSalePhaseById","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateDefaultBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxNftAvailableForSale","type":"uint256"}],"name":"updateMaxNftAvailableForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_primarySaleRecipient","type":"address"}],"name":"updatePrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFund","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061497c806100206000396000f3fe6080604052600436106102ae5760003560e01c806370a0823111610175578063b6030710116100dc578063e07fa3c111610095578063f37bb3cf1161006f578063f37bb3cf1461084e578063f63f244914610875578063f71143ca14610895578063f9a6a1fd146108aa57600080fd5b8063e07fa3c1146107d0578063e985e9c5146107e5578063f2fde38b1461082e57600080fd5b8063b60307101461070e578063b88d4fde1461072e578063bd3fc6ae1461074e578063c460519014610765578063c87b56dd14610799578063d5abeb01146107b957600080fd5b80638da5cb5b1161012e5780638da5cb5b14610666578063931688cb1461068457806395d89b41146106a4578063a22cb465146106b9578063abcbb7b4146106d9578063ae386843146106ee57600080fd5b806370a08231146105ba578063715018a6146105da57806374210461146105ef5780637453bc86146106025780637d970e871461063b5780638456cb591461065157600080fd5b80633db7c23b1161021957806359e08fe1116101d257806359e08fe1146105225780635c22516a146105375780635c975abb14610557578063614723a2146105705780636352211e146105855780636c0360eb146105a557600080fd5b80633db7c23b146104835780633f4ba83a1461049a57806342842e0e146104af578063484b973c146104cf5780634ac48d7f146104e25780634f6ccce71461050257600080fd5b806311e247821161026b57806311e24782146103a557806318160ddd146103c55780632302cbda146103e457806323b872dd146104045780632a55205a146104245780632f745c591461046357600080fd5b806301ffc9a7146102b357806304634d8d146102e857806306fdde031461030a578063079fe40e1461032c578063081812fc14610365578063095ea7b314610385575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004614114565b6108ca565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506103086103033660046140ea565b6108ea565b005b34801561031657600080fd5b5061031f610972565b6040516102df9190614451565b34801561033857600080fd5b506101985461034d906001600160a01b031681565b6040516001600160a01b0390911681526020016102df565b34801561037157600080fd5b5061034d610380366004614262565b610a04565b34801561039157600080fd5b506103086103a0366004614035565b610a99565b3480156103b157600080fd5b506103086103c03660046142de565b610baf565b3480156103d157600080fd5b5060cb545b6040519081526020016102df565b3480156103f057600080fd5b506103086103ff36600461414e565b611188565b34801561041057600080fd5b5061030861041f366004613f41565b611203565b34801561043057600080fd5b5061044461043f36600461427b565b611234565b604080516001600160a01b0390931683526020830191909152016102df565b34801561046f57600080fd5b506103d661047e366004614035565b6112e2565b34801561048f57600080fd5b506103d66101925481565b3480156104a657600080fd5b50610308611378565b3480156104bb57600080fd5b506103086104ca366004613f41565b6113ac565b6103086104dd366004614035565b6113c7565b3480156104ee57600080fd5b506102d36104fd3660046142c3565b6115ef565b34801561050e57600080fd5b506103d661051d366004614262565b61167c565b34801561052e57600080fd5b506102d361170f565b34801561054357600080fd5b506103d661055236600461405f565b611720565b34801561056357600080fd5b5061012d5460ff166102d3565b34801561057c57600080fd5b506103d6611853565b34801561059157600080fd5b5061034d6105a0366004614262565b6118b5565b3480156105b157600080fd5b5061031f61192c565b3480156105c657600080fd5b506103d66105d5366004613ef3565b6119bb565b3480156105e657600080fd5b50610308611a42565b6103086105fd36600461429d565b611a76565b34801561060e57600080fd5b506103d661061d36600461405f565b6101b560209081526000928352604080842090915290825290205481565b34801561064757600080fd5b506103d661271081565b34801561065d57600080fd5b50610308612056565b34801561067257600080fd5b5060fb546001600160a01b031661034d565b34801561069057600080fd5b5061030861069f36600461414e565b612088565b3480156106b057600080fd5b5061031f6120f8565b3480156106c557600080fd5b506103086106d4366004613ff9565b612107565b3480156106e557600080fd5b5061031f612116565b3480156106fa57600080fd5b50610308610709366004614183565b612124565b34801561071a57600080fd5b50610308610729366004614262565b612351565b34801561073a57600080fd5b50610308610749366004613f7d565b61243b565b34801561075a57600080fd5b506103d66101935481565b34801561077157600080fd5b50610785610780366004614262565b612473565b6040516102df98979695949392919061440d565b3480156107a557600080fd5b5061031f6107b4366004614262565b6124c6565b3480156107c557600080fd5b506103d66101915481565b3480156107dc57600080fd5b5061030861261d565b3480156107f157600080fd5b506102d3610800366004613f0e565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b34801561083a57600080fd5b50610308610849366004613ef3565b61292b565b34801561085a57600080fd5b50610863600481565b60405160ff90911681526020016102df565b34801561088157600080fd5b50610308610890366004613ef3565b6129c6565b3480156108a157600080fd5b506102d3612ada565b3480156108b657600080fd5b506102d36108c5366004614089565b612b0a565b60006108d582612b53565b806108e457506108e482612b88565b92915050565b60fb546001600160a01b0316331461091d5760405162461bcd60e51b8152600401610914906145dc565b60405180910390fd5b6109278282612bad565b6040516001600160601b03821681526001600160a01b038316907fa1edde4ed5c1392c90dccd8e051a4080b761850e49a24c77d826348a51e1f8dc9060200160405180910390a25050565b60606097805461098190614828565b80601f01602080910402602001604051908101604052809291908181526020018280546109ad90614828565b80156109fa5780601f106109cf576101008083540402835291602001916109fa565b820191906000526020600020905b8154815290600101906020018083116109dd57829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316610a7d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610914565b506000908152609b60205260409020546001600160a01b031690565b6000610aa4826118b5565b9050806001600160a01b0316836001600160a01b03161415610b125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610914565b336001600160a01b0382161480610b2e5750610b2e8133610800565b610ba05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610914565b610baa8383612caa565b505050565b60fb546001600160a01b03163314610bd95760405162461bcd60e51b8152600401610914906145dc565b878686600460ff841610610c1d5760405162461bcd60e51b815260206004820152600b60248201526a1a5b9d985b1a59081cda5960aa1b6044820152606401610914565b6101998360ff1660048110610c3457610c34614904565b6007020154610100900460ff1615610ca257426101998460ff1660048110610c5e57610c5e614904565b600702016002015411610ca25760405162461bcd60e51b815260206004820152600c60248201526b1cd85b19481cdd185c9d195960a21b6044820152606401610914565b428211610ce95760405162461bcd60e51b81526020600482015260156024820152741cdd185c9d151a5b59481a5b881d1a19481c185cdd605a1b6044820152606401610914565b818111610d475760405162461bcd60e51b815260206004820152602660248201527f656e6454696d65206d7573742062652067726561746572207468616e20737461604482015265727454696d6560d01b6064820152608401610914565b60005b600460ff82161015610e9c578360ff168160ff16108015610d8b57506101998160ff1660048110610d7d57610d7d614904565b6007020154610100900460ff165b15610df1576101998160ff1660048110610da757610da7614904565b60070201600301548311610df15760405162461bcd60e51b8152602060048201526011602482015270696e76616c696420737461727454696d6560781b6044820152606401610914565b8360ff168160ff16118015610e2657506101998160ff1660048110610e1857610e18614904565b6007020154610100900460ff165b15610e8a576101998160ff1660048110610e4257610e42614904565b60070201600201548210610e8a5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420656e6454696d6560881b6044820152606401610914565b80610e9481614878565b915050610d4a565b5060008711610ee65760405162461bcd60e51b81526020600482015260166024820152756c696d69744d696e745065725478206973207a65726f60501b6044820152606401610914565b60008611610f365760405162461bcd60e51b815260206004820152601a60248201527f6c696d69744d696e7450657257616c6c6574206973207a65726f0000000000006044820152606401610914565b85871115610f9b5760405162461bcd60e51b815260206004820152602c60248201527f6c696d69744d696e745065725478206d757374206265203c3d206c696d69744d60448201526b1a5b9d14195c95d85b1b195d60a21b6064820152608401610914565b6000856001811115610faf57610faf6148d8565b1415610ff65783610ff65760405162461bcd60e51b8152602060048201526011602482015270195b5c1d1e481b595c9adb19481c9bdbdd607a1b6044820152606401610914565b896101998c60ff166004811061100e5761100e614904565b6007020160010181905550886101998c60ff166004811061103157611031614904565b6007020160020181905550876101998c60ff166004811061105457611054614904565b6007020160030181905550866101998c60ff166004811061107757611077614904565b6007020160040181905550856101998c60ff166004811061109a5761109a614904565b6007020160050181905550846101998c60ff16600481106110bd576110bd614904565b60070201805460ff1916600183818111156110da576110da6148d8565b0217905550836101998c60ff16600481106110f7576110f7614904565b600702016006018190555060016101998c60ff166004811061111b5761111b614904565b6007020180549115156101000261ff00199092169190911790556040517fc6af485b603cbea45e70b8f531bbec3264699ac0564e8274a9e4c785d32c59eb90611173908d908d908d908d908d908d908d908d9061470d565b60405180910390a15050505050505050505050565b60fb546001600160a01b031633146111b25760405162461bcd60e51b8152600401610914906145dc565b80516111c690610195906020840190613d49565b507f7df5153ebb907344979c6825b8fb24653d7ce0ba79299bfa56bdbe65aca826af6101956040516111f89190614464565b60405180910390a150565b61120d3382612d18565b6112295760405162461bcd60e51b815260040161091490614611565b610baa838383612e0e565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112a95750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906112c8906001600160601b031687614786565b6112d29190614772565b91519350909150505b9250929050565b60006112ed836119bb565b821061134f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610914565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b60fb546001600160a01b031633146113a25760405162461bcd60e51b8152600401610914906145dc565b6113aa612fb5565b565b610baa8383836040518060200160405280600081525061243b565b600261015f5414156113eb5760405162461bcd60e51b8152600401610914906146ad565b600261015f5560fb546001600160a01b0316331461141b5760405162461bcd60e51b8152600401610914906145dc565b611423612ada565b156114635760405162461bcd60e51b815260206004820152601060248201526f73616c65206973206f6e20676f696e6760801b6044820152606401610914565b6001600160a01b0382166114b15760405162461bcd60e51b81526020600482015260156024820152741859191c995cdcc80c081b9bdd08185b1b1bddd959605a1b6044820152606401610914565b600081116115015760405162461bcd60e51b815260206004820152601a60248201527f6d696e74696e672030204e465473206e6f7420616c6c6f7765640000000000006044820152606401610914565b6101915460cb54611512908361475a565b11156115545760405162461bcd60e51b8152602060048201526011602482015270657863656564206d617820737570706c7960781b6044820152606401610914565b60005b818110156115cc57600061156a60cb5490565b9050611576848261304a565b836001600160a01b03167f332f28a41d8fe90686532a9bf4e369e4c895d17358bbb4e639d072c79e0058d7826040516115b191815260200190565b60405180910390a250806115c48161485d565b915050611557565b508061019360008282546115e0919061475a565b9091555050600161015f555050565b6000600460ff8316106116145760405162461bcd60e51b8152600401610914906146e4565b6101998260ff166004811061162b5761162b614904565b6007020154610100900460ff166116545760405162461bcd60e51b81526004016109149061455e565b6101998260ff166004811061166b5761166b614904565b600702016003015442119050919050565b600061168760cb5490565b82106116ea5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610914565b60cb82815481106116fd576116fd614904565b90600052602060002001549050919050565b6000611719613064565b4211905090565b6000600460ff8316106117455760405162461bcd60e51b8152600401610914906146e4565b60006101998360ff166004811061175e5761175e614904565b604080516101008101909152600791909102919091018054829060ff16600181111561178c5761178c6148d8565b600181111561179d5761179d6148d8565b81528154610100900460ff161515602080830191909152600183015460408301526002830154606083015260038301546080830152600483015460a0830152600583015460c083015260069092015460e0909101528101519091506118145760405162461bcd60e51b81526004016109149061455e565b6001600160a01b03841660009081526101b56020908152604080832060ff8716845290915290205460c082015161184b91906147a5565b949350505050565b6000806101935461186360cb5490565b61186d91906147a5565b9050610191546101925461019354611885919061475a565b11156118a25760cb546101915461189c91906147a5565b91505090565b806101925461189c91906147a5565b5090565b6000818152609960205260408120546001600160a01b0316806108e45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610914565b610194805461193a90614828565b80601f016020809104026020016040519081016040528092919081815260200182805461196690614828565b80156119b35780601f10611988576101008083540402835291602001916119b3565b820191906000526020600020905b81548152906001019060200180831161199657829003601f168201915b505050505081565b60006001600160a01b038216611a265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610914565b506001600160a01b03166000908152609a602052604090205490565b60fb546001600160a01b03163314611a6c5760405162461bcd60e51b8152600401610914906145dc565b6113aa60006130ee565b600261015f541415611a9a5760405162461bcd60e51b8152600401610914906146ad565b600261015f5561012d5460ff1615611ae75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610914565b600460ff841610611b0a5760405162461bcd60e51b8152600401610914906146e4565b60006101998460ff1660048110611b2357611b23614904565b604080516101008101909152600791909102919091018054829060ff166001811115611b5157611b516148d8565b6001811115611b6257611b626148d8565b81528154610100900460ff161515602080830191909152600183015460408301526002830154606083015260038301546080830152600483015460a0830152600583015460c083015260069092015460e090910152810151909150611bd95760405162461bcd60e51b81526004016109149061455e565b611c17338585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061314092505050565b611c635760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610914565b4281606001511115611caa5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d081b9bdd081cdd185c9d195960821b6044820152606401610914565b4281608001511015611cef5760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a185cc8195b99195960921b6044820152606401610914565b60008511611d3f5760405162461bcd60e51b815260206004820152601960248201527f6d696e74696e672030204e4654206e6f7420616c6c6f776564000000000000006044820152606401610914565b8060a00151851115611d935760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178206d696e74207065722074786e0000000000000000006044820152606401610914565b60c08101513360009081526101b56020908152604080832060ff89168452909152902054611dc290879061475a565b1115611e105760405162461bcd60e51b815260206004820152601a60248201527f657863656564206d6178206d696e74207065722077616c6c65740000000000006044820152606401610914565b611e18611853565b851115611e7a5760405162461bcd60e51b815260206004820152602a60248201527f6d696e7420616d6f756e7420657863656564206d617820616c6c6f636174696f6044820152696e20666f722073616c6560b01b6064820152608401610914565b848160400151611e8a9190614786565b341015611ed95760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656e6f756768207061796d656e742070726f766964656400000000006044820152606401610914565b848160400151611ee99190614786565b341115611faa576000858260400151611f029190614786565b611f0c90346147a5565b604051909150600090339083908381818185875af1925050503d8060008114611f51576040519150601f19603f3d011682016040523d82523d6000602084013e611f56565b606091505b5050905080611fa75760405162461bcd60e51b815260206004820152601760248201527f726566756e6420746f206275796572206661696c65642e0000000000000000006044820152606401610914565b50505b3360009081526101b56020908152604080832060ff8816845290915281208054879290611fd890849061475a565b90915550600090505b85811015612048576000611ff460cb5490565b9050612000338261304a565b60405181815233907f1f89f147a58d1673945cf416187db98efc8208408c011b91887acd59fd8523c39060200160405180910390a250806120408161485d565b915050611fe1565b5050600161015f5550505050565b60fb546001600160a01b031633146120805760405162461bcd60e51b8152600401610914906145dc565b6113aa6132b0565b60fb546001600160a01b031633146120b25760405162461bcd60e51b8152600401610914906145dc565b80516120c690610194906020840190613d49565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df96101946040516111f89190614464565b60606098805461098190614828565b61211233838361332d565b5050565b610195805461193a90614828565b600061213060016133fc565b90508015612148576000805461ff0019166101001790555b6121528a8a613489565b61215a6134ba565b6121626134e9565b61216a61351d565b6001600160a01b0386166121b25760405162461bcd60e51b815260206004820152600f60248201526e06f776e65722061646472657373203608c1b6044820152606401610914565b600087116121f75760405162461bcd60e51b81526020600482015260126024820152716d617820737570706c79206973207a65726f60701b6044820152606401610914565b60008851116122415760405162461bcd60e51b8152602060048201526016602482015275656d7074792064656661756c7420626173652055524960501b6044820152606401610914565b8751612255906101959060208b0190613d49565b5061019187905561019287905561226b8661292b565b6127108511156122bd5760405162461bcd60e51b815260206004820152601c60248201527f6d696e74206665652077696c6c206578636565642062616c616e6365000000006044820152606401610914565b61019780546001600160a01b038087166001600160a01b0319928316179092556101968790556101988054928916929091169190911790556122ff8284612bad565b8015612345576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b60fb546001600160a01b0316331461237b5760405162461bcd60e51b8152600401610914906145dc565b610191548111156123c25760405162461bcd60e51b8152602060048201526011602482015270746f6f2068696768206d61782073616c6560781b6044820152606401610914565b600081116124055760405162461bcd60e51b815260206004820152601060248201526f746f6f206c6f77206d61782073616c6560801b6044820152606401610914565b6101928190556040518181527ffef594fc02f400aa64708ff8eb779e20d1ac3a524bccff5fcf471ec0f8f42317906020016111f8565b6124453383612d18565b6124615760405162461bcd60e51b815260040161091490614611565b61246d8484848461354c565b50505050565b610199816004811061248457600080fd5b6007020180546001820154600283015460038401546004850154600586015460069096015460ff80871698506101009096049095169593949293919290919088565b6000818152609960205260409020546060906001600160a01b03166125455760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610914565b600061254f61357f565b905060008151116125eb57610195805461256890614828565b80601f016020809104026020016040519081016040528092919081815260200182805461259490614828565b80156125e15780601f106125b6576101008083540402835291602001916125e1565b820191906000526020600020905b8154815290600101906020018083116125c457829003601f168201915b5050505050612616565b806125f58461358f565b6040516020016126069291906143a1565b6040516020818303038152906040525b9392505050565b600261015f5414156126415760405162461bcd60e51b8152600401610914906146ad565b600261015f5560fb546001600160a01b031633146126715760405162461bcd60e51b8152600401610914906145dc565b612679613064565b42116126b75760405162461bcd60e51b815260206004820152600d60248201526c39b0b632903737ba1037bb32b960991b6044820152606401610914565b610198546001600160a01b03166127105760405162461bcd60e51b815260206004820181905260248201527f7072696d6172792073616c6520726563697069656e74206164647265737320306044820152606401610914565b610196541561283657610196544790600090612710906127309084614786565b61273a9190614772565b610197546040519192506000916001600160a01b039091169083908381818185875af1925050503d806000811461278d576040519150601f19603f3d011682016040523d82523d6000602084013e612792565b606091505b50509050806127ef5760405162461bcd60e51b8152602060048201526024808201527f7472616e7366657220746f206d696e74466565526563697069656e74206661696044820152633632b21760e11b6064820152608401610914565b610197546040518381526001600160a01b03909116907f09ad672d4e7c4892da934d1051932ebe9ec4b6ec8c3f40d569176db3e93e5abe9060200160405180910390a25050505b6101985460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114612888576040519150601f19603f3d011682016040523d82523d6000602084013e61288d565b606091505b50509050806128de5760405162461bcd60e51b815260206004820152601e60248201527f7472616e7366657220746f206d73672073656e646572206661696c65642e00006044820152606401610914565b610198546040518381526001600160a01b03909116907f09ad672d4e7c4892da934d1051932ebe9ec4b6ec8c3f40d569176db3e93e5abe9060200160405180910390a25050600161015f55565b60fb546001600160a01b031633146129555760405162461bcd60e51b8152600401610914906145dc565b6001600160a01b0381166129ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610914565b6129c3816130ee565b50565b60fb546001600160a01b031633146129f05760405162461bcd60e51b8152600401610914906145dc565b6129f861368d565b4210612a355760405162461bcd60e51b815260206004820152600c60248201526b1cd85b19481cdd185c9d195960a21b6044820152606401610914565b6001600160a01b038116612a8b5760405162461bcd60e51b815260206004820181905260248201527f7072696d6172792073616c6520726563697069656e74206164647265737320306044820152606401610914565b61019880546001600160a01b0319166001600160a01b0383169081179091556040519081527fc1d3545135476ab444899a6e46e3eeceed8c12f63696b473fac67972cb642a33906020016111f8565b600080612ae561368d565b90506000612af1613064565b9050814210158015612b035750804211155b9250505090565b6000612b4a858585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061314092505050565b95945050505050565b60006001600160e01b0319821663152a902d60e11b14806108e457506301ffc9a760e01b6001600160e01b03198316146108e4565b60006001600160e01b0319821663780e9d6360e01b14806108e457506108e4826136ff565b6127106001600160601b0382161115612c1b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610914565b6001600160a01b038216612c715760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610914565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612cdf826118b5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b0316612d915760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610914565b6000612d9c836118b5565b9050806001600160a01b0316846001600160a01b03161480612de357506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b8061184b5750836001600160a01b0316612dfc84610a04565b6001600160a01b031614949350505050565b826001600160a01b0316612e21826118b5565b6001600160a01b031614612e855760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610914565b6001600160a01b038216612ee75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610914565b612ef283838361373f565b612efd600082612caa565b6001600160a01b0383166000908152609a60205260408120805460019290612f269084906147a5565b90915550506001600160a01b0382166000908152609a60205260408120805460019290612f5490849061475a565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61012d5460ff16612fff5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610914565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6121128282604051806020016040528060008152506137f7565b60008060045b60ff8116156130e8576101996130816001836147bc565b60ff166004811061309457613094614904565b6007020154610100900460ff16156130d6576101996130b46001836147bc565b60ff16600481106130c7576130c7614904565b600702016003015491506130e8565b806130e08161480b565b91505061306a565b50919050565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000600460ff8416106131655760405162461bcd60e51b8152600401610914906146e4565b6101998360ff166004811061317c5761317c614904565b6007020154610100900460ff166131a55760405162461bcd60e51b81526004016109149061455e565b60016101998460ff16600481106131be576131be614904565b600702015460ff1660018111156131d7576131d76148d8565b14156131e557506001612616565b6101998360ff16600481106131fc576131fc614904565b60070201600601546000801b141561324d5760405162461bcd60e51b81526020600482015260146024820152731dda1a5d195b1a5cdd081a5cc81b9bdd081cd95d60621b6044820152606401610914565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050612b4a836101998660ff16600481106132a2576132a2614904565b60070201600601548361382a565b61012d5460ff16156132f75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610914565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861302d3390565b816001600160a01b0316836001600160a01b0316141561338f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610914565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008054610100900460ff1615613443578160ff16600114801561341f5750303b155b61343b5760405162461bcd60e51b81526004016109149061458e565b506000919050565b60005460ff80841691161061346a5760405162461bcd60e51b81526004016109149061458e565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166134b05760405162461bcd60e51b815260040161091490614662565b6121128282613840565b600054610100900460ff166134e15760405162461bcd60e51b815260040161091490614662565b6113aa61388e565b600054610100900460ff166135105760405162461bcd60e51b815260040161091490614662565b61012d805460ff19169055565b600054610100900460ff166135445760405162461bcd60e51b815260040161091490614662565b6113aa6138be565b613557848484612e0e565b613563848484846138ed565b61246d5760405162461bcd60e51b81526004016109149061450c565b6060610194805461098190614828565b6060816135b35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156135dd57806135c78161485d565b91506135d69050600a83614772565b91506135b7565b60008167ffffffffffffffff8111156135f8576135f861491a565b6040519080825280601f01601f191660200182016040528015613622576020820181803683370190505b5090505b841561184b576136376001836147a5565b9150613644600a86614898565b61364f90603061475a565b60f81b81838151811061366457613664614904565b60200101906001600160f81b031916908160001a905350613686600a86614772565b9450613626565b600080805b600460ff821610156130e8576101998160ff16600481106136b5576136b5614904565b6007020154610100900460ff16156136ed576101998160ff16600481106136de576136de614904565b600702016002015491506130e8565b806136f781614878565b915050613692565b60006001600160e01b031982166380ac58cd60e01b148061373057506001600160e01b03198216635b5e139f60e01b145b806108e457506108e482612b53565b6001600160a01b03831661379a576137958160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b6137bd565b816001600160a01b0316836001600160a01b0316146137bd576137bd83826139f7565b6001600160a01b0382166137d457610baa81613a94565b826001600160a01b0316826001600160a01b031614610baa57610baa8282613b43565b6138018383613b87565b61380e60008484846138ed565b610baa5760405162461bcd60e51b81526004016109149061450c565b6000826138378584613cd5565b14949350505050565b600054610100900460ff166138675760405162461bcd60e51b815260040161091490614662565b815161387a906097906020850190613d49565b508051610baa906098906020840190613d49565b600054610100900460ff166138b55760405162461bcd60e51b815260040161091490614662565b6113aa336130ee565b600054610100900460ff166138e55760405162461bcd60e51b815260040161091490614662565b600161015f55565b60006001600160a01b0384163b156139ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906139319033908990889088906004016143d0565b602060405180830381600087803b15801561394b57600080fd5b505af192505050801561397b575060408051601f3d908101601f1916820190925261397891810190614131565b60015b6139d5573d8080156139a9576040519150601f19603f3d011682016040523d82523d6000602084013e6139ae565b606091505b5080516139cd5760405162461bcd60e51b81526004016109149061450c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061184b565b50600161184b565b60006001613a04846119bb565b613a0e91906147a5565b600083815260ca6020526040902054909150808214613a61576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090613aa6906001906147a5565b600083815260cc602052604081205460cb8054939450909284908110613ace57613ace614904565b906000526020600020015490508060cb8381548110613aef57613aef614904565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480613b2757613b276148ee565b6001900381819060005260206000200160009055905550505050565b6000613b4e836119bb565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6001600160a01b038216613bdd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610914565b6000818152609960205260409020546001600160a01b031615613c425760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610914565b613c4e6000838361373f565b6001600160a01b0382166000908152609a60205260408120805460019290613c7790849061475a565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815b8451811015613d41576000858281518110613cf757613cf7614904565b60200260200101519050808311613d1d5760008381526020829052604090209250613d2e565b600081815260208490526040902092505b5080613d398161485d565b915050613cda565b509392505050565b828054613d5590614828565b90600052602060002090601f016020900481019282613d775760008555613dbd565b82601f10613d9057805160ff1916838001178555613dbd565b82800160010185558215613dbd579182015b82811115613dbd578251825591602001919060010190613da2565b506118b19291505b808211156118b15760008155600101613dc5565b600067ffffffffffffffff80841115613df457613df461491a565b604051601f8501601f19908116603f01168101908282118183101715613e1c57613e1c61491a565b81604052809350858152868686011115613e3557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461348457600080fd5b60008083601f840112613e7857600080fd5b50813567ffffffffffffffff811115613e9057600080fd5b6020830191508360208260051b85010111156112db57600080fd5b600082601f830112613ebc57600080fd5b61261683833560208501613dd9565b803560ff8116811461348457600080fd5b80356001600160601b038116811461348457600080fd5b600060208284031215613f0557600080fd5b61261682613e4f565b60008060408385031215613f2157600080fd5b613f2a83613e4f565b9150613f3860208401613e4f565b90509250929050565b600080600060608486031215613f5657600080fd5b613f5f84613e4f565b9250613f6d60208501613e4f565b9150604084013590509250925092565b60008060008060808587031215613f9357600080fd5b613f9c85613e4f565b9350613faa60208601613e4f565b925060408501359150606085013567ffffffffffffffff811115613fcd57600080fd5b8501601f81018713613fde57600080fd5b613fed87823560208401613dd9565b91505092959194509250565b6000806040838503121561400c57600080fd5b61401583613e4f565b91506020830135801515811461402a57600080fd5b809150509250929050565b6000806040838503121561404857600080fd5b61405183613e4f565b946020939093013593505050565b6000806040838503121561407257600080fd5b61407b83613e4f565b9150613f3860208401613ecb565b6000806000806060858703121561409f57600080fd5b6140a885613e4f565b93506140b660208601613ecb565b9250604085013567ffffffffffffffff8111156140d257600080fd5b6140de87828801613e66565b95989497509550505050565b600080604083850312156140fd57600080fd5b61410683613e4f565b9150613f3860208401613edc565b60006020828403121561412657600080fd5b813561261681614930565b60006020828403121561414357600080fd5b815161261681614930565b60006020828403121561416057600080fd5b813567ffffffffffffffff81111561417757600080fd5b61184b84828501613eab565b60008060008060008060008060006101208a8c0312156141a257600080fd5b893567ffffffffffffffff808211156141ba57600080fd5b6141c68d838e01613eab565b9a5060208c01359150808211156141dc57600080fd5b6141e88d838e01613eab565b995060408c01359150808211156141fe57600080fd5b5061420b8c828d01613eab565b97505060608a0135955061422160808b01613e4f565b945060a08a0135935061423660c08b01613e4f565b925061424460e08b01613edc565b91506142536101008b01613e4f565b90509295985092959850929598565b60006020828403121561427457600080fd5b5035919050565b6000806040838503121561428e57600080fd5b50508035926020909101359150565b600080600080606085870312156142b357600080fd5b843593506140b660208601613ecb565b6000602082840312156142d557600080fd5b61261682613ecb565b600080600080600080600080610100898b0312156142fb57600080fd5b61430489613ecb565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c08901356002811061433b57600080fd5b8092505060e089013590509295985092959890939650565b6000815180845261436b8160208601602086016147df565b601f01601f19169290920160200192915050565b6002811061439d57634e487b7160e01b600052602160045260246000fd5b9052565b600083516143b38184602088016147df565b8351908301906143c78183602088016147df565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061440390830184614353565b9695505050505050565b610100810161441c828b61437f565b971515602082015260408101969096526060860194909452608085019290925260a084015260c083015260e090910152919050565b6020815260006126166020830184614353565b600060208083526000845481600182811c91508083168061448657607f831692505b8583108114156144a457634e487b7160e01b85526022600452602485fd5b8786018381526020018180156144c157600181146144d2576144fd565b60ff198616825287820196506144fd565b60008b81526020902060005b868110156144f7578154848201529085019089016144de565b83019750505b50949998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601690820152751cd85b19481a5cc81b9bdd0818dbdb999a59dd5c995960521b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600f908201526e1a5b9d985b1a59081cd85b19481a59608a1b604082015260600190565b60006101008201905060ff8a1682528860208301528760408301528660608301528560808301528460a083015261474760c083018561437f565b8260e08301529998505050505050505050565b6000821982111561476d5761476d6148ac565b500190565b600082614781576147816148c2565b500490565b60008160001904831182151516156147a0576147a06148ac565b500290565b6000828210156147b7576147b76148ac565b500390565b600060ff821660ff8416808210156147d6576147d66148ac565b90039392505050565b60005b838110156147fa5781810151838201526020016147e2565b8381111561246d5750506000910152565b600060ff82168061481e5761481e6148ac565b6000190192915050565b600181811c9082168061483c57607f821691505b602082108114156130e857634e487b7160e01b600052602260045260246000fd5b6000600019821415614871576148716148ac565b5060010190565b600060ff821660ff81141561488f5761488f6148ac565b60010192915050565b6000826148a7576148a76148c2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146129c357600080fdfea26469706673582212201df45885fa69c289e50f9c68ca69fd8b4e1165cc17a4914673969d435b59645364736f6c63430008070033
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c806370a0823111610175578063b6030710116100dc578063e07fa3c111610095578063f37bb3cf1161006f578063f37bb3cf1461084e578063f63f244914610875578063f71143ca14610895578063f9a6a1fd146108aa57600080fd5b8063e07fa3c1146107d0578063e985e9c5146107e5578063f2fde38b1461082e57600080fd5b8063b60307101461070e578063b88d4fde1461072e578063bd3fc6ae1461074e578063c460519014610765578063c87b56dd14610799578063d5abeb01146107b957600080fd5b80638da5cb5b1161012e5780638da5cb5b14610666578063931688cb1461068457806395d89b41146106a4578063a22cb465146106b9578063abcbb7b4146106d9578063ae386843146106ee57600080fd5b806370a08231146105ba578063715018a6146105da57806374210461146105ef5780637453bc86146106025780637d970e871461063b5780638456cb591461065157600080fd5b80633db7c23b1161021957806359e08fe1116101d257806359e08fe1146105225780635c22516a146105375780635c975abb14610557578063614723a2146105705780636352211e146105855780636c0360eb146105a557600080fd5b80633db7c23b146104835780633f4ba83a1461049a57806342842e0e146104af578063484b973c146104cf5780634ac48d7f146104e25780634f6ccce71461050257600080fd5b806311e247821161026b57806311e24782146103a557806318160ddd146103c55780632302cbda146103e457806323b872dd146104045780632a55205a146104245780632f745c591461046357600080fd5b806301ffc9a7146102b357806304634d8d146102e857806306fdde031461030a578063079fe40e1461032c578063081812fc14610365578063095ea7b314610385575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004614114565b6108ca565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506103086103033660046140ea565b6108ea565b005b34801561031657600080fd5b5061031f610972565b6040516102df9190614451565b34801561033857600080fd5b506101985461034d906001600160a01b031681565b6040516001600160a01b0390911681526020016102df565b34801561037157600080fd5b5061034d610380366004614262565b610a04565b34801561039157600080fd5b506103086103a0366004614035565b610a99565b3480156103b157600080fd5b506103086103c03660046142de565b610baf565b3480156103d157600080fd5b5060cb545b6040519081526020016102df565b3480156103f057600080fd5b506103086103ff36600461414e565b611188565b34801561041057600080fd5b5061030861041f366004613f41565b611203565b34801561043057600080fd5b5061044461043f36600461427b565b611234565b604080516001600160a01b0390931683526020830191909152016102df565b34801561046f57600080fd5b506103d661047e366004614035565b6112e2565b34801561048f57600080fd5b506103d66101925481565b3480156104a657600080fd5b50610308611378565b3480156104bb57600080fd5b506103086104ca366004613f41565b6113ac565b6103086104dd366004614035565b6113c7565b3480156104ee57600080fd5b506102d36104fd3660046142c3565b6115ef565b34801561050e57600080fd5b506103d661051d366004614262565b61167c565b34801561052e57600080fd5b506102d361170f565b34801561054357600080fd5b506103d661055236600461405f565b611720565b34801561056357600080fd5b5061012d5460ff166102d3565b34801561057c57600080fd5b506103d6611853565b34801561059157600080fd5b5061034d6105a0366004614262565b6118b5565b3480156105b157600080fd5b5061031f61192c565b3480156105c657600080fd5b506103d66105d5366004613ef3565b6119bb565b3480156105e657600080fd5b50610308611a42565b6103086105fd36600461429d565b611a76565b34801561060e57600080fd5b506103d661061d36600461405f565b6101b560209081526000928352604080842090915290825290205481565b34801561064757600080fd5b506103d661271081565b34801561065d57600080fd5b50610308612056565b34801561067257600080fd5b5060fb546001600160a01b031661034d565b34801561069057600080fd5b5061030861069f36600461414e565b612088565b3480156106b057600080fd5b5061031f6120f8565b3480156106c557600080fd5b506103086106d4366004613ff9565b612107565b3480156106e557600080fd5b5061031f612116565b3480156106fa57600080fd5b50610308610709366004614183565b612124565b34801561071a57600080fd5b50610308610729366004614262565b612351565b34801561073a57600080fd5b50610308610749366004613f7d565b61243b565b34801561075a57600080fd5b506103d66101935481565b34801561077157600080fd5b50610785610780366004614262565b612473565b6040516102df98979695949392919061440d565b3480156107a557600080fd5b5061031f6107b4366004614262565b6124c6565b3480156107c557600080fd5b506103d66101915481565b3480156107dc57600080fd5b5061030861261d565b3480156107f157600080fd5b506102d3610800366004613f0e565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b34801561083a57600080fd5b50610308610849366004613ef3565b61292b565b34801561085a57600080fd5b50610863600481565b60405160ff90911681526020016102df565b34801561088157600080fd5b50610308610890366004613ef3565b6129c6565b3480156108a157600080fd5b506102d3612ada565b3480156108b657600080fd5b506102d36108c5366004614089565b612b0a565b60006108d582612b53565b806108e457506108e482612b88565b92915050565b60fb546001600160a01b0316331461091d5760405162461bcd60e51b8152600401610914906145dc565b60405180910390fd5b6109278282612bad565b6040516001600160601b03821681526001600160a01b038316907fa1edde4ed5c1392c90dccd8e051a4080b761850e49a24c77d826348a51e1f8dc9060200160405180910390a25050565b60606097805461098190614828565b80601f01602080910402602001604051908101604052809291908181526020018280546109ad90614828565b80156109fa5780601f106109cf576101008083540402835291602001916109fa565b820191906000526020600020905b8154815290600101906020018083116109dd57829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316610a7d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610914565b506000908152609b60205260409020546001600160a01b031690565b6000610aa4826118b5565b9050806001600160a01b0316836001600160a01b03161415610b125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610914565b336001600160a01b0382161480610b2e5750610b2e8133610800565b610ba05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610914565b610baa8383612caa565b505050565b60fb546001600160a01b03163314610bd95760405162461bcd60e51b8152600401610914906145dc565b878686600460ff841610610c1d5760405162461bcd60e51b815260206004820152600b60248201526a1a5b9d985b1a59081cda5960aa1b6044820152606401610914565b6101998360ff1660048110610c3457610c34614904565b6007020154610100900460ff1615610ca257426101998460ff1660048110610c5e57610c5e614904565b600702016002015411610ca25760405162461bcd60e51b815260206004820152600c60248201526b1cd85b19481cdd185c9d195960a21b6044820152606401610914565b428211610ce95760405162461bcd60e51b81526020600482015260156024820152741cdd185c9d151a5b59481a5b881d1a19481c185cdd605a1b6044820152606401610914565b818111610d475760405162461bcd60e51b815260206004820152602660248201527f656e6454696d65206d7573742062652067726561746572207468616e20737461604482015265727454696d6560d01b6064820152608401610914565b60005b600460ff82161015610e9c578360ff168160ff16108015610d8b57506101998160ff1660048110610d7d57610d7d614904565b6007020154610100900460ff165b15610df1576101998160ff1660048110610da757610da7614904565b60070201600301548311610df15760405162461bcd60e51b8152602060048201526011602482015270696e76616c696420737461727454696d6560781b6044820152606401610914565b8360ff168160ff16118015610e2657506101998160ff1660048110610e1857610e18614904565b6007020154610100900460ff165b15610e8a576101998160ff1660048110610e4257610e42614904565b60070201600201548210610e8a5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420656e6454696d6560881b6044820152606401610914565b80610e9481614878565b915050610d4a565b5060008711610ee65760405162461bcd60e51b81526020600482015260166024820152756c696d69744d696e745065725478206973207a65726f60501b6044820152606401610914565b60008611610f365760405162461bcd60e51b815260206004820152601a60248201527f6c696d69744d696e7450657257616c6c6574206973207a65726f0000000000006044820152606401610914565b85871115610f9b5760405162461bcd60e51b815260206004820152602c60248201527f6c696d69744d696e745065725478206d757374206265203c3d206c696d69744d60448201526b1a5b9d14195c95d85b1b195d60a21b6064820152608401610914565b6000856001811115610faf57610faf6148d8565b1415610ff65783610ff65760405162461bcd60e51b8152602060048201526011602482015270195b5c1d1e481b595c9adb19481c9bdbdd607a1b6044820152606401610914565b896101998c60ff166004811061100e5761100e614904565b6007020160010181905550886101998c60ff166004811061103157611031614904565b6007020160020181905550876101998c60ff166004811061105457611054614904565b6007020160030181905550866101998c60ff166004811061107757611077614904565b6007020160040181905550856101998c60ff166004811061109a5761109a614904565b6007020160050181905550846101998c60ff16600481106110bd576110bd614904565b60070201805460ff1916600183818111156110da576110da6148d8565b0217905550836101998c60ff16600481106110f7576110f7614904565b600702016006018190555060016101998c60ff166004811061111b5761111b614904565b6007020180549115156101000261ff00199092169190911790556040517fc6af485b603cbea45e70b8f531bbec3264699ac0564e8274a9e4c785d32c59eb90611173908d908d908d908d908d908d908d908d9061470d565b60405180910390a15050505050505050505050565b60fb546001600160a01b031633146111b25760405162461bcd60e51b8152600401610914906145dc565b80516111c690610195906020840190613d49565b507f7df5153ebb907344979c6825b8fb24653d7ce0ba79299bfa56bdbe65aca826af6101956040516111f89190614464565b60405180910390a150565b61120d3382612d18565b6112295760405162461bcd60e51b815260040161091490614611565b610baa838383612e0e565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112a95750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906112c8906001600160601b031687614786565b6112d29190614772565b91519350909150505b9250929050565b60006112ed836119bb565b821061134f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610914565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b60fb546001600160a01b031633146113a25760405162461bcd60e51b8152600401610914906145dc565b6113aa612fb5565b565b610baa8383836040518060200160405280600081525061243b565b600261015f5414156113eb5760405162461bcd60e51b8152600401610914906146ad565b600261015f5560fb546001600160a01b0316331461141b5760405162461bcd60e51b8152600401610914906145dc565b611423612ada565b156114635760405162461bcd60e51b815260206004820152601060248201526f73616c65206973206f6e20676f696e6760801b6044820152606401610914565b6001600160a01b0382166114b15760405162461bcd60e51b81526020600482015260156024820152741859191c995cdcc80c081b9bdd08185b1b1bddd959605a1b6044820152606401610914565b600081116115015760405162461bcd60e51b815260206004820152601a60248201527f6d696e74696e672030204e465473206e6f7420616c6c6f7765640000000000006044820152606401610914565b6101915460cb54611512908361475a565b11156115545760405162461bcd60e51b8152602060048201526011602482015270657863656564206d617820737570706c7960781b6044820152606401610914565b60005b818110156115cc57600061156a60cb5490565b9050611576848261304a565b836001600160a01b03167f332f28a41d8fe90686532a9bf4e369e4c895d17358bbb4e639d072c79e0058d7826040516115b191815260200190565b60405180910390a250806115c48161485d565b915050611557565b508061019360008282546115e0919061475a565b9091555050600161015f555050565b6000600460ff8316106116145760405162461bcd60e51b8152600401610914906146e4565b6101998260ff166004811061162b5761162b614904565b6007020154610100900460ff166116545760405162461bcd60e51b81526004016109149061455e565b6101998260ff166004811061166b5761166b614904565b600702016003015442119050919050565b600061168760cb5490565b82106116ea5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610914565b60cb82815481106116fd576116fd614904565b90600052602060002001549050919050565b6000611719613064565b4211905090565b6000600460ff8316106117455760405162461bcd60e51b8152600401610914906146e4565b60006101998360ff166004811061175e5761175e614904565b604080516101008101909152600791909102919091018054829060ff16600181111561178c5761178c6148d8565b600181111561179d5761179d6148d8565b81528154610100900460ff161515602080830191909152600183015460408301526002830154606083015260038301546080830152600483015460a0830152600583015460c083015260069092015460e0909101528101519091506118145760405162461bcd60e51b81526004016109149061455e565b6001600160a01b03841660009081526101b56020908152604080832060ff8716845290915290205460c082015161184b91906147a5565b949350505050565b6000806101935461186360cb5490565b61186d91906147a5565b9050610191546101925461019354611885919061475a565b11156118a25760cb546101915461189c91906147a5565b91505090565b806101925461189c91906147a5565b5090565b6000818152609960205260408120546001600160a01b0316806108e45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610914565b610194805461193a90614828565b80601f016020809104026020016040519081016040528092919081815260200182805461196690614828565b80156119b35780601f10611988576101008083540402835291602001916119b3565b820191906000526020600020905b81548152906001019060200180831161199657829003601f168201915b505050505081565b60006001600160a01b038216611a265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610914565b506001600160a01b03166000908152609a602052604090205490565b60fb546001600160a01b03163314611a6c5760405162461bcd60e51b8152600401610914906145dc565b6113aa60006130ee565b600261015f541415611a9a5760405162461bcd60e51b8152600401610914906146ad565b600261015f5561012d5460ff1615611ae75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610914565b600460ff841610611b0a5760405162461bcd60e51b8152600401610914906146e4565b60006101998460ff1660048110611b2357611b23614904565b604080516101008101909152600791909102919091018054829060ff166001811115611b5157611b516148d8565b6001811115611b6257611b626148d8565b81528154610100900460ff161515602080830191909152600183015460408301526002830154606083015260038301546080830152600483015460a0830152600583015460c083015260069092015460e090910152810151909150611bd95760405162461bcd60e51b81526004016109149061455e565b611c17338585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061314092505050565b611c635760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610914565b4281606001511115611caa5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d081b9bdd081cdd185c9d195960821b6044820152606401610914565b4281608001511015611cef5760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a185cc8195b99195960921b6044820152606401610914565b60008511611d3f5760405162461bcd60e51b815260206004820152601960248201527f6d696e74696e672030204e4654206e6f7420616c6c6f776564000000000000006044820152606401610914565b8060a00151851115611d935760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178206d696e74207065722074786e0000000000000000006044820152606401610914565b60c08101513360009081526101b56020908152604080832060ff89168452909152902054611dc290879061475a565b1115611e105760405162461bcd60e51b815260206004820152601a60248201527f657863656564206d6178206d696e74207065722077616c6c65740000000000006044820152606401610914565b611e18611853565b851115611e7a5760405162461bcd60e51b815260206004820152602a60248201527f6d696e7420616d6f756e7420657863656564206d617820616c6c6f636174696f6044820152696e20666f722073616c6560b01b6064820152608401610914565b848160400151611e8a9190614786565b341015611ed95760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656e6f756768207061796d656e742070726f766964656400000000006044820152606401610914565b848160400151611ee99190614786565b341115611faa576000858260400151611f029190614786565b611f0c90346147a5565b604051909150600090339083908381818185875af1925050503d8060008114611f51576040519150601f19603f3d011682016040523d82523d6000602084013e611f56565b606091505b5050905080611fa75760405162461bcd60e51b815260206004820152601760248201527f726566756e6420746f206275796572206661696c65642e0000000000000000006044820152606401610914565b50505b3360009081526101b56020908152604080832060ff8816845290915281208054879290611fd890849061475a565b90915550600090505b85811015612048576000611ff460cb5490565b9050612000338261304a565b60405181815233907f1f89f147a58d1673945cf416187db98efc8208408c011b91887acd59fd8523c39060200160405180910390a250806120408161485d565b915050611fe1565b5050600161015f5550505050565b60fb546001600160a01b031633146120805760405162461bcd60e51b8152600401610914906145dc565b6113aa6132b0565b60fb546001600160a01b031633146120b25760405162461bcd60e51b8152600401610914906145dc565b80516120c690610194906020840190613d49565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df96101946040516111f89190614464565b60606098805461098190614828565b61211233838361332d565b5050565b610195805461193a90614828565b600061213060016133fc565b90508015612148576000805461ff0019166101001790555b6121528a8a613489565b61215a6134ba565b6121626134e9565b61216a61351d565b6001600160a01b0386166121b25760405162461bcd60e51b815260206004820152600f60248201526e06f776e65722061646472657373203608c1b6044820152606401610914565b600087116121f75760405162461bcd60e51b81526020600482015260126024820152716d617820737570706c79206973207a65726f60701b6044820152606401610914565b60008851116122415760405162461bcd60e51b8152602060048201526016602482015275656d7074792064656661756c7420626173652055524960501b6044820152606401610914565b8751612255906101959060208b0190613d49565b5061019187905561019287905561226b8661292b565b6127108511156122bd5760405162461bcd60e51b815260206004820152601c60248201527f6d696e74206665652077696c6c206578636565642062616c616e6365000000006044820152606401610914565b61019780546001600160a01b038087166001600160a01b0319928316179092556101968790556101988054928916929091169190911790556122ff8284612bad565b8015612345576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b60fb546001600160a01b0316331461237b5760405162461bcd60e51b8152600401610914906145dc565b610191548111156123c25760405162461bcd60e51b8152602060048201526011602482015270746f6f2068696768206d61782073616c6560781b6044820152606401610914565b600081116124055760405162461bcd60e51b815260206004820152601060248201526f746f6f206c6f77206d61782073616c6560801b6044820152606401610914565b6101928190556040518181527ffef594fc02f400aa64708ff8eb779e20d1ac3a524bccff5fcf471ec0f8f42317906020016111f8565b6124453383612d18565b6124615760405162461bcd60e51b815260040161091490614611565b61246d8484848461354c565b50505050565b610199816004811061248457600080fd5b6007020180546001820154600283015460038401546004850154600586015460069096015460ff80871698506101009096049095169593949293919290919088565b6000818152609960205260409020546060906001600160a01b03166125455760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610914565b600061254f61357f565b905060008151116125eb57610195805461256890614828565b80601f016020809104026020016040519081016040528092919081815260200182805461259490614828565b80156125e15780601f106125b6576101008083540402835291602001916125e1565b820191906000526020600020905b8154815290600101906020018083116125c457829003601f168201915b5050505050612616565b806125f58461358f565b6040516020016126069291906143a1565b6040516020818303038152906040525b9392505050565b600261015f5414156126415760405162461bcd60e51b8152600401610914906146ad565b600261015f5560fb546001600160a01b031633146126715760405162461bcd60e51b8152600401610914906145dc565b612679613064565b42116126b75760405162461bcd60e51b815260206004820152600d60248201526c39b0b632903737ba1037bb32b960991b6044820152606401610914565b610198546001600160a01b03166127105760405162461bcd60e51b815260206004820181905260248201527f7072696d6172792073616c6520726563697069656e74206164647265737320306044820152606401610914565b610196541561283657610196544790600090612710906127309084614786565b61273a9190614772565b610197546040519192506000916001600160a01b039091169083908381818185875af1925050503d806000811461278d576040519150601f19603f3d011682016040523d82523d6000602084013e612792565b606091505b50509050806127ef5760405162461bcd60e51b8152602060048201526024808201527f7472616e7366657220746f206d696e74466565526563697069656e74206661696044820152633632b21760e11b6064820152608401610914565b610197546040518381526001600160a01b03909116907f09ad672d4e7c4892da934d1051932ebe9ec4b6ec8c3f40d569176db3e93e5abe9060200160405180910390a25050505b6101985460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114612888576040519150601f19603f3d011682016040523d82523d6000602084013e61288d565b606091505b50509050806128de5760405162461bcd60e51b815260206004820152601e60248201527f7472616e7366657220746f206d73672073656e646572206661696c65642e00006044820152606401610914565b610198546040518381526001600160a01b03909116907f09ad672d4e7c4892da934d1051932ebe9ec4b6ec8c3f40d569176db3e93e5abe9060200160405180910390a25050600161015f55565b60fb546001600160a01b031633146129555760405162461bcd60e51b8152600401610914906145dc565b6001600160a01b0381166129ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610914565b6129c3816130ee565b50565b60fb546001600160a01b031633146129f05760405162461bcd60e51b8152600401610914906145dc565b6129f861368d565b4210612a355760405162461bcd60e51b815260206004820152600c60248201526b1cd85b19481cdd185c9d195960a21b6044820152606401610914565b6001600160a01b038116612a8b5760405162461bcd60e51b815260206004820181905260248201527f7072696d6172792073616c6520726563697069656e74206164647265737320306044820152606401610914565b61019880546001600160a01b0319166001600160a01b0383169081179091556040519081527fc1d3545135476ab444899a6e46e3eeceed8c12f63696b473fac67972cb642a33906020016111f8565b600080612ae561368d565b90506000612af1613064565b9050814210158015612b035750804211155b9250505090565b6000612b4a858585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061314092505050565b95945050505050565b60006001600160e01b0319821663152a902d60e11b14806108e457506301ffc9a760e01b6001600160e01b03198316146108e4565b60006001600160e01b0319821663780e9d6360e01b14806108e457506108e4826136ff565b6127106001600160601b0382161115612c1b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610914565b6001600160a01b038216612c715760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610914565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612cdf826118b5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b0316612d915760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610914565b6000612d9c836118b5565b9050806001600160a01b0316846001600160a01b03161480612de357506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b8061184b5750836001600160a01b0316612dfc84610a04565b6001600160a01b031614949350505050565b826001600160a01b0316612e21826118b5565b6001600160a01b031614612e855760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610914565b6001600160a01b038216612ee75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610914565b612ef283838361373f565b612efd600082612caa565b6001600160a01b0383166000908152609a60205260408120805460019290612f269084906147a5565b90915550506001600160a01b0382166000908152609a60205260408120805460019290612f5490849061475a565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61012d5460ff16612fff5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610914565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6121128282604051806020016040528060008152506137f7565b60008060045b60ff8116156130e8576101996130816001836147bc565b60ff166004811061309457613094614904565b6007020154610100900460ff16156130d6576101996130b46001836147bc565b60ff16600481106130c7576130c7614904565b600702016003015491506130e8565b806130e08161480b565b91505061306a565b50919050565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000600460ff8416106131655760405162461bcd60e51b8152600401610914906146e4565b6101998360ff166004811061317c5761317c614904565b6007020154610100900460ff166131a55760405162461bcd60e51b81526004016109149061455e565b60016101998460ff16600481106131be576131be614904565b600702015460ff1660018111156131d7576131d76148d8565b14156131e557506001612616565b6101998360ff16600481106131fc576131fc614904565b60070201600601546000801b141561324d5760405162461bcd60e51b81526020600482015260146024820152731dda1a5d195b1a5cdd081a5cc81b9bdd081cd95d60621b6044820152606401610914565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050612b4a836101998660ff16600481106132a2576132a2614904565b60070201600601548361382a565b61012d5460ff16156132f75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610914565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861302d3390565b816001600160a01b0316836001600160a01b0316141561338f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610914565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008054610100900460ff1615613443578160ff16600114801561341f5750303b155b61343b5760405162461bcd60e51b81526004016109149061458e565b506000919050565b60005460ff80841691161061346a5760405162461bcd60e51b81526004016109149061458e565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166134b05760405162461bcd60e51b815260040161091490614662565b6121128282613840565b600054610100900460ff166134e15760405162461bcd60e51b815260040161091490614662565b6113aa61388e565b600054610100900460ff166135105760405162461bcd60e51b815260040161091490614662565b61012d805460ff19169055565b600054610100900460ff166135445760405162461bcd60e51b815260040161091490614662565b6113aa6138be565b613557848484612e0e565b613563848484846138ed565b61246d5760405162461bcd60e51b81526004016109149061450c565b6060610194805461098190614828565b6060816135b35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156135dd57806135c78161485d565b91506135d69050600a83614772565b91506135b7565b60008167ffffffffffffffff8111156135f8576135f861491a565b6040519080825280601f01601f191660200182016040528015613622576020820181803683370190505b5090505b841561184b576136376001836147a5565b9150613644600a86614898565b61364f90603061475a565b60f81b81838151811061366457613664614904565b60200101906001600160f81b031916908160001a905350613686600a86614772565b9450613626565b600080805b600460ff821610156130e8576101998160ff16600481106136b5576136b5614904565b6007020154610100900460ff16156136ed576101998160ff16600481106136de576136de614904565b600702016002015491506130e8565b806136f781614878565b915050613692565b60006001600160e01b031982166380ac58cd60e01b148061373057506001600160e01b03198216635b5e139f60e01b145b806108e457506108e482612b53565b6001600160a01b03831661379a576137958160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b6137bd565b816001600160a01b0316836001600160a01b0316146137bd576137bd83826139f7565b6001600160a01b0382166137d457610baa81613a94565b826001600160a01b0316826001600160a01b031614610baa57610baa8282613b43565b6138018383613b87565b61380e60008484846138ed565b610baa5760405162461bcd60e51b81526004016109149061450c565b6000826138378584613cd5565b14949350505050565b600054610100900460ff166138675760405162461bcd60e51b815260040161091490614662565b815161387a906097906020850190613d49565b508051610baa906098906020840190613d49565b600054610100900460ff166138b55760405162461bcd60e51b815260040161091490614662565b6113aa336130ee565b600054610100900460ff166138e55760405162461bcd60e51b815260040161091490614662565b600161015f55565b60006001600160a01b0384163b156139ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906139319033908990889088906004016143d0565b602060405180830381600087803b15801561394b57600080fd5b505af192505050801561397b575060408051601f3d908101601f1916820190925261397891810190614131565b60015b6139d5573d8080156139a9576040519150601f19603f3d011682016040523d82523d6000602084013e6139ae565b606091505b5080516139cd5760405162461bcd60e51b81526004016109149061450c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061184b565b50600161184b565b60006001613a04846119bb565b613a0e91906147a5565b600083815260ca6020526040902054909150808214613a61576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090613aa6906001906147a5565b600083815260cc602052604081205460cb8054939450909284908110613ace57613ace614904565b906000526020600020015490508060cb8381548110613aef57613aef614904565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480613b2757613b276148ee565b6001900381819060005260206000200160009055905550505050565b6000613b4e836119bb565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6001600160a01b038216613bdd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610914565b6000818152609960205260409020546001600160a01b031615613c425760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610914565b613c4e6000838361373f565b6001600160a01b0382166000908152609a60205260408120805460019290613c7790849061475a565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815b8451811015613d41576000858281518110613cf757613cf7614904565b60200260200101519050808311613d1d5760008381526020829052604090209250613d2e565b600081815260208490526040902092505b5080613d398161485d565b915050613cda565b509392505050565b828054613d5590614828565b90600052602060002090601f016020900481019282613d775760008555613dbd565b82601f10613d9057805160ff1916838001178555613dbd565b82800160010185558215613dbd579182015b82811115613dbd578251825591602001919060010190613da2565b506118b19291505b808211156118b15760008155600101613dc5565b600067ffffffffffffffff80841115613df457613df461491a565b604051601f8501601f19908116603f01168101908282118183101715613e1c57613e1c61491a565b81604052809350858152868686011115613e3557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461348457600080fd5b60008083601f840112613e7857600080fd5b50813567ffffffffffffffff811115613e9057600080fd5b6020830191508360208260051b85010111156112db57600080fd5b600082601f830112613ebc57600080fd5b61261683833560208501613dd9565b803560ff8116811461348457600080fd5b80356001600160601b038116811461348457600080fd5b600060208284031215613f0557600080fd5b61261682613e4f565b60008060408385031215613f2157600080fd5b613f2a83613e4f565b9150613f3860208401613e4f565b90509250929050565b600080600060608486031215613f5657600080fd5b613f5f84613e4f565b9250613f6d60208501613e4f565b9150604084013590509250925092565b60008060008060808587031215613f9357600080fd5b613f9c85613e4f565b9350613faa60208601613e4f565b925060408501359150606085013567ffffffffffffffff811115613fcd57600080fd5b8501601f81018713613fde57600080fd5b613fed87823560208401613dd9565b91505092959194509250565b6000806040838503121561400c57600080fd5b61401583613e4f565b91506020830135801515811461402a57600080fd5b809150509250929050565b6000806040838503121561404857600080fd5b61405183613e4f565b946020939093013593505050565b6000806040838503121561407257600080fd5b61407b83613e4f565b9150613f3860208401613ecb565b6000806000806060858703121561409f57600080fd5b6140a885613e4f565b93506140b660208601613ecb565b9250604085013567ffffffffffffffff8111156140d257600080fd5b6140de87828801613e66565b95989497509550505050565b600080604083850312156140fd57600080fd5b61410683613e4f565b9150613f3860208401613edc565b60006020828403121561412657600080fd5b813561261681614930565b60006020828403121561414357600080fd5b815161261681614930565b60006020828403121561416057600080fd5b813567ffffffffffffffff81111561417757600080fd5b61184b84828501613eab565b60008060008060008060008060006101208a8c0312156141a257600080fd5b893567ffffffffffffffff808211156141ba57600080fd5b6141c68d838e01613eab565b9a5060208c01359150808211156141dc57600080fd5b6141e88d838e01613eab565b995060408c01359150808211156141fe57600080fd5b5061420b8c828d01613eab565b97505060608a0135955061422160808b01613e4f565b945060a08a0135935061423660c08b01613e4f565b925061424460e08b01613edc565b91506142536101008b01613e4f565b90509295985092959850929598565b60006020828403121561427457600080fd5b5035919050565b6000806040838503121561428e57600080fd5b50508035926020909101359150565b600080600080606085870312156142b357600080fd5b843593506140b660208601613ecb565b6000602082840312156142d557600080fd5b61261682613ecb565b600080600080600080600080610100898b0312156142fb57600080fd5b61430489613ecb565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c08901356002811061433b57600080fd5b8092505060e089013590509295985092959890939650565b6000815180845261436b8160208601602086016147df565b601f01601f19169290920160200192915050565b6002811061439d57634e487b7160e01b600052602160045260246000fd5b9052565b600083516143b38184602088016147df565b8351908301906143c78183602088016147df565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061440390830184614353565b9695505050505050565b610100810161441c828b61437f565b971515602082015260408101969096526060860194909452608085019290925260a084015260c083015260e090910152919050565b6020815260006126166020830184614353565b600060208083526000845481600182811c91508083168061448657607f831692505b8583108114156144a457634e487b7160e01b85526022600452602485fd5b8786018381526020018180156144c157600181146144d2576144fd565b60ff198616825287820196506144fd565b60008b81526020902060005b868110156144f7578154848201529085019089016144de565b83019750505b50949998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601690820152751cd85b19481a5cc81b9bdd0818dbdb999a59dd5c995960521b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600f908201526e1a5b9d985b1a59081cd85b19481a59608a1b604082015260600190565b60006101008201905060ff8a1682528860208301528760408301528660608301528560808301528460a083015261474760c083018561437f565b8260e08301529998505050505050505050565b6000821982111561476d5761476d6148ac565b500190565b600082614781576147816148c2565b500490565b60008160001904831182151516156147a0576147a06148ac565b500290565b6000828210156147b7576147b76148ac565b500390565b600060ff821660ff8416808210156147d6576147d66148ac565b90039392505050565b60005b838110156147fa5781810151838201526020016147e2565b8381111561246d5750506000910152565b600060ff82168061481e5761481e6148ac565b6000190192915050565b600181811c9082168061483c57607f821691505b602082108114156130e857634e487b7160e01b600052602260045260246000fd5b6000600019821415614871576148716148ac565b5060010190565b600060ff821660ff81141561488f5761488f6148ac565b60010192915050565b6000826148a7576148a76148c2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146129c357600080fdfea26469706673582212201df45885fa69c289e50f9c68ca69fd8b4e1165cc17a4914673969d435b59645364736f6c63430008070033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.