ERC-721
Overview
Max Total Supply
5,834 FFRK
Holders
1,777
Market
Volume (24H)
0.0035 ETH
Min Price (24H)
$7.95 @ 0.003500 ETH
Max Price (24H)
$7.95 @ 0.003500 ETH
Other Info
Token Contract
Balance
2 FFRKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
FalloutFreaks
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "@massless.io/smart-contract-library/contracts/interfaces/IContractURI.sol"; import "@massless.io/smart-contract-library/contracts/sale/SaleState.sol"; import "@massless.io/smart-contract-library/contracts/signature/Signature.sol"; import "@massless.io/smart-contract-library/contracts/utils/PreAuthorisable.sol"; import "@massless.io/smart-contract-library/contracts/utils/AdminPermissionable.sol"; import "@massless.io/smart-contract-library/contracts/utils/WithdrawalSplittable.sol"; import "@massless.io/smart-contract-library/contracts/utils/BatchMintable.sol"; import "@massless.io/smart-contract-library/contracts/royalty/Royalty.sol"; import "@massless.io/smart-contract-library/contracts/minting/Whitelist.sol"; import "@massless.io/smart-contract-library/contracts/minting/Reserved.sol"; import "./interfaces/IFalloutCrystal.sol"; import "./interfaces/IJungle.sol"; error SoldOut(); error MustMintMinimumOne(); error NotEnoughEthProvided(); error AlreadyUsedMutation(); error NotGenesisOwner(); error NotCrystalOwner(); error NoTrailingSlash(); error DeployerIsMasslessAdmin(); error ZeroReceiverAddress(); error ZeroReceiverBasisPoints(); contract FalloutFreaks is AdminPermissionable, WithdrawalSplittable, BatchMintable, SaleState, Signature, PreAuthorisable, Royalty, ERC721ABurnable, Reserved, Whitelist { using Strings for uint256; struct CrystalUsage { bool level1; bool level2; bool level3; } struct MutationData { uint32 level1; uint32 level2; uint32 level3; } struct MintDetails { uint32 originalId; uint32 level; uint32 mintType; uint32 mutationId; uint128 aux; } // Constants uint256 public constant MINT_PRICE = 0.13 ether; uint256 public constant MAX_SUPPLY = 15000; uint256 public constant MAX_MINT = 5000; uint256 public constant MAX_BATCH_MINT = 3; address[] private BENEFICIARY_WALLETS = [ address(0x8e5F332a0662C8c06BDD1Eed105Ba1C4800d4c2f), address(0x954BfE5137c8D2816cE018EFd406757f9a060e5f), address(0x2E7D93e2AdFC4a36E2B3a3e23dE7c35212471CfB), address(0xd196e0aFacA3679C27FC05ba8C9D3ABBCD353b5D) ]; uint256[] private BENEFICIARIES_PRIMARY = [5500, 2000, 500, 2000]; uint16[] private _mintablesByLevel = [4000, 998, 2]; string private baseURI; // Jungle Freaks Genesis contract IERC721 private _jfgContract; // Jungle Freaks Mortor Club IERC721 private _jfmcContract; // Crystal Freals contract IFalloutCrystal private _jfcContract; // Staking IJungle private _jungleContract; // Fallout Freaks Mint Log Details mapping(uint256 => MintDetails) private _mintDetails; // Jungle Freaks Genesis Token Used Details mapping(uint256 => CrystalUsage) private _genesisTokenUsage; // Sequential number per each level MutationData private _mutationData; event AllowListMintBegins(); event PublicMintBegins(); event CrystalMutationMintBegins(); event MintEnds(); event BaseURIUpdated(string newBaseURI_); // Modifiers modifier checkOriginalAndCrystalUsage( uint256 originalTokenId_, uint8 crystalTokenId_ ) { if ( _jfgContract.ownerOf(originalTokenId_) != _msgSender() && _jungleContract.getStaker(originalTokenId_) != _msgSender() ) { revert NotGenesisOwner(); } else if (_jfcContract.balanceOf(_msgSender(), crystalTokenId_) == 0) { revert NotCrystalOwner(); } else if ( crystalTokenId_ == 1 && _genesisTokenUsage[originalTokenId_].level1 == true ) { revert AlreadyUsedMutation(); } else if ( crystalTokenId_ == 2 && _genesisTokenUsage[originalTokenId_].level2 == true ) { revert AlreadyUsedMutation(); } else if ( crystalTokenId_ == 3 && _genesisTokenUsage[originalTokenId_].level3 == true ) { revert AlreadyUsedMutation(); } _; } modifier maxMintLimit(uint256 quantity_) { uint256 _remainingReservedTokens = reservedMintSupply - reservedMintQuantity; uint256 mintLimit = MAX_MINT - _remainingReservedTokens - _totalMinted(); if (quantity_ == 0) revert MustMintMinimumOne(); if (quantity_ > mintLimit) revert SoldOut(); _; } modifier enoughEthProvided(uint8 quantity_) { uint256 discount; if ( IERC721(_jfgContract).balanceOf(_msgSender()) > 0 || IJungle(_jungleContract).getStakedAmount(_msgSender()) > 0 ) { discount += 0.02 ether; } if (IERC721(_jfmcContract).balanceOf(_msgSender()) > 0) { discount += 0.01 ether; } if (msg.value < (MINT_PRICE - discount) * quantity_) { revert NotEnoughEthProvided(); } _; } constructor( address signer_, address admin_, address royaltyReceiver_, IERC721 jfgContract_, IERC721 jfmcContract_, IFalloutCrystal jfcContract_, IJungle jungleContract_, address[] memory preAuthorized_ ) ERC721A("Fallout Freaks", "FFRK") Signature(signer_) PreAuthorisable(preAuthorized_) { if (_msgSender() == admin_) revert DeployerIsMasslessAdmin(); _jfgContract = jfgContract_; _jfmcContract = jfmcContract_; _jfcContract = jfcContract_; _jungleContract = jungleContract_; setRoyaltyReceiver(royaltyReceiver_); setRoyaltyBasisPoints(500); // 5.00% _setReservedMintSupply(100); _setMaxBatchMint(MAX_BATCH_MINT); setBeneficiaries(BENEFICIARY_WALLETS, BENEFICIARIES_PRIMARY); _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(DEFAULT_ADMIN_ROLE, admin_); } // Allow List Random Mint function setMerkleRoot(bytes32 _merkleRoot) public onlyAdmin { _setMerkleRoot(_merkleRoot); } function _whitelistMint(bytes32[] calldata merkleProof_, uint8 quantity_) private checkMerkleProof(_msgSender(), merkleProof_) { _safeMint(_msgSender(), quantity_); } function allowListRandomMint( bytes calldata signature_, bytes32 salt_, bytes32[] calldata merkleProof_, uint8 quantity_ ) external payable whenSaleIsActive("AllowListRandomMint") onlySignedTx( keccak256( abi.encodePacked(_msgSender(), salt_, merkleProof_, quantity_) ), signature_ ) maxMintLimit(quantity_) checkMaxBatchMint(quantity_) enoughEthProvided(quantity_) { _whitelistMint(merkleProof_, quantity_); _processRandomMint(salt_, quantity_); } // Public Random Mint function publicRandomMint( bytes calldata signature_, bytes32 salt_, uint8 quantity_ ) external payable whenSaleIsActive("PublicRandomMint") onlySignedTx( keccak256(abi.encodePacked(_msgSender(), salt_, quantity_)), signature_ ) maxMintLimit(quantity_) checkMaxBatchMint(quantity_) enoughEthProvided(quantity_) { _safeMint(_msgSender(), quantity_); _processRandomMint(salt_, quantity_); } function reservedRandomMint( bytes32 randomness_, address to_, uint8 quantity_ ) external onlyAdmin checkReservedMintQuantity(quantity_) checkAddressReservedMint(to_) { reservedMintQuantity += quantity_; _safeMint(to_, quantity_); _processRandomMint(randomness_, quantity_); } // Crystal Mutation Mint function crystalMutationMint( bytes calldata signature_, bytes32 salt_, uint32 originalTokenId_, uint8 crystalTokenId_ ) external whenSaleIsActive("CrystalMutationMint") onlySignedTx( keccak256( abi.encodePacked( _msgSender(), salt_, originalTokenId_, crystalTokenId_ ) ), signature_ ) checkOriginalAndCrystalUsage(originalTokenId_, crystalTokenId_) { _safeMint(_msgSender(), 1); _jfcContract.burn(_msgSender(), crystalTokenId_, 1); if (crystalTokenId_ == 1) { _genesisTokenUsage[originalTokenId_].level1 = true; } else if (crystalTokenId_ == 2) { _genesisTokenUsage[originalTokenId_].level2 = true; } else if (crystalTokenId_ == 3) { _genesisTokenUsage[originalTokenId_].level3 = true; } uint32 mutationId = _createMutationId(1, crystalTokenId_); MintDetails memory newMintDetails = MintDetails({ originalId: originalTokenId_, level: crystalTokenId_, mintType: 1, // Crystal Mint mutationId: mutationId, aux: 0 }); _mintDetails[_currentIndex - 1] = newMintDetails; } function _createMutationId(uint32 mintType_, uint8 level_) private returns (uint32) { uint32 mutationId = 0; if (mintType_ == 0 && level_ == 1) { mutationId = _mutationData.level1; _mutationData.level1++; } else if (mintType_ == 0 && level_ == 2) { mutationId = _mutationData.level2; _mutationData.level2++; } else if (level_ == 3) { mutationId = _mutationData.level3; _mutationData.level3++; } return mutationId; } // ----- Random Mint Management ----- function _sumMintablesUntilLevel(uint8 level_) private view returns (uint256) { uint256 totalMintables = 0; if (level_ > _mintablesByLevel.length) { level_ = uint8(_mintablesByLevel.length); } for (uint8 i; i < level_; i++) { totalMintables += _mintablesByLevel[i]; } return totalMintables; } function _decideLevels(bytes32 randomness_, uint8 quantity_) private returns (uint8[] memory) { uint32[] memory randomNumbers = new uint32[](quantity_); for (uint8 i; i < quantity_; i++) { randomNumbers[i] = uint32( uint256( keccak256( abi.encodePacked( _currentIndex - quantity_ + i, randomness_, block.difficulty ) ) ) ); } uint8[] memory levels = new uint8[](quantity_); for (uint8 i; i < quantity_; i++) { uint256 totalMintables = _sumMintablesUntilLevel(3); uint256 selectedNum = (randomNumbers[i] * totalMintables) / type(uint32).max; uint8 level; if (selectedNum < _sumMintablesUntilLevel(1)) { level = 0; } else if (selectedNum < _sumMintablesUntilLevel(2)) { level = 1; } else if (selectedNum < _sumMintablesUntilLevel(3)) { level = 2; } else { revert SoldOut(); } levels[i] = level + 1; // Index starts from 0, but level starts from 1 _mintablesByLevel[level]--; } return levels; } function _processRandomMint(bytes32 randomness_, uint8 quantity_) private { uint8[] memory tokenLevels = _decideLevels(randomness_, quantity_); for (uint8 i; i < quantity_; i++) { uint32 mutationId = _createMutationId(0, tokenLevels[i]); MintDetails memory newMintDetails = MintDetails({ originalId: 0, level: tokenLevels[i], mintType: 0, // Random Mint mutationId: mutationId, aux: 0 }); _mintDetails[_currentIndex - quantity_ + i] = newMintDetails; } } function getMintDetails(uint256 _tokenId) public view returns (MintDetails memory) { return _mintDetails[_tokenId]; } // ----- State Management ----- function startAllowListMint() external onlyAdminOrModerator { _setSaleType("AllowListRandomMint"); _setSaleState(State.ACTIVE); emit AllowListMintBegins(); } function startPublicMint() external onlyAdminOrModerator { _setSaleType("PublicRandomMint"); _setSaleState(State.ACTIVE); emit PublicMintBegins(); } function startCrystalMutationMint() external onlyAdminOrModerator { _setSaleType("CrystalMutationMint"); _setSaleState(State.ACTIVE); emit CrystalMutationMintBegins(); } function unpauseMint() external onlyAdminOrModerator { _unpause(); } function pauseMint() external onlyAdminOrModerator { _pause(); } function endMint() external onlyAdmin { if (getSaleState() == State.NOT_STARTED) revert NoActiveSale(); _setSaleState(State.FINISHED); emit MintEnds(); } // ----- URI Management ----- function setBaseURI(string memory baseURI_) public onlyAdminOrModerator { if (bytes(baseURI_)[bytes(baseURI_).length - 1] != bytes1("/")) revert NoTrailingSlash(); baseURI = baseURI_; emit BaseURIUpdated(baseURI_); } function contractURI() public view returns (string memory) { return string(abi.encodePacked(baseURI, "contract.json")); } function tokenURI(uint256 tokenId_) public view override returns (string memory) { require(_exists(tokenId_), "URI query for nonexistent token"); return string( abi.encodePacked( baseURI, "token/", tokenId_.toString(), ".json" ) ); } // ----- Royalty Management ----- function setRoyaltyReceiver(address address_) public onlyAdmin { if (address_ == address(0)) { revert ZeroReceiverAddress(); } _setRoyaltyReceiver(address_); } function setRoyaltyBasisPoints(uint32 basisPoints_) public onlyAdmin { if (basisPoints_ == 0) { revert ZeroReceiverBasisPoints(); } _setRoyaltyBasisPoints(basisPoints_); } // ----- Ownership Management ----- function transferOwnership(address newOwner_) public override onlyOwner { require( newOwner_ != address(0), "Ownable: new owner is the zero address" ); _grantRole(DEFAULT_ADMIN_ROLE, newOwner_); _revokeRole(DEFAULT_ADMIN_ROLE, owner()); _transferOwnership(newOwner_); } // ----- Authorization Management ----- function setAuthorizedAddress(address authorizedAddress_, bool authorized_) public onlyAdmin { _setAuthorizedAddress(authorizedAddress_, authorized_); } function setSignerAddress(address signerAddress_) public onlyAdminOrModerator { _setSignerAddress(signerAddress_); } // Compulsory overrides function supportsInterface(bytes4 interfaceId) public view override(AccessControl, ERC721A, Royalty) returns (bool) { return interfaceId == type(IAccessControl).interfaceId || interfaceId == type(IERC2981).interfaceId || ERC721A.supportsInterface(interfaceId); } /** * Override isApprovedForAll to whitelist the trusted accounts to enable gas-free listings. */ function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { if (_isAuthorizedAddress(_operator)) { return true; } return super.isApprovedForAll(_owner, _operator); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721A Burnable Token * @dev ERC721A Token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// /// @dev Interface for the proposed contractURI standard /// interface IContractURI is IERC165 { /// ERC165 bytes to add to interface array - set in parent contract /// implementing this standard /// /// bytes4(keccak256("contractURI()")) == 0xe8a3d485 /// @notice Called to return the URI pertaining to the contract metadata /// @return contractURI - the URI that pertaining to the contract metadata function contractURI() external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; error NoActiveSale(); error IncorrectSaleType(); error AllSalesFinished(); error NoPausedSale(); abstract contract SaleState { enum State { NOT_STARTED, // 0 ACTIVE, // 1 PAUSED, // 2 FINISHED // 3 } struct Sale{ State state; string saleType; } event StateOfSale(State _state); event TypeOfSale(string _saleType); event IsPaused(bool _paused); Sale private _sale = Sale({saleType: "None", state: State.NOT_STARTED}); modifier whenSaleIsActive(string memory saleType) { if (_sale.state != State.ACTIVE) revert NoActiveSale(); if (keccak256(bytes(_sale.saleType)) != keccak256(bytes(saleType))) revert IncorrectSaleType(); _; } function _setSaleState(State state) internal { if (_sale.state == State.FINISHED) revert AllSalesFinished(); _sale.state = state; if (state == State.FINISHED) { _sale.saleType = "Finished"; emit TypeOfSale(_sale.saleType); } emit StateOfSale(_sale.state); } function _setSaleType(string memory saleType) internal { if (_sale.state == State.FINISHED) revert AllSalesFinished(); _sale.saleType = saleType; _sale.state = State.NOT_STARTED; emit TypeOfSale(_sale.saleType); } function getSaleState() public view returns (State) { return _sale.state; } function getSaleType() public view returns (string memory) { return _sale.saleType; } function _pause() internal { if (_sale.state != State.ACTIVE) revert NoActiveSale(); _sale.state = State.PAUSED; emit IsPaused(true); } function _unpause() internal { if (_sale.state != State.PAUSED) revert NoPausedSale(); _sale.state = State.ACTIVE; emit IsPaused(false); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; error HashUsed(); error SignatureFailed(address signatureAddress, address signer); abstract contract Signature { using ECDSA for bytes32; address private _signer; mapping(bytes32 => bool) private _isHashUsed; constructor(address signerAddress_){ _signer = signerAddress_; } function _setSignerAddress(address signerAddress_) internal { _signer = signerAddress_; } function signerAddress() public view returns(address) { return _signer; } // Signature verfification modifier onlySignedTx( bytes32 hash_, bytes calldata signature_ ) { if (_isHashUsed[hash_]) revert HashUsed(); address signatureAddress = hash_ .toEthSignedMessageHash() .recover(signature_); if (signatureAddress != _signer) revert SignatureFailed(signatureAddress, _signer); _isHashUsed[hash_] = true; _; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract PreAuthorisable { mapping(address => bool) private authorizedAddresses; constructor(address[] memory _preAuthorized) { for (uint256 i = 0; i < _preAuthorized.length; i++) { _setAuthorizedAddress(_preAuthorized[i], true); } } function _setAuthorizedAddress(address authorizedAddress, bool authorized) internal { authorizedAddresses[authorizedAddress] = authorized; } function _isAuthorizedAddress(address operator) internal view returns (bool) { return authorizedAddresses[operator]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract AdminPermissionable is AccessControl, Ownable { error NotAdminOrOwner(); error NotAdminOrModerator(); error ZeroAdminAddress(); bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE"); modifier onlyAdmin() { if (!(owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()))) revert NotAdminOrOwner(); _; } modifier onlyAdminOrModerator() { if (!(owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) || hasRole(MODERATOR_ROLE, _msgSender()))) revert NotAdminOrModerator(); _; } modifier checkAdminAddress(address _address) { if (_address == address(0)){ revert ZeroAdminAddress(); } _; } function setAdminPermission(address _address) external onlyAdmin checkAdminAddress(_address) { _grantRole(DEFAULT_ADMIN_ROLE, _address); } function removeAdminPermission(address _address) external onlyAdmin checkAdminAddress(_address) { _revokeRole(DEFAULT_ADMIN_ROLE, _address); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; abstract contract WithdrawalSplittable is Ownable, ReentrancyGuard { struct Beneficiary { address wallet; uint256 basisPoints; // decimal: 2, e.g. 1000 = 10.00% } Beneficiary[] public beneficiaries; error WithdrawalFailedBeneficiary(uint256 index, address beneficiary); error ZeroBeneficiaryAddress(); error ArrayLengthMismatch(); error ZeroArrayLength(); error ZeroBalance(); error ZeroWithdrawalAddress(); error ZeroWithdrawalBasisPoints(); receive() external payable {} modifier checkWithdrawalBasisPoints(address[] memory _wallets, uint256[] memory _basisPoints) { if (_wallets.length != _basisPoints.length) revert ArrayLengthMismatch(); if (_wallets.length == 0) revert ZeroArrayLength(); for (uint256 i; i < _wallets.length; i++) { if(_wallets[i] == address(0)) revert ZeroWithdrawalAddress(); if(_basisPoints[i] == 0) revert ZeroWithdrawalBasisPoints(); } _; } function setBeneficiaries(address[] memory _wallets, uint256[] memory _basisPoints) public onlyOwner checkWithdrawalBasisPoints(_wallets, _basisPoints) { delete beneficiaries; for (uint256 i; i < _wallets.length; i++) { if (_wallets[i] == address(0)) revert ZeroBeneficiaryAddress(); beneficiaries.push(Beneficiary(_wallets[i], _basisPoints[i])); } } function calculateSplit(uint256 balance) public view returns (uint256[] memory) { uint256[] memory amounts = new uint256[](beneficiaries.length); for (uint256 i; i < beneficiaries.length; i++) { uint256 amount = (balance * beneficiaries[i].basisPoints) / 10000; amounts[i] = amount; } return amounts; } function withdrawErc20(IERC20 token) public nonReentrant { uint256 totalBalance = token.balanceOf(address(this)); if (totalBalance == 0) revert ZeroBalance(); uint256[] memory amounts = calculateSplit(totalBalance); for (uint256 i; i < beneficiaries.length; i++) { if (!token.transfer(beneficiaries[i].wallet, amounts[i])) revert WithdrawalFailedBeneficiary(i, beneficiaries[i].wallet); } } function withdrawEth() public nonReentrant { uint256 totalBalance = address(this).balance; if (totalBalance == 0) revert ZeroBalance(); uint256[] memory amounts = calculateSplit(totalBalance); for (uint256 i; i < beneficiaries.length; i++) { if (!payable(beneficiaries[i].wallet).send(amounts[i])) revert WithdrawalFailedBeneficiary(i, beneficiaries[i].wallet); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract BatchMintable { uint256 public maxBatchMint; error MaxBatchMintLimitExceeded(uint256 limit); modifier checkMaxBatchMint(uint8 _quantity) { if (_quantity > maxBatchMint) revert MaxBatchMintLimitExceeded(maxBatchMint); _; } function _setMaxBatchMint(uint256 _maxBatchMint) internal { maxBatchMint = _maxBatchMint; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./IERC2981.sol"; abstract contract Royalty is ERC165, IERC2981 { address public royaltyReceiver; uint32 public royaltyBasisPoints; // A integer representing 1/100th of 1% (fixed point with 100 = 1.00%) function _setRoyaltyReceiver(address receiver_) internal { royaltyReceiver = receiver_; } function _setRoyaltyBasisPoints(uint32 basisPoints_) internal { royaltyBasisPoints = basisPoints_; } function royaltyInfo(uint256, uint256 salePrice_) public view virtual override returns (address receiver, uint256 amount) { // All tokens return the same royalty amount to the receiver uint256 royaltyAmount = (salePrice_ * royaltyBasisPoints) / 10000; // Normalises in basis points reference. (10000 = 100.00%) return (royaltyReceiver, royaltyAmount); } // Compulsory overrides function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; abstract contract Whitelist { // Whitelist params uint256 public whitelistMintSupply; uint256 public whitelistMintQuantity; uint256 public whitelistMintPrice; bytes32 public merkleRoot; error ProofFailed(); error WhitelistMintSoldOut(); modifier checkMerkleProof(address _address, bytes32[] calldata _merkleProof) { bool proofVerified = MerkleProof.verify( _merkleProof, merkleRoot, keccak256(abi.encodePacked(_address)) ); if (!proofVerified) revert ProofFailed(); _; } modifier checkWhitelistMintQuantity(uint8 _quantity) { if (whitelistMintSupply != 0){ // Checking if the required quantity of tokens still remains uint256 remainingSupply = whitelistMintSupply - whitelistMintQuantity; if (_quantity > remainingSupply) revert WhitelistMintSoldOut(); _; } _; } // Set Merle Root function _setMerkleRoot(bytes32 _merkleRoot) internal { merkleRoot = _merkleRoot; } function _setWhitelistMintSupply(uint256 _whitelistMintSupply) internal { whitelistMintQuantity = 0; whitelistMintSupply = _whitelistMintSupply; } function _setWhitelistMintPrice(uint256 _whitelistMintPrice) internal { whitelistMintPrice = _whitelistMintPrice; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Reserved { // Reserved uint256 public reservedMintSupply; uint256 public reservedMintQuantity; error ReservedMintedOut(); error ReserveLimitExceeded(); error ZeroReservedMintAddress(); modifier checkReservedMintQuantity(uint256 _quantity) { if (reservedMintSupply == 0) revert ReservedMintedOut(); // Checking if the required quantity of tokens still remains uint256 remainingSupply = reservedMintSupply - reservedMintQuantity; if (_quantity > remainingSupply) revert ReservedMintedOut(); _; } modifier checkAddressReservedMint(address _to) { if (_to == address(0)){ revert ZeroReservedMintAddress(); } _; } function _setReservedMintSupply(uint256 _reservedMintSupply) internal { reservedMintQuantity = 0; reservedMintSupply = _reservedMintSupply; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; interface IFalloutCrystal is IERC1155 { function burn( address account, uint256 id, uint256 value ) external; function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) external; function phase1Mint( bytes calldata signature_, bytes32 salt_, uint256 jungle_, uint256[] calldata jfgIds_ ) external payable; function phase2Mint( bytes calldata signature_, bytes32 salt_, uint256 jungle_, uint256 quantity_ ) external payable; function startPhase1Mint() external; function startPhase2Mint() external; function endMint() external; function setPrimarySalesSplits() external; function holdersEthPrice(uint256 j_, uint256 q_) external pure returns (uint256); function setSignerAddress(address signerAddress_) external; function setRoyaltyReceiver(address royaltyReceiver_) external; function setRoyaltyBasisPoints(uint32 royaltyBasisPoints_) external; function transferOwnership(address newOwner) external; function supportsInterface(bytes4 interfaceId) external view override returns (bool); function isApprovedForAll(address _owner, address _operator) external view override returns (bool isOperator); function name() external view returns (string memory); function symbol() external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; interface IJungle is IERC1155, IERC20, IERC20Metadata { function getStakedTokens(address staker) external view returns (uint256[] memory); function getStakedAmount(address staker) external view returns (uint256); function getStaker(uint256 tokenId) external view returns (address); function getAllRewards(address staker) external view returns (uint256); function getLegendariesRewards(address staker) external view returns (uint256); function stakeById(uint256[] calldata tokenIds) external; function legendariesStaked(address) external view returns ( uint32 cotfAccumulatedTime, uint32 mtfmAccumulatedTime, uint32 cotfLastStaked, uint32 mtfmLastStaked, uint8 cotfStaked, uint8 mtfmStaked ); function stakeLegendaries(uint8 cotf, uint8 mtfm) external; function unstakeLegendaries(uint8 cotf, uint8 mtfm) external; function claimLegendaries() external; function unstakeByIds(uint256[] calldata tokenIds) external; function unstakeAll() external; function claimAll() external; function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; function setController(address controller, bool authorized) external; function setAuthorizedAddress(address authorizedAddress, bool authorized) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of an ERC721ABurnable compliant contract. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721A { using Address for address; using Strings for uint256; // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A is IERC721, IERC721Metadata { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// 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 Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// /// @dev Interface for the NFT Royalty Standard /// interface IERC2981 is IERC165 { /// ERC165 bytes to add to interface array - set in parent contract /// implementing this standard /// /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; /// _registerInterface(_INTERFACE_ID_ERC2981); /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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. */ 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 Merklee 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 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"signer_","type":"address"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"contract IERC721","name":"jfgContract_","type":"address"},{"internalType":"contract IERC721","name":"jfmcContract_","type":"address"},{"internalType":"contract IFalloutCrystal","name":"jfcContract_","type":"address"},{"internalType":"contract IJungle","name":"jungleContract_","type":"address"},{"internalType":"address[]","name":"preAuthorized_","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllSalesFinished","type":"error"},{"inputs":[],"name":"AlreadyUsedMutation","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"DeployerIsMasslessAdmin","type":"error"},{"inputs":[],"name":"HashUsed","type":"error"},{"inputs":[],"name":"IncorrectSaleType","type":"error"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"MaxBatchMintLimitExceeded","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MustMintMinimumOne","type":"error"},{"inputs":[],"name":"NoActiveSale","type":"error"},{"inputs":[],"name":"NoPausedSale","type":"error"},{"inputs":[],"name":"NoTrailingSlash","type":"error"},{"inputs":[],"name":"NotAdminOrModerator","type":"error"},{"inputs":[],"name":"NotAdminOrOwner","type":"error"},{"inputs":[],"name":"NotCrystalOwner","type":"error"},{"inputs":[],"name":"NotEnoughEthProvided","type":"error"},{"inputs":[],"name":"NotGenesisOwner","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ProofFailed","type":"error"},{"inputs":[],"name":"ReserveLimitExceeded","type":"error"},{"inputs":[],"name":"ReservedMintedOut","type":"error"},{"inputs":[{"internalType":"address","name":"signatureAddress","type":"address"},{"internalType":"address","name":"signer","type":"address"}],"name":"SignatureFailed","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"WhitelistMintSoldOut","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"WithdrawalFailedBeneficiary","type":"error"},{"inputs":[],"name":"ZeroAdminAddress","type":"error"},{"inputs":[],"name":"ZeroArrayLength","type":"error"},{"inputs":[],"name":"ZeroBalance","type":"error"},{"inputs":[],"name":"ZeroBeneficiaryAddress","type":"error"},{"inputs":[],"name":"ZeroReceiverAddress","type":"error"},{"inputs":[],"name":"ZeroReceiverBasisPoints","type":"error"},{"inputs":[],"name":"ZeroReservedMintAddress","type":"error"},{"inputs":[],"name":"ZeroWithdrawalAddress","type":"error"},{"inputs":[],"name":"ZeroWithdrawalBasisPoints","type":"error"},{"anonymous":false,"inputs":[],"name":"AllowListMintBegins","type":"event"},{"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":"string","name":"newBaseURI_","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"CrystalMutationMintBegins","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_paused","type":"bool"}],"name":"IsPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"MintEnds","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":[],"name":"PublicMintBegins","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum SaleState.State","name":"_state","type":"uint8"}],"name":"StateOfSale","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":"string","name":"_saleType","type":"string"}],"name":"TypeOfSale","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BATCH_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MODERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"bytes32","name":"salt_","type":"bytes32"},{"internalType":"bytes32[]","name":"merkleProof_","type":"bytes32[]"},{"internalType":"uint8","name":"quantity_","type":"uint8"}],"name":"allowListRandomMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"beneficiaries","outputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"calculateSplit","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"bytes32","name":"salt_","type":"bytes32"},{"internalType":"uint32","name":"originalTokenId_","type":"uint32"},{"internalType":"uint8","name":"crystalTokenId_","type":"uint8"}],"name":"crystalMutationMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getMintDetails","outputs":[{"components":[{"internalType":"uint32","name":"originalId","type":"uint32"},{"internalType":"uint32","name":"level","type":"uint32"},{"internalType":"uint32","name":"mintType","type":"uint32"},{"internalType":"uint32","name":"mutationId","type":"uint32"},{"internalType":"uint128","name":"aux","type":"uint128"}],"internalType":"struct FalloutFreaks.MintDetails","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleState","outputs":[{"internalType":"enum SaleState.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"bytes32","name":"salt_","type":"bytes32"},{"internalType":"uint8","name":"quantity_","type":"uint8"}],"name":"publicRandomMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeAdminPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedMintQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"randomness_","type":"bytes32"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint8","name":"quantity_","type":"uint8"}],"name":"reservedRandomMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyBasisPoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice_","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"_address","type":"address"}],"name":"setAdminPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizedAddress_","type":"address"},{"internalType":"bool","name":"authorized_","type":"bool"}],"name":"setAuthorizedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_wallets","type":"address[]"},{"internalType":"uint256[]","name":"_basisPoints","type":"uint256[]"}],"name":"setBeneficiaries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"basisPoints_","type":"uint32"}],"name":"setRoyaltyBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signerAddress_","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startAllowListMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startCrystalMutationMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicMint","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":"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":"unpauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60006080908152610100604052600460c0818152634e6f6e6560e01b60e090815260a0919091526005805460ff19168155916200003f916006916200091f565b505060408051608081018252738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f815273954bfe5137c8d2816ce018efd406757f9a060e5f6020820152732e7d93e2adfc4a36e2b3a3e23de7c35212471cfb9181019190915273d196e0afaca3679c27fc05ba8c9d3abbcd353b5d6060820152620000c391506019906004620009ae565b506040805160808101825261157c81526107d0602082018190526101f4928201929092526060810191909152620000ff90601a90600462000a06565b5060408051606081018252610fa081526103e660208201526002918101919091526200013090601b90600362000a4a565b503480156200013e57600080fd5b50604051620068f9380380620068f9833981016040819052620001619162000b69565b6040518060400160405280600e81526020016d46616c6c6f757420467265616b7360901b815250604051806040016040528060048152602001634646524b60e01b815250828a620001c1620001bb6200040360201b60201c565b62000407565b6001600255600780546001600160a01b0319166001600160a01b039290921691909117905560005b815181101562000243576200022e8282815181106200021857634e487b7160e01b600052603260045260246000fd5b602002602001015160016200045960201b60201c565b806200023a8162000d1b565b915050620001e9565b505081516200025a90600d9060208501906200091f565b5080516200027090600e9060208401906200091f565b50506000600b5550336001600160a01b0388161415620002a35760405163f4a9d15d60e01b815260040160405180910390fd5b601d80546001600160a01b038088166001600160a01b031992831617909255601e8054878416908316179055601f80548684169083161790556020805492851692909116919091179055620002f88662000484565b620003056101f462000516565b6200031560646000601455601355565b620003206003600455565b620003db60198054806020026020016040519081016040528092919081815260200182805480156200037c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200035d575b5050505050601a805480602002602001604051908101604052809291908181526020018280548015620003cf57602002820191906000526020600020905b815481526020019060010190808311620003ba575b5050620005a392505050565b620003e86000336200085e565b620003f56000886200085e565b505050505050505062000d6f565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b336200048f620008e7565b6001600160a01b03161480620004ad5750620004ad600033620008f6565b620004cb57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b038116620004f3576040516313e6c64360e31b815260040160405180910390fd5b600a80546001600160a01b0383166001600160a01b031990911617905550565b50565b3362000521620008e7565b6001600160a01b031614806200053f57506200053f600033620008f6565b6200055d57604051637bb62a2160e01b815260040160405180910390fd5b63ffffffff8116620005825760405163aa9566b560e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b33620005ae620008e7565b6001600160a01b031614620006095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b818180518251146200062e5760405163512509d360e11b815260040160405180910390fd5b81516200064e5760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015620007185760006001600160a01b03168382815181106200068757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415620006b857604051631e2add6160e21b815260040160405180910390fd5b818181518110620006d957634e487b7160e01b600052603260045260246000fd5b602002602001015160001415620007035760405163572d773160e11b815260040160405180910390fd5b806200070f8162000d1b565b91505062000651565b50620007276003600062000af5565b60005b8451811015620008575760006001600160a01b03168582815181106200076057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415620007915760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110620007bf57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110620007f657634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b03909216919091178155910151910155806200084e8162000d1b565b9150506200072a565b5050505050565b6200086a8282620008f6565b620008e3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620008a23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6001546001600160a01b031690565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b8280546200092d9062000cde565b90600052602060002090601f0160209004810192826200095157600085556200099c565b82601f106200096c57805160ff19168380011785556200099c565b828001600101855582156200099c579182015b828111156200099c5782518255916020019190600101906200097f565b50620009aa92915062000b18565b5090565b8280548282559060005260206000209081019282156200099c579160200282015b828111156200099c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620009cf565b8280548282559060005260206000209081019282156200099c579160200282015b828111156200099c578251829061ffff1690559160200191906001019062000a27565b82805482825590600052602060002090600f016010900481019282156200099c5791602002820160005b8382111562000ab657835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000a74565b801562000ae65782816101000a81549061ffff021916905560020160208160010104928301926001030262000ab6565b5050620009aa92915062000b18565b508054600082556002029060005260206000209081019062000513919062000b2f565b5b80821115620009aa576000815560010162000b19565b5b80821115620009aa5780546001600160a01b03191681556000600182015560020162000b30565b805162000b648162000d59565b919050565b600080600080600080600080610100898b03121562000b86578384fd5b885162000b938162000d59565b60208a015190985062000ba68162000d59565b60408a015190975062000bb98162000d59565b60608a015190965062000bcc8162000d59565b60808a015190955062000bdf8162000d59565b60a08a015190945062000bf28162000d59565b60c08a015190935062000c058162000d59565b60e08a01519092506001600160401b038082111562000c22578283fd5b818b0191508b601f83011262000c36578283fd5b81518181111562000c4b5762000c4b62000d43565b8060051b604051601f19603f8301168101818110858211171562000c735762000c7362000d43565b8060405250809350828152602081019350602085018f602084880101111562000c9a578687fd5b8695505b8386101562000cc85762000cb28162000b57565b8552600195909501946020948501940162000c9e565b5080955050505050509295985092959890939650565b600181811c9082168062000cf357607f821691505b6020821081141562000d1557634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000d3c57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200051357600080fd5b615b7a8062000d7f6000396000f3fe6080604052600436106102f85760003560e01c8063017043a51461030457806301ffc9a71461031b578063046dc16614610350578063065dc4c114610370578063068709e31461039057806306fdde03146103b4578063081812fc146103d657806308e1c61314610403578063095ea7b31461041857806309a3a9c1146104385780631351cf511461044e5780631552ac8e1461046e57806317bce40f1461048457806318160ddd1461049a5780631a8bd2da146104b35780631cf015c6146104c857806322067e5b146104e857806323b872dd146104fd578063248a9ca31461051d57806325bdb2a81461053d5780632a55205a1461055d5780632dea7e031461058b5780632eb4a7ab1461059e5780632f2ff15d146105b457806332cb6b0c146105d457806335c6aaf8146105ea57806336568abe14610600578063404a1f371461062057806342260b5d1461064057806342842e0e1461067957806342966c6814610699578063430433b3146106b95780634b8e837d146106d957806355f804b3146107e35780635b7633d0146108035780635c6fd90b146108215780636352211e1461084157806370a0823114610861578063715018a61461088157806376c64c6214610896578063797669c9146108ab5780637cb64759146108cd5780638d623781146108ed5780638da5cb5b1461091a5780638dc251e31461092f57806391d148541461094f57806395d89b411461096f5780639fbc871314610984578063a0ef91df146109a4578063a217fddf146109b9578063a22cb465146109ce578063a81152f7146109ee578063b88d4fde14610a03578063baf93c1214610a23578063c002d23d14610a43578063c7e42b1b14610a5f578063c87b56dd14610a7f578063cd85cdb514610a9f578063d1d011d314610ab4578063d1e812a314610aca578063d547741f14610adf578063da659e2614610aff578063e8a3d48514610b12578063e985e9c514610b27578063efeb5e5814610b47578063f0292a0314610b67578063f2fde38b14610b7d57600080fd5b366102ff57005b600080fd5b34801561031057600080fd5b50610319610b9d565b005b34801561032757600080fd5b5061033b610336366004615240565b610c59565b60405190151581526020015b60405180910390f35b34801561035c57600080fd5b5061031961036b366004614f65565b610c9f565b34801561037c57600080fd5b5061031961038b3660046150e9565b610d1f565b34801561039c57600080fd5b506103a660145481565b604051908152602001610347565b3480156103c057600080fd5b506103c9610f98565b6040516103479190615760565b3480156103e257600080fd5b506103f66103f13660046151c7565b61102a565b6040516103479190615670565b34801561040f57600080fd5b5061031961106e565b34801561042457600080fd5b506103196104333660046150be565b611136565b34801561044457600080fd5b506103a660045481565b34801561045a57600080fd5b50610319610469366004615091565b6111bd565b34801561047a57600080fd5b506103a660135481565b34801561049057600080fd5b506103a660165481565b3480156104a657600080fd5b50600c54600b54036103a6565b3480156104bf57600080fd5b5061031961122a565b3480156104d457600080fd5b506103196104e336600461546d565b611293565b3480156104f457600080fd5b50610319611319565b34801561050957600080fd5b50610319610518366004614fd5565b6113e1565b34801561052957600080fd5b506103a66105383660046151c7565b6113ec565b34801561054957600080fd5b5060055460ff166040516103479190615738565b34801561056957600080fd5b5061057d61057836600461544c565b611401565b6040516103479291906156db565b610319610599366004615395565b611449565b3480156105aa57600080fd5b506103a660185481565b3480156105c057600080fd5b506103196105cf3660046151df565b6118e9565b3480156105e057600080fd5b506103a6613a9881565b3480156105f657600080fd5b506103a660175481565b34801561060c57600080fd5b5061031961061b3660046151df565b611906565b34801561062c57600080fd5b5061031961063b366004614f65565b611980565b34801561064c57600080fd5b50600a5461066490600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610347565b34801561068557600080fd5b50610319610694366004614fd5565b6119f4565b3480156106a557600080fd5b506103196106b43660046151c7565b611a0f565b3480156106c557600080fd5b506103196106d4366004615203565b611a1a565b3480156106e557600080fd5b5061078e6106f43660046151c7565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915250600090815260216020908152604091829020825160a081018452905463ffffffff8082168352600160201b8204811693830193909352600160401b8104831693820193909352600160601b83049091166060820152600160801b9091046001600160801b0316608082015290565b6040516103479190815163ffffffff9081168252602080840151821690830152604080840151821690830152606080840151909116908201526080918201516001600160801b03169181019190915260a00190565b3480156107ef57600080fd5b506103196107fe3660046153ef565b611b1a565b34801561080f57600080fd5b506007546001600160a01b03166103f6565b34801561082d57600080fd5b5061031961083c366004614f65565b611c28565b34801561084d57600080fd5b506103f661085c3660046151c7565b611c9c565b34801561086d57600080fd5b506103a661087c366004614f65565b611cae565b34801561088d57600080fd5b50610319611cfc565b3480156108a257600080fd5b50610319611d35565b3480156108b757600080fd5b506103a6600080516020615ac583398151915281565b3480156108d957600080fd5b506103196108e83660046151c7565b611dfa565b3480156108f957600080fd5b5061090d6109083660046151c7565b611e44565b60405161034791906156f4565b34801561092657600080fd5b506103f6611f40565b34801561093b57600080fd5b5061031961094a366004614f65565b611f4f565b34801561095b57600080fd5b5061033b61096a3660046151df565b611fd5565b34801561097b57600080fd5b506103c9611ffe565b34801561099057600080fd5b50600a546103f6906001600160a01b031681565b3480156109b057600080fd5b5061031961200d565b3480156109c557600080fd5b506103a6600081565b3480156109da57600080fd5b506103196109e9366004615091565b612170565b3480156109fa57600080fd5b506103a6600381565b348015610a0f57600080fd5b50610319610a1e366004615015565b612206565b348015610a2f57600080fd5b50610319610a3e36600461532a565b612257565b348015610a4f57600080fd5b506103a66701cdda4faccd000081565b348015610a6b57600080fd5b50610319610a7a366004614f65565b61292f565b348015610a8b57600080fd5b506103c9610a9a3660046151c7565b612b37565b348015610aab57600080fd5b50610319612bc0565b348015610ac057600080fd5b506103a660155481565b348015610ad657600080fd5b506103c9612c27565b348015610aeb57600080fd5b50610319610afa3660046151df565b612c39565b610319610b0d366004615278565b612c56565b348015610b1e57600080fd5b506103c96130d5565b348015610b3357600080fd5b5061033b610b42366004614f9d565b6130fd565b348015610b5357600080fd5b5061057d610b623660046151c7565b613157565b348015610b7357600080fd5b506103a661138881565b348015610b8957600080fd5b50610319610b98366004614f65565b61318f565b33610ba6611f40565b6001600160a01b03161480610bc15750610bc1600033611fd5565b610bde57604051637bb62a2160e01b815260040160405180910390fd5b600060055460ff166003811115610c0557634e487b7160e01b600052602160045260246000fd5b1415610c2457604051638ca755f560e01b815260040160405180910390fd5b610c2e6003613249565b6040517faf24d3bccd7e329975f60c4d13b81252ff061649fb46d1c416c9b6a13100bff190600090a1565b60006001600160e01b03198216637965db0b60e01b1480610c8a57506001600160e01b0319821663152a902d60e11b145b80610c995750610c9982613378565b92915050565b33610ca8611f40565b6001600160a01b03161480610cc35750610cc3600033611fd5565b80610ce15750610ce1600080516020615ac583398151915233611fd5565b610cfe5760405163c5cca88d60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b03831617905550565b50565b33610d28611f40565b6001600160a01b031614610d575760405162461bcd60e51b8152600401610d4e906157f4565b60405180910390fd5b81818051825114610d7b5760405163512509d360e11b815260040160405180910390fd5b8151610d9a5760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015610e5c5760006001600160a01b0316838281518110610dd157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610e0157604051631e2add6160e21b815260040160405180910390fd5b818181518110610e2157634e487b7160e01b600052603260045260246000fd5b602002602001015160001415610e4a5760405163572d773160e11b815260040160405180910390fd5b80610e54816159d6565b915050610d9d565b50610e6960036000614d56565b60005b8451811015610f915760006001600160a01b0316858281518110610ea057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610ed05760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110610efd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110610f3357634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015580610f89816159d6565b915050610e6c565b5050505050565b6060600d8054610fa79061599b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd39061599b565b80156110205780601f10610ff557610100808354040283529160200191611020565b820191906000526020600020905b81548152906001019060200180831161100357829003601f168201915b5050505050905090565b6000611035826133b8565b611052576040516333d1c03960e21b815260040160405180910390fd5b506000908152601160205260409020546001600160a01b031690565b33611077611f40565b6001600160a01b031614806110925750611092600033611fd5565b806110b057506110b0600080516020615ac583398151915233611fd5565b6110cd5760405163c5cca88d60e01b815260040160405180910390fd5b61110160405180604001604052806013815260200172105b1b1bddd31a5cdd14985b991bdb535a5b9d606a1b8152506133e4565b61110b6001613249565b6040517ff4c9e5873d4ef21518f8e09cfbc0be9914c979c4a8fdb46faa22633354bb761890600090a1565b600061114182611c9c565b9050806001600160a01b0316836001600160a01b031614156111765760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146111ad5761119081336130fd565b6111ad576040516367d9dca160e11b815260040160405180910390fd5b6111b8838383613467565b505050565b336111c6611f40565b6001600160a01b031614806111e157506111e1600033611fd5565b6111fe57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600960205260409020805460ff19168215151790555050565b5050565b33611233611f40565b6001600160a01b0316148061124e575061124e600033611fd5565b8061126c575061126c600080516020615ac583398151915233611fd5565b6112895760405163c5cca88d60e01b815260040160405180910390fd5b6112916134c3565b565b3361129c611f40565b6001600160a01b031614806112b757506112b7600033611fd5565b6112d457604051637bb62a2160e01b815260040160405180910390fd5b63ffffffff81166112f85760405163aa9566b560e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b33611322611f40565b6001600160a01b0316148061133d575061133d600033611fd5565b8061135b575061135b600080516020615ac583398151915233611fd5565b6113785760405163c5cca88d60e01b815260040160405180910390fd5b6113ac6040518060400160405280601381526020017210dc9e5cdd185b135d5d185d1a5bdb935a5b9d606a1b8152506133e4565b6113b66001613249565b6040517fa145fa7872c3243c5371ef3ea64d391db1f909e9669fa8628c3c2f8193850eca90600090a1565b6111b883838361353a565b60009081526020819052604090206001015490565b600a54600090819081906127109061142690600160a01b900463ffffffff1686615904565b61143091906158f0565b600a546001600160a01b031693509150505b9250929050565b60408051808201909152601081526f141d589b1a58d4985b991bdb535a5b9d60821b6020820152600160055460ff16600381111561149757634e487b7160e01b600052602160045260246000fd5b146114b557604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516114cb90600690615583565b6040518091039020146114f157604051630a761c7560e31b815260040160405180910390fd5b3360405160609190911b6001600160601b03191660208201526034810184905260f883901b6001600160f81b031916605482015260550160408051601f198184030181529181528151602092830120600081815260089093529120548690869060ff16156115725760405163180567a360e31b815260040160405180910390fd5b60006115bf83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b90613764565b6007549091506001600160a01b03808316911614611601576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260408120805460ff1916600117905560145460135460ff8916929161162f91615923565b9050600061163c600b5490565b61164883611388615923565b6116529190615923565b90508261167257604051633f44c9b160e11b815260040160405180910390fd5b80831115611693576040516352df9fe560e01b815260040160405180910390fd5b886004548160ff1611156116be5760048054604051632305d97560e01b815291820152602401610d4e565b601d546040516370a0823160e01b81528b9160009182916001600160a01b0316906370a08231906116f3903390600401615670565b60206040518083038186803b15801561170b57600080fd5b505afa15801561171f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117439190615434565b11806117cd57506020546040516326d352ab60e11b81526000916001600160a01b031690634da6a5569061177b903390600401615670565b60206040518083038186803b15801561179357600080fd5b505afa1580156117a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cb9190615434565b115b156117e6576117e366470de4df820000826158b3565b90505b601e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611817903390600401615670565b60206040518083038186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118679190615434565b11156118815761187e662386f26fc10000826158b3565b90505b60ff8216611897826701cdda4faccd0000615923565b6118a19190615904565b3410156118c1576040516375cc118d60e11b815260040160405180910390fd5b6118ce338d60ff16613788565b6118d88d8d6137a2565b505050505050505050505050505050565b6118f2826113ec565b6118fc813361394e565b6111b883836139b2565b6001600160a01b03811633146119765760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d4e565b6112268282613a36565b33611989611f40565b6001600160a01b031614806119a457506119a4600033611fd5565b6119c157604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b0381166119e957604051633ef39b8160e01b815260040160405180910390fd5b611226600083613a36565b6111b883838360405180602001604052806000815250612206565b610d1c816001613a9b565b33611a23611f40565b6001600160a01b03161480611a3e5750611a3e600033611fd5565b611a5b57604051637bb62a2160e01b815260040160405180910390fd5b8060ff1660135460001415611a83576040516310db646560e21b815260040160405180910390fd5b6000601454601354611a959190615923565b905080821115611ab8576040516310db646560e21b815260040160405180910390fd5b836001600160a01b038116611ae057604051635b84d3f760e01b815260040160405180910390fd5b8360ff1660146000828254611af591906158b3565b90915550611b0890508560ff8616613788565b611b1286856137a2565b505050505050565b33611b23611f40565b6001600160a01b03161480611b3e5750611b3e600033611fd5565b80611b5c5750611b5c600080516020615ac583398151915233611fd5565b611b795760405163c5cca88d60e01b815260040160405180910390fd5b8051602f60f81b908290611b8f90600190615923565b81518110611bad57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191614611bda5760405163a467f6f560e01b815260040160405180910390fd5b8051611bed90601c906020840190614d77565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051611c1d9190615760565b60405180910390a150565b33611c31611f40565b6001600160a01b03161480611c4c5750611c4c600033611fd5565b611c6957604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b038116611c9157604051633ef39b8160e01b815260040160405180910390fd5b6112266000836139b2565b6000611ca782613c49565b5192915050565b60006001600160a01b038216611cd7576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601060205260409020546001600160401b031690565b33611d05611f40565b6001600160a01b031614611d2b5760405162461bcd60e51b8152600401610d4e906157f4565b6112916000613d63565b33611d3e611f40565b6001600160a01b03161480611d595750611d59600033611fd5565b80611d775750611d77600080516020615ac583398151915233611fd5565b611d945760405163c5cca88d60e01b815260040160405180910390fd5b611dc56040518060400160405280601081526020016f141d589b1a58d4985b991bdb535a5b9d60821b8152506133e4565b611dcf6001613249565b6040517fe9d1cb0db6b9ee316146e55bd9b1037307248b6d1ec134b1071cc6a89434feeb90600090a1565b33611e03611f40565b6001600160a01b03161480611e1e5750611e1e600033611fd5565b611e3b57604051637bb62a2160e01b815260040160405180910390fd5b610d1c81601855565b6003546060906000906001600160401b03811115611e7257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e9b578160200160208202803683370190505b50905060005b600354811015611f3957600061271060038381548110611ed157634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015486611eee9190615904565b611ef891906158f0565b905080838381518110611f1b57634e487b7160e01b600052603260045260246000fd5b60209081029190910101525080611f31816159d6565b915050611ea1565b5092915050565b6001546001600160a01b031690565b33611f58611f40565b6001600160a01b03161480611f735750611f73600033611fd5565b611f9057604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b038116611fb7576040516313e6c64360e31b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b03831617905550565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600e8054610fa79061599b565b60028054141561202f5760405162461bcd60e51b8152600401610d4e90615829565b6002805547806120525760405163334ab3f560e11b815260040160405180910390fd5b600061205d82611e44565b905060005b600354811015612166576003818154811061208d57634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015482516001600160a01b03909116906108fc908490849081106120d057634e487b7160e01b600052603260045260246000fd5b60200260200101519081150290604051600060405180830381858888f1935050505061215457806003828154811061211857634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154604051634dc511bf60e11b815260048101929092526001600160a01b03166024820152604401610d4e565b8061215e816159d6565b915050612062565b5050600160025550565b6001600160a01b03821633141561219a5760405163b06307db60e01b815260040160405180910390fd5b3360008181526012602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61221184848461353a565b612223836001600160a01b0316613db5565b156122515761223484848484613dc4565b612251576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051808201909152601381527210dc9e5cdd185b135d5d185d1a5bdb935a5b9d606a1b6020820152600160055460ff1660038111156122a857634e487b7160e01b600052602160045260246000fd5b146122c657604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516122dc90600690615583565b60405180910390201461230257604051630a761c7560e31b815260040160405180910390fd5b3360405160609190911b6001600160601b03191660208201526034810185905260e084901b6001600160e01b031916605482015260f883901b6001600160f81b031916605882015260590160408051601f198184030181529181528151602092830120600081815260089093529120548790879060ff16156123975760405163180567a360e31b815260040160405180910390fd5b60006123de83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b6007549091506001600160a01b03808316911614612420576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260409020805460ff1916600117905563ffffffff8716866124483390565b601d546040516331a9108f60e11b8152600481018590526001600160a01b039283169290911690636352211e9060240160206040518083038186803b15801561249057600080fd5b505afa1580156124a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c89190614f81565b6001600160a01b0316141580156125675750336020546040516371e4cc7f60e11b8152600481018590526001600160a01b03928316929091169063e3c998fe9060240160206040518083038186803b15801561252357600080fd5b505afa158015612537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255b9190614f81565b6001600160a01b031614155b1561258557604051635b44649360e01b815260040160405180910390fd5b601f546001600160a01b031662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260ff8416602482015260440160206040518083038186803b1580156125de57600080fd5b505afa1580156125f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126169190615434565b61263357604051636a2b273d60e11b815260040160405180910390fd5b8060ff166001148015612659575060008281526022602052604090205460ff1615156001145b156126775760405163475d809760e01b815260040160405180910390fd5b8060ff1660021480156126a3575060008281526022602052604090205460ff6101009091041615156001145b156126c15760405163475d809760e01b815260040160405180910390fd5b8060ff1660031480156126ed575060008281526022602052604090205462010000900460ff1615156001145b1561270b5760405163475d809760e01b815260040160405180910390fd5b612716336001613788565b601f546001600160a01b031663f5298aca336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260ff8b16602482015260016044820152606401600060405180830381600087803b15801561277957600080fd5b505af115801561278d573d6000803e3d6000fd5b505050508760ff16600114156127c25763ffffffff89166000908152602260205260409020805460ff19166001179055612826565b8760ff16600214156127f55763ffffffff89166000908152602260205260409020805461ff001916610100179055612826565b8760ff16600314156128265763ffffffff89166000908152602260205260409020805462ff00001916620100001790555b600061283360018a613ebc565b6040805160a08101825263ffffffff808e16825260ff8d166020830152600192820183905283166060820152600060808201819052600b5493945090928392602192916128809190615923565b8152602080820192909252604090810160002083518154938501519285015160608601516080909601516001600160801b03908116600160801b0263ffffffff978816600160601b0263ffffffff60601b19938916600160401b0293909316600160401b600160801b0319968916600160201b026001600160401b0319909816989094169790971795909517939093161791909117919091169190911790555050505050505050505050505050565b6002805414156129515760405162461bcd60e51b8152600401610d4e90615829565b600280556040516370a0823160e01b81526000906001600160a01b038316906370a0823190612984903090600401615670565b60206040518083038186803b15801561299c57600080fd5b505afa1580156129b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d49190615434565b9050806129f45760405163334ab3f560e11b815260040160405180910390fd5b60006129ff82611e44565b905060005b600354811015612b2c57836001600160a01b031663a9059cbb60038381548110612a3e57634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015484516001600160a01b0390911690859085908110612a7d57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612aa29291906156db565b602060405180830381600087803b158015612abc57600080fd5b505af1158015612ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af491906151ab565b612b1a57806003828154811061211857634e487b7160e01b600052603260045260246000fd5b80612b24816159d6565b915050612a04565b505060016002555050565b6060612b42826133b8565b612b8e5760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610d4e565b601c612b9983613fa6565b604051602001612baa9291906155b8565b6040516020818303038152906040529050919050565b33612bc9611f40565b6001600160a01b03161480612be45750612be4600033611fd5565b80612c025750612c02600080516020615ac583398151915233611fd5565b612c1f5760405163c5cca88d60e01b815260040160405180910390fd5b6112916140bf565b606060056001018054610fa79061599b565b612c42826113ec565b612c4c813361394e565b6111b88383613a36565b604080518082019091526013815272105b1b1bddd31a5cdd14985b991bdb535a5b9d606a1b6020820152600160055460ff166003811115612ca757634e487b7160e01b600052602160045260246000fd5b14612cc557604051638ca755f560e01b815260040160405180910390fd5b80516020820120604051612cdb90600690615583565b604051809103902014612d0157604051630a761c7560e31b815260040160405180910390fd5b3385858585604051602001612d1a959493929190615522565b60408051601f198184030181529181528151602092830120600081815260089093529120548890889060ff1615612d645760405163180567a360e31b815260040160405180910390fd5b6000612dab83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b6007549091506001600160a01b03808316911614612ded576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260408120805460ff1916600117905560145460135460ff89169291612e1b91615923565b90506000612e28600b5490565b612e3483611388615923565b612e3e9190615923565b905082612e5e57604051633f44c9b160e11b815260040160405180910390fd5b80831115612e7f576040516352df9fe560e01b815260040160405180910390fd5b886004548160ff161115612eaa5760048054604051632305d97560e01b815291820152602401610d4e565b601d546040516370a0823160e01b81528b9160009182916001600160a01b0316906370a0823190612edf903390600401615670565b60206040518083038186803b158015612ef757600080fd5b505afa158015612f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2f9190615434565b1180612fb957506020546040516326d352ab60e11b81526000916001600160a01b031690634da6a55690612f67903390600401615670565b60206040518083038186803b158015612f7f57600080fd5b505afa158015612f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb79190615434565b115b15612fd257612fcf66470de4df820000826158b3565b90505b601e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613003903390600401615670565b60206040518083038186803b15801561301b57600080fd5b505afa15801561302f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130539190615434565b111561306d5761306a662386f26fc10000826158b3565b90505b60ff8216613083826701cdda4faccd0000615923565b61308d9190615904565b3410156130ad576040516375cc118d60e11b815260040160405180910390fd5b6130b88e8e8e614130565b6130c28f8d6137a2565b5050505050505050505050505050505050565b6060601c6040516020016130e9919061558f565b604051602081830303815290604052905090565b6001600160a01b03811660009081526009602052604081205460ff161561312657506001610c99565b6001600160a01b0380841660009081526012602090815260408083209386168352929052205460ff165b9392505050565b6003818154811061316757600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b33613198611f40565b6001600160a01b0316146131be5760405162461bcd60e51b8152600401610d4e906157f4565b6001600160a01b0381166132235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d4e565b61322e6000826139b2565b613240600061323b611f40565b613a36565b610d1c81613d63565b600360055460ff16600381111561327057634e487b7160e01b600052602160045260246000fd5b141561328f57604051630ddc900960e11b815260040160405180910390fd5b6005805482919060ff191660018360038111156132bc57634e487b7160e01b600052602160045260246000fd5b021790555060038160038111156132e357634e487b7160e01b600052602160045260246000fd5b14156133415760408051808201909152600880825267119a5b9a5cda195960c21b602090920191825261331891600691614d77565b50604051600080516020615b058339815191529061333890600690615773565b60405180910390a15b6005546040517f115b0a20885b9271082b68a739b15a23986a94c5e2807b824f9ad7dd918f8aeb91611c1d9160ff90911690615738565b60006001600160e01b031982166380ac58cd60e01b14806133a957506001600160e01b03198216635b5e139f60e01b145b80610c995750610c99826141dc565b6000600b5482108015610c995750506000908152600f6020526040902054600160e01b900460ff161590565b600360055460ff16600381111561340b57634e487b7160e01b600052602160045260246000fd5b141561342a57604051630ddc900960e11b815260040160405180910390fd5b805161343d906006906020840190614d77565b506005805460ff19169055604051600080516020615b0583398151915290611c1d90600690615773565b60008281526011602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600260055460ff1660038111156134ea57634e487b7160e01b600052602160045260246000fd5b1461350857604051635402932b60e01b815260040160405180910390fd5b6005805460ff1916600117905560405160008152600080516020615b25833981519152906020015b60405180910390a1565b600061354582613c49565b9050836001600160a01b031681600001516001600160a01b03161461357c5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061359a575061359a85336130fd565b806135b55750336135aa8461102a565b6001600160a01b0316145b9050806135d557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166135fc57604051633a954ecd60e21b815260040160405180910390fd5b61360860008487613467565b6001600160a01b03858116600090815260106020908152604080832080546001600160401b03198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600f90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166136db57600b5482146136db57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020615ae583398151915260405160405180910390a4610f91565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008060006137738585614201565b915091506137808161426e565b509392505050565b61122682826040518060200160405280600081525061446a565b60006137ae8383614602565b905060005b8260ff168160ff1610156122515760006137f86000848460ff16815181106137eb57634e487b7160e01b600052603260045260246000fd5b6020026020010151613ebc565b905060006040518060a00160405280600063ffffffff168152602001858560ff168151811061383757634e487b7160e01b600052603260045260246000fd5b602002602001015160ff1663ffffffff168152602001600063ffffffff1681526020018363ffffffff16815260200160006001600160801b0316815250905080602160008560ff168860ff16600b546138909190615923565b61389a91906158b3565b8152602080820192909252604090810160002083518154938501519285015160608601516080909601516001600160801b03908116600160801b0263ffffffff978816600160601b0263ffffffff60601b19938916600160401b0293909316600160401b600160801b0319968916600160201b026001600160401b0319909816989094169790971795909517939093161791909117919091169190911790555081905061394681615a15565b9150506137b3565b6139588282611fd5565b61122657613970816001600160a01b03166014614909565b61397b836020614909565b60405160200161398c929190615601565b60408051601f198184030181529082905262461bcd60e51b8252610d4e91600401615760565b6139bc8282611fd5565b611226576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556139f23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b613a408282611fd5565b15611226576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000613aa683613c49565b80519091508215613b0c576000336001600160a01b0383161480613acf5750613acf82336130fd565b80613aea575033613adf8661102a565b6001600160a01b0316145b905080613b0a57604051632ce44b5f60e11b815260040160405180910390fd5b505b613b1860008583613467565b6001600160a01b0380821660008181526010602090815260408083208054600160801b6000196001600160401b038084169190910181166001600160401b0319841681178390048216600190810183169093026001600160401b03600160801b03600160c01b0319909416179290921783558b8652600f909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116613c1057600b548214613c1057805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020615ae5833981519152908390a45050600c805460010190555050565b604080516060810182526000808252602082018190529181019190915281600b54811015613d4a576000818152600f6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290613d485780516001600160a01b031615613cdf579392505050565b50600019016000818152600f6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613d43579392505050565b613cdf565b505b604051636f96cda160e11b815260040160405180910390fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613df990339089908890889060040161569e565b602060405180830381600087803b158015613e1357600080fd5b505af1925050508015613e43575060408051601f3d908101601f19168201909252613e409181019061525c565b60015b613e9e573d808015613e71576040519150601f19603f3d011682016040523d82523d6000602084013e613e76565b606091505b508051613e96576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008063ffffffff8416158015613ed657508260ff166001145b15613f1857506023805463ffffffff169081906000613ef4836159f1565b91906101000a81548163ffffffff021916908363ffffffff16021790555050613150565b63ffffffff8416158015613f2f57508260ff166002145b15613f54575060238054600160201b900463ffffffff169081906004613ef4836159f1565b8260ff1660031415613150575060238054600160401b900463ffffffff169081906008613f80836159f1565b91906101000a81548163ffffffff021916908363ffffffff160217905550509392505050565b606081613fca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613ff45780613fde816159d6565b9150613fed9050600a836158f0565b9150613fce565b6000816001600160401b0381111561401c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614046576020820181803683370190505b5090505b8415613eb45761405b600183615923565b9150614068600a86615a35565b6140739060306158b3565b60f81b81838151811061409657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506140b8600a866158f0565b945061404a565b600160055460ff1660038111156140e657634e487b7160e01b600052602160045260246000fd5b1461410457604051638ca755f560e01b815260040160405180910390fd5b6005805460ff1916600217905560405160018152600080516020615b2583398151915290602001613530565b33838360006141a6838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506018546040516001600160601b031960608b901b166020820152909250603401905060405160208183030381529060405280519060200120614aea565b9050806141c657604051638dce817560e01b815260040160405180910390fd5b6141d3338660ff16613788565b50505050505050565b60006001600160e01b0319821663152a902d60e11b1480610c995750610c9982614b00565b6000808251604114156142385760208301516040840151606085015160001a61422c87828585614b35565b94509450505050611442565b8251604014156142625760208301516040840151614257868383614c18565b935093505050611442565b50600090506002611442565b600081600481111561429057634e487b7160e01b600052602160045260246000fd5b14156142995750565b60018160048111156142bb57634e487b7160e01b600052602160045260246000fd5b14156143045760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610d4e565b600281600481111561432657634e487b7160e01b600052602160045260246000fd5b14156143745760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d4e565b600381600481111561439657634e487b7160e01b600052602160045260246000fd5b14156143ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d4e565b600481600481111561441157634e487b7160e01b600052602160045260246000fd5b1415610d1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d4e565b600b546001600160a01b03841661449357604051622e076360e81b815260040160405180910390fd5b826144b15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260106020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b6001600160401b031990941690921783900481168b01811690920217909155858452600f90925290912080546001600160e01b0319168317600160a01b429093169290920291909117905581908185019061454a90613db5565b156145c0575b60405182906001600160a01b03881690600090600080516020615ae5833981519152908290a46145896000878480600101955087613dc4565b6145a6576040516368d2bf6b60e11b815260040160405180910390fd5b8082106145505782600b54146145bb57600080fd5b6145f3565b5b6040516001830192906001600160a01b03881690600090600080516020615ae5833981519152908290a48082106145c1575b50600b55612251600085838684565b606060008260ff166001600160401b0381111561462f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015614658578160200160208202803683370190505b50905060005b8360ff168160ff161015614708578060ff168460ff16600b546146819190615923565b61468b91906158b3565b60408051602081019290925281018690524460608201526080016040516020818303038152906040528051906020012060001c828260ff16815181106146e157634e487b7160e01b600052603260045260246000fd5b63ffffffff909216602092830291909101909101528061470081615a15565b91505061465e565b5060008360ff166001600160401b0381111561473457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561475d578160200160208202803683370190505b50905060005b8460ff168160ff16101561490057600061477d6003614c51565b9050600063ffffffff801682868560ff16815181106147ac57634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff166147c49190615904565b6147ce91906158f0565b905060006147dc6001614c51565b8210156147eb57506000614836565b6147f56002614c51565b82101561480457506001614836565b61480e6003614c51565b82101561481d57506002614836565b6040516352df9fe560e01b815260040160405180910390fd5b6148418160016158cb565b858560ff168151811061486457634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff1681525050601b8160ff168154811061489c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906010918282040191900660020281819054906101000a900461ffff16809291906148cf90615966565b91906101000a81548161ffff021916908361ffff1602179055505050505080806148f890615a15565b915050614763565b50949350505050565b60606000614918836002615904565b6149239060026158b3565b6001600160401b0381111561494857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614972576020820181803683370190505b509050600360fc1b8160008151811061499b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106149d857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006149fc846002615904565b614a079060016158b3565b90505b6001811115614a9b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a4957634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110614a6d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93614a9481615984565b9050614a0a565b5083156131505760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d4e565b600082614af78584614cdc565b14949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c9957506301ffc9a760e01b6001600160e01b0319831614610c99565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115614b625750600090506003614c0f565b8460ff16601b14158015614b7a57508460ff16601c14155b15614b8b5750600090506004614c0f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614bdf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614c0857600060019250925050614c0f565b9150600090505b94509492505050565b6000806001600160ff1b03831681614c3560ff86901c601b6158b3565b9050614c4387828885614b35565b935093505050935093915050565b601b54600090819060ff84161115614c6957601b5492505b60005b8360ff168160ff161015611f3957601b8160ff1681548110614c9e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120601082040154614cc891600f166002026101000a900461ffff16836158b3565b915080614cd481615a15565b915050614c6c565b600081815b8451811015613780576000858281518110614d0c57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311614d325760008381526020829052604090209250614d43565b600081815260208490526040902092505b5080614d4e816159d6565b915050614ce1565b5080546000825560020290600052602060002090810190610d1c9190614dfb565b828054614d839061599b565b90600052602060002090601f016020900481019282614da55760008555614deb565b82601f10614dbe57805160ff1916838001178555614deb565b82800160010185558215614deb579182015b82811115614deb578251825591602001919060010190614dd0565b50614df7929150614e21565b5090565b5b80821115614df75780546001600160a01b031916815560006001820155600201614dfc565b5b80821115614df75760008155600101614e22565b60006001600160401b03831115614e4f57614e4f615a75565b614e62601f8401601f1916602001615860565b9050828152838383011115614e7657600080fd5b828260208301376000602084830101529392505050565b600082601f830112614e9d578081fd5b81356020614eb2614ead83615890565b615860565b80838252828201915082860187848660051b8901011115614ed1578586fd5b855b85811015614eef57813584529284019290840190600101614ed3565b5090979650505050505050565b60008083601f840112614f0d578182fd5b5081356001600160401b03811115614f23578182fd5b60208301915083602082850101111561144257600080fd5b803563ffffffff81168114614f4f57600080fd5b919050565b803560ff81168114614f4f57600080fd5b600060208284031215614f76578081fd5b813561315081615a8b565b600060208284031215614f92578081fd5b815161315081615a8b565b60008060408385031215614faf578081fd5b8235614fba81615a8b565b91506020830135614fca81615a8b565b809150509250929050565b600080600060608486031215614fe9578081fd5b8335614ff481615a8b565b9250602084013561500481615a8b565b929592945050506040919091013590565b6000806000806080858703121561502a578081fd5b843561503581615a8b565b9350602085013561504581615a8b565b92506040850135915060608501356001600160401b03811115615066578182fd5b8501601f81018713615076578182fd5b61508587823560208401614e36565b91505092959194509250565b600080604083850312156150a3578182fd5b82356150ae81615a8b565b91506020830135614fca81615aa0565b600080604083850312156150d0578182fd5b82356150db81615a8b565b946020939093013593505050565b600080604083850312156150fb578182fd5b82356001600160401b0380821115615111578384fd5b818501915085601f830112615124578384fd5b81356020615134614ead83615890565b8083825282820191508286018a848660051b8901011115615153578889fd5b8896505b8487101561517e57803561516a81615a8b565b835260019690960195918301918301615157565b5096505086013592505080821115615194578283fd5b506151a185828601614e8d565b9150509250929050565b6000602082840312156151bc578081fd5b815161315081615aa0565b6000602082840312156151d8578081fd5b5035919050565b600080604083850312156151f1578182fd5b823591506020830135614fca81615a8b565b600080600060608486031215615217578081fd5b83359250602084013561522981615a8b565b915061523760408501614f54565b90509250925092565b600060208284031215615251578081fd5b813561315081615aae565b60006020828403121561526d578081fd5b815161315081615aae565b60008060008060008060808789031215615290578384fd5b86356001600160401b03808211156152a6578586fd5b6152b28a838b01614efc565b90985096506020890135955060408901359150808211156152d1578384fd5b818901915089601f8301126152e4578384fd5b8135818111156152f2578485fd5b8a60208260051b8501011115615306578485fd5b60208301955080945050505061531e60608801614f54565b90509295509295509295565b600080600080600060808688031215615341578283fd5b85356001600160401b03811115615356578384fd5b61536288828901614efc565b9096509450506020860135925061537b60408701614f3b565b915061538960608701614f54565b90509295509295909350565b600080600080606085870312156153aa578182fd5b84356001600160401b038111156153bf578283fd5b6153cb87828801614efc565b909550935050602085013591506153e460408601614f54565b905092959194509250565b600060208284031215615400578081fd5b81356001600160401b03811115615415578182fd5b8201601f81018413615425578182fd5b613eb484823560208401614e36565b600060208284031215615445578081fd5b5051919050565b6000806040838503121561545e578182fd5b50508035926020909101359150565b60006020828403121561547e578081fd5b61315082614f3b565b6000815180845261549f81602086016020860161593a565b601f01601f19169290920160200192915050565b600081546154c08161599b565b600182811680156154d857600181146154e957615518565b60ff19841687528287019450615518565b8560005260208060002060005b8581101561550f5781548a8201529084019082016154f6565b50505082870194505b5050505092915050565b606086901b6001600160601b03191681526014810185905260006001600160fb1b0384111561554f578081fd5b8360051b8086603485013760f89390931b6001600160f81b0319166034929093019182019290925260350195945050505050565b600061315082846154b3565b600061559b82846154b3565b6c31b7b73a3930b1ba173539b7b760991b8152600d019392505050565b60006155c482856154b3565b65746f6b656e2f60d01b815283516155e381600684016020880161593a565b64173539b7b760d91b60069290910191820152600b01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161563381601785016020880161593a565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161566481602884016020880161593a565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906156d190830184615487565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561572c57835183529284019291840191600101615710565b50909695505050505050565b602081016004831061575a57634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260006131506020830184615487565b600060208083528184546157868161599b565b808487015260406001808416600081146157a757600181146157bb576157e6565b60ff198516898401526060890195506157e6565b898852868820885b858110156157de5781548b82018601529083019088016157c3565b8a0184019650505b509398975050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f191681016001600160401b038111828210171561588857615888615a75565b604052919050565b60006001600160401b038211156158a9576158a9615a75565b5060051b60200190565b600082198211156158c6576158c6615a49565b500190565b600060ff821660ff84168060ff038211156158e8576158e8615a49565b019392505050565b6000826158ff576158ff615a5f565b500490565b600081600019048311821515161561591e5761591e615a49565b500290565b60008282101561593557615935615a49565b500390565b60005b8381101561595557818101518382015260200161593d565b838111156122515750506000910152565b600061ffff82168061597a5761597a615a49565b6000190192915050565b60008161599357615993615a49565b506000190190565b600181811c908216806159af57607f821691505b602082108114156159d057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156159ea576159ea615a49565b5060010190565b600063ffffffff80831681811415615a0b57615a0b615a49565b6001019392505050565b600060ff821660ff811415615a2c57615a2c615a49565b60010192915050565b600082615a4457615a44615a5f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610d1c57600080fd5b8015158114610d1c57600080fd5b6001600160e01b031981168114610d1c57600080fdfe71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef73c24a7893680131e7c50fcccddb220f15bfc9f6968bef4235b6cc5994049124ff4a5dbbab6b1963d10f5edd139f33a7987ecb3c4f65969be77ddba28d946594a2646970667358221220e604772d4c9c3fb23c74bf0e4dc623dc3759c1953d84bec55970d7fa54492a9364736f6c63430008040033000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb00000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d0000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de0000000000000000000000000779421ffe3c1a0a45f03fb246757f7575ce133ef00000000000000000000000068df6bc1df2bdfa09bb49528718106e547efe39a0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad794600000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102f85760003560e01c8063017043a51461030457806301ffc9a71461031b578063046dc16614610350578063065dc4c114610370578063068709e31461039057806306fdde03146103b4578063081812fc146103d657806308e1c61314610403578063095ea7b31461041857806309a3a9c1146104385780631351cf511461044e5780631552ac8e1461046e57806317bce40f1461048457806318160ddd1461049a5780631a8bd2da146104b35780631cf015c6146104c857806322067e5b146104e857806323b872dd146104fd578063248a9ca31461051d57806325bdb2a81461053d5780632a55205a1461055d5780632dea7e031461058b5780632eb4a7ab1461059e5780632f2ff15d146105b457806332cb6b0c146105d457806335c6aaf8146105ea57806336568abe14610600578063404a1f371461062057806342260b5d1461064057806342842e0e1461067957806342966c6814610699578063430433b3146106b95780634b8e837d146106d957806355f804b3146107e35780635b7633d0146108035780635c6fd90b146108215780636352211e1461084157806370a0823114610861578063715018a61461088157806376c64c6214610896578063797669c9146108ab5780637cb64759146108cd5780638d623781146108ed5780638da5cb5b1461091a5780638dc251e31461092f57806391d148541461094f57806395d89b411461096f5780639fbc871314610984578063a0ef91df146109a4578063a217fddf146109b9578063a22cb465146109ce578063a81152f7146109ee578063b88d4fde14610a03578063baf93c1214610a23578063c002d23d14610a43578063c7e42b1b14610a5f578063c87b56dd14610a7f578063cd85cdb514610a9f578063d1d011d314610ab4578063d1e812a314610aca578063d547741f14610adf578063da659e2614610aff578063e8a3d48514610b12578063e985e9c514610b27578063efeb5e5814610b47578063f0292a0314610b67578063f2fde38b14610b7d57600080fd5b366102ff57005b600080fd5b34801561031057600080fd5b50610319610b9d565b005b34801561032757600080fd5b5061033b610336366004615240565b610c59565b60405190151581526020015b60405180910390f35b34801561035c57600080fd5b5061031961036b366004614f65565b610c9f565b34801561037c57600080fd5b5061031961038b3660046150e9565b610d1f565b34801561039c57600080fd5b506103a660145481565b604051908152602001610347565b3480156103c057600080fd5b506103c9610f98565b6040516103479190615760565b3480156103e257600080fd5b506103f66103f13660046151c7565b61102a565b6040516103479190615670565b34801561040f57600080fd5b5061031961106e565b34801561042457600080fd5b506103196104333660046150be565b611136565b34801561044457600080fd5b506103a660045481565b34801561045a57600080fd5b50610319610469366004615091565b6111bd565b34801561047a57600080fd5b506103a660135481565b34801561049057600080fd5b506103a660165481565b3480156104a657600080fd5b50600c54600b54036103a6565b3480156104bf57600080fd5b5061031961122a565b3480156104d457600080fd5b506103196104e336600461546d565b611293565b3480156104f457600080fd5b50610319611319565b34801561050957600080fd5b50610319610518366004614fd5565b6113e1565b34801561052957600080fd5b506103a66105383660046151c7565b6113ec565b34801561054957600080fd5b5060055460ff166040516103479190615738565b34801561056957600080fd5b5061057d61057836600461544c565b611401565b6040516103479291906156db565b610319610599366004615395565b611449565b3480156105aa57600080fd5b506103a660185481565b3480156105c057600080fd5b506103196105cf3660046151df565b6118e9565b3480156105e057600080fd5b506103a6613a9881565b3480156105f657600080fd5b506103a660175481565b34801561060c57600080fd5b5061031961061b3660046151df565b611906565b34801561062c57600080fd5b5061031961063b366004614f65565b611980565b34801561064c57600080fd5b50600a5461066490600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610347565b34801561068557600080fd5b50610319610694366004614fd5565b6119f4565b3480156106a557600080fd5b506103196106b43660046151c7565b611a0f565b3480156106c557600080fd5b506103196106d4366004615203565b611a1a565b3480156106e557600080fd5b5061078e6106f43660046151c7565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915250600090815260216020908152604091829020825160a081018452905463ffffffff8082168352600160201b8204811693830193909352600160401b8104831693820193909352600160601b83049091166060820152600160801b9091046001600160801b0316608082015290565b6040516103479190815163ffffffff9081168252602080840151821690830152604080840151821690830152606080840151909116908201526080918201516001600160801b03169181019190915260a00190565b3480156107ef57600080fd5b506103196107fe3660046153ef565b611b1a565b34801561080f57600080fd5b506007546001600160a01b03166103f6565b34801561082d57600080fd5b5061031961083c366004614f65565b611c28565b34801561084d57600080fd5b506103f661085c3660046151c7565b611c9c565b34801561086d57600080fd5b506103a661087c366004614f65565b611cae565b34801561088d57600080fd5b50610319611cfc565b3480156108a257600080fd5b50610319611d35565b3480156108b757600080fd5b506103a6600080516020615ac583398151915281565b3480156108d957600080fd5b506103196108e83660046151c7565b611dfa565b3480156108f957600080fd5b5061090d6109083660046151c7565b611e44565b60405161034791906156f4565b34801561092657600080fd5b506103f6611f40565b34801561093b57600080fd5b5061031961094a366004614f65565b611f4f565b34801561095b57600080fd5b5061033b61096a3660046151df565b611fd5565b34801561097b57600080fd5b506103c9611ffe565b34801561099057600080fd5b50600a546103f6906001600160a01b031681565b3480156109b057600080fd5b5061031961200d565b3480156109c557600080fd5b506103a6600081565b3480156109da57600080fd5b506103196109e9366004615091565b612170565b3480156109fa57600080fd5b506103a6600381565b348015610a0f57600080fd5b50610319610a1e366004615015565b612206565b348015610a2f57600080fd5b50610319610a3e36600461532a565b612257565b348015610a4f57600080fd5b506103a66701cdda4faccd000081565b348015610a6b57600080fd5b50610319610a7a366004614f65565b61292f565b348015610a8b57600080fd5b506103c9610a9a3660046151c7565b612b37565b348015610aab57600080fd5b50610319612bc0565b348015610ac057600080fd5b506103a660155481565b348015610ad657600080fd5b506103c9612c27565b348015610aeb57600080fd5b50610319610afa3660046151df565b612c39565b610319610b0d366004615278565b612c56565b348015610b1e57600080fd5b506103c96130d5565b348015610b3357600080fd5b5061033b610b42366004614f9d565b6130fd565b348015610b5357600080fd5b5061057d610b623660046151c7565b613157565b348015610b7357600080fd5b506103a661138881565b348015610b8957600080fd5b50610319610b98366004614f65565b61318f565b33610ba6611f40565b6001600160a01b03161480610bc15750610bc1600033611fd5565b610bde57604051637bb62a2160e01b815260040160405180910390fd5b600060055460ff166003811115610c0557634e487b7160e01b600052602160045260246000fd5b1415610c2457604051638ca755f560e01b815260040160405180910390fd5b610c2e6003613249565b6040517faf24d3bccd7e329975f60c4d13b81252ff061649fb46d1c416c9b6a13100bff190600090a1565b60006001600160e01b03198216637965db0b60e01b1480610c8a57506001600160e01b0319821663152a902d60e11b145b80610c995750610c9982613378565b92915050565b33610ca8611f40565b6001600160a01b03161480610cc35750610cc3600033611fd5565b80610ce15750610ce1600080516020615ac583398151915233611fd5565b610cfe5760405163c5cca88d60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b03831617905550565b50565b33610d28611f40565b6001600160a01b031614610d575760405162461bcd60e51b8152600401610d4e906157f4565b60405180910390fd5b81818051825114610d7b5760405163512509d360e11b815260040160405180910390fd5b8151610d9a5760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015610e5c5760006001600160a01b0316838281518110610dd157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610e0157604051631e2add6160e21b815260040160405180910390fd5b818181518110610e2157634e487b7160e01b600052603260045260246000fd5b602002602001015160001415610e4a5760405163572d773160e11b815260040160405180910390fd5b80610e54816159d6565b915050610d9d565b50610e6960036000614d56565b60005b8451811015610f915760006001600160a01b0316858281518110610ea057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610ed05760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110610efd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110610f3357634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015580610f89816159d6565b915050610e6c565b5050505050565b6060600d8054610fa79061599b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd39061599b565b80156110205780601f10610ff557610100808354040283529160200191611020565b820191906000526020600020905b81548152906001019060200180831161100357829003601f168201915b5050505050905090565b6000611035826133b8565b611052576040516333d1c03960e21b815260040160405180910390fd5b506000908152601160205260409020546001600160a01b031690565b33611077611f40565b6001600160a01b031614806110925750611092600033611fd5565b806110b057506110b0600080516020615ac583398151915233611fd5565b6110cd5760405163c5cca88d60e01b815260040160405180910390fd5b61110160405180604001604052806013815260200172105b1b1bddd31a5cdd14985b991bdb535a5b9d606a1b8152506133e4565b61110b6001613249565b6040517ff4c9e5873d4ef21518f8e09cfbc0be9914c979c4a8fdb46faa22633354bb761890600090a1565b600061114182611c9c565b9050806001600160a01b0316836001600160a01b031614156111765760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146111ad5761119081336130fd565b6111ad576040516367d9dca160e11b815260040160405180910390fd5b6111b8838383613467565b505050565b336111c6611f40565b6001600160a01b031614806111e157506111e1600033611fd5565b6111fe57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600960205260409020805460ff19168215151790555050565b5050565b33611233611f40565b6001600160a01b0316148061124e575061124e600033611fd5565b8061126c575061126c600080516020615ac583398151915233611fd5565b6112895760405163c5cca88d60e01b815260040160405180910390fd5b6112916134c3565b565b3361129c611f40565b6001600160a01b031614806112b757506112b7600033611fd5565b6112d457604051637bb62a2160e01b815260040160405180910390fd5b63ffffffff81166112f85760405163aa9566b560e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b33611322611f40565b6001600160a01b0316148061133d575061133d600033611fd5565b8061135b575061135b600080516020615ac583398151915233611fd5565b6113785760405163c5cca88d60e01b815260040160405180910390fd5b6113ac6040518060400160405280601381526020017210dc9e5cdd185b135d5d185d1a5bdb935a5b9d606a1b8152506133e4565b6113b66001613249565b6040517fa145fa7872c3243c5371ef3ea64d391db1f909e9669fa8628c3c2f8193850eca90600090a1565b6111b883838361353a565b60009081526020819052604090206001015490565b600a54600090819081906127109061142690600160a01b900463ffffffff1686615904565b61143091906158f0565b600a546001600160a01b031693509150505b9250929050565b60408051808201909152601081526f141d589b1a58d4985b991bdb535a5b9d60821b6020820152600160055460ff16600381111561149757634e487b7160e01b600052602160045260246000fd5b146114b557604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516114cb90600690615583565b6040518091039020146114f157604051630a761c7560e31b815260040160405180910390fd5b3360405160609190911b6001600160601b03191660208201526034810184905260f883901b6001600160f81b031916605482015260550160408051601f198184030181529181528151602092830120600081815260089093529120548690869060ff16156115725760405163180567a360e31b815260040160405180910390fd5b60006115bf83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b90613764565b6007549091506001600160a01b03808316911614611601576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260408120805460ff1916600117905560145460135460ff8916929161162f91615923565b9050600061163c600b5490565b61164883611388615923565b6116529190615923565b90508261167257604051633f44c9b160e11b815260040160405180910390fd5b80831115611693576040516352df9fe560e01b815260040160405180910390fd5b886004548160ff1611156116be5760048054604051632305d97560e01b815291820152602401610d4e565b601d546040516370a0823160e01b81528b9160009182916001600160a01b0316906370a08231906116f3903390600401615670565b60206040518083038186803b15801561170b57600080fd5b505afa15801561171f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117439190615434565b11806117cd57506020546040516326d352ab60e11b81526000916001600160a01b031690634da6a5569061177b903390600401615670565b60206040518083038186803b15801561179357600080fd5b505afa1580156117a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cb9190615434565b115b156117e6576117e366470de4df820000826158b3565b90505b601e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611817903390600401615670565b60206040518083038186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118679190615434565b11156118815761187e662386f26fc10000826158b3565b90505b60ff8216611897826701cdda4faccd0000615923565b6118a19190615904565b3410156118c1576040516375cc118d60e11b815260040160405180910390fd5b6118ce338d60ff16613788565b6118d88d8d6137a2565b505050505050505050505050505050565b6118f2826113ec565b6118fc813361394e565b6111b883836139b2565b6001600160a01b03811633146119765760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d4e565b6112268282613a36565b33611989611f40565b6001600160a01b031614806119a457506119a4600033611fd5565b6119c157604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b0381166119e957604051633ef39b8160e01b815260040160405180910390fd5b611226600083613a36565b6111b883838360405180602001604052806000815250612206565b610d1c816001613a9b565b33611a23611f40565b6001600160a01b03161480611a3e5750611a3e600033611fd5565b611a5b57604051637bb62a2160e01b815260040160405180910390fd5b8060ff1660135460001415611a83576040516310db646560e21b815260040160405180910390fd5b6000601454601354611a959190615923565b905080821115611ab8576040516310db646560e21b815260040160405180910390fd5b836001600160a01b038116611ae057604051635b84d3f760e01b815260040160405180910390fd5b8360ff1660146000828254611af591906158b3565b90915550611b0890508560ff8616613788565b611b1286856137a2565b505050505050565b33611b23611f40565b6001600160a01b03161480611b3e5750611b3e600033611fd5565b80611b5c5750611b5c600080516020615ac583398151915233611fd5565b611b795760405163c5cca88d60e01b815260040160405180910390fd5b8051602f60f81b908290611b8f90600190615923565b81518110611bad57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191614611bda5760405163a467f6f560e01b815260040160405180910390fd5b8051611bed90601c906020840190614d77565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051611c1d9190615760565b60405180910390a150565b33611c31611f40565b6001600160a01b03161480611c4c5750611c4c600033611fd5565b611c6957604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b038116611c9157604051633ef39b8160e01b815260040160405180910390fd5b6112266000836139b2565b6000611ca782613c49565b5192915050565b60006001600160a01b038216611cd7576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601060205260409020546001600160401b031690565b33611d05611f40565b6001600160a01b031614611d2b5760405162461bcd60e51b8152600401610d4e906157f4565b6112916000613d63565b33611d3e611f40565b6001600160a01b03161480611d595750611d59600033611fd5565b80611d775750611d77600080516020615ac583398151915233611fd5565b611d945760405163c5cca88d60e01b815260040160405180910390fd5b611dc56040518060400160405280601081526020016f141d589b1a58d4985b991bdb535a5b9d60821b8152506133e4565b611dcf6001613249565b6040517fe9d1cb0db6b9ee316146e55bd9b1037307248b6d1ec134b1071cc6a89434feeb90600090a1565b33611e03611f40565b6001600160a01b03161480611e1e5750611e1e600033611fd5565b611e3b57604051637bb62a2160e01b815260040160405180910390fd5b610d1c81601855565b6003546060906000906001600160401b03811115611e7257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e9b578160200160208202803683370190505b50905060005b600354811015611f3957600061271060038381548110611ed157634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015486611eee9190615904565b611ef891906158f0565b905080838381518110611f1b57634e487b7160e01b600052603260045260246000fd5b60209081029190910101525080611f31816159d6565b915050611ea1565b5092915050565b6001546001600160a01b031690565b33611f58611f40565b6001600160a01b03161480611f735750611f73600033611fd5565b611f9057604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b038116611fb7576040516313e6c64360e31b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b03831617905550565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600e8054610fa79061599b565b60028054141561202f5760405162461bcd60e51b8152600401610d4e90615829565b6002805547806120525760405163334ab3f560e11b815260040160405180910390fd5b600061205d82611e44565b905060005b600354811015612166576003818154811061208d57634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015482516001600160a01b03909116906108fc908490849081106120d057634e487b7160e01b600052603260045260246000fd5b60200260200101519081150290604051600060405180830381858888f1935050505061215457806003828154811061211857634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154604051634dc511bf60e11b815260048101929092526001600160a01b03166024820152604401610d4e565b8061215e816159d6565b915050612062565b5050600160025550565b6001600160a01b03821633141561219a5760405163b06307db60e01b815260040160405180910390fd5b3360008181526012602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61221184848461353a565b612223836001600160a01b0316613db5565b156122515761223484848484613dc4565b612251576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051808201909152601381527210dc9e5cdd185b135d5d185d1a5bdb935a5b9d606a1b6020820152600160055460ff1660038111156122a857634e487b7160e01b600052602160045260246000fd5b146122c657604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516122dc90600690615583565b60405180910390201461230257604051630a761c7560e31b815260040160405180910390fd5b3360405160609190911b6001600160601b03191660208201526034810185905260e084901b6001600160e01b031916605482015260f883901b6001600160f81b031916605882015260590160408051601f198184030181529181528151602092830120600081815260089093529120548790879060ff16156123975760405163180567a360e31b815260040160405180910390fd5b60006123de83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b6007549091506001600160a01b03808316911614612420576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260409020805460ff1916600117905563ffffffff8716866124483390565b601d546040516331a9108f60e11b8152600481018590526001600160a01b039283169290911690636352211e9060240160206040518083038186803b15801561249057600080fd5b505afa1580156124a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c89190614f81565b6001600160a01b0316141580156125675750336020546040516371e4cc7f60e11b8152600481018590526001600160a01b03928316929091169063e3c998fe9060240160206040518083038186803b15801561252357600080fd5b505afa158015612537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255b9190614f81565b6001600160a01b031614155b1561258557604051635b44649360e01b815260040160405180910390fd5b601f546001600160a01b031662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260ff8416602482015260440160206040518083038186803b1580156125de57600080fd5b505afa1580156125f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126169190615434565b61263357604051636a2b273d60e11b815260040160405180910390fd5b8060ff166001148015612659575060008281526022602052604090205460ff1615156001145b156126775760405163475d809760e01b815260040160405180910390fd5b8060ff1660021480156126a3575060008281526022602052604090205460ff6101009091041615156001145b156126c15760405163475d809760e01b815260040160405180910390fd5b8060ff1660031480156126ed575060008281526022602052604090205462010000900460ff1615156001145b1561270b5760405163475d809760e01b815260040160405180910390fd5b612716336001613788565b601f546001600160a01b031663f5298aca336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260ff8b16602482015260016044820152606401600060405180830381600087803b15801561277957600080fd5b505af115801561278d573d6000803e3d6000fd5b505050508760ff16600114156127c25763ffffffff89166000908152602260205260409020805460ff19166001179055612826565b8760ff16600214156127f55763ffffffff89166000908152602260205260409020805461ff001916610100179055612826565b8760ff16600314156128265763ffffffff89166000908152602260205260409020805462ff00001916620100001790555b600061283360018a613ebc565b6040805160a08101825263ffffffff808e16825260ff8d166020830152600192820183905283166060820152600060808201819052600b5493945090928392602192916128809190615923565b8152602080820192909252604090810160002083518154938501519285015160608601516080909601516001600160801b03908116600160801b0263ffffffff978816600160601b0263ffffffff60601b19938916600160401b0293909316600160401b600160801b0319968916600160201b026001600160401b0319909816989094169790971795909517939093161791909117919091169190911790555050505050505050505050505050565b6002805414156129515760405162461bcd60e51b8152600401610d4e90615829565b600280556040516370a0823160e01b81526000906001600160a01b038316906370a0823190612984903090600401615670565b60206040518083038186803b15801561299c57600080fd5b505afa1580156129b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d49190615434565b9050806129f45760405163334ab3f560e11b815260040160405180910390fd5b60006129ff82611e44565b905060005b600354811015612b2c57836001600160a01b031663a9059cbb60038381548110612a3e57634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015484516001600160a01b0390911690859085908110612a7d57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612aa29291906156db565b602060405180830381600087803b158015612abc57600080fd5b505af1158015612ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af491906151ab565b612b1a57806003828154811061211857634e487b7160e01b600052603260045260246000fd5b80612b24816159d6565b915050612a04565b505060016002555050565b6060612b42826133b8565b612b8e5760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610d4e565b601c612b9983613fa6565b604051602001612baa9291906155b8565b6040516020818303038152906040529050919050565b33612bc9611f40565b6001600160a01b03161480612be45750612be4600033611fd5565b80612c025750612c02600080516020615ac583398151915233611fd5565b612c1f5760405163c5cca88d60e01b815260040160405180910390fd5b6112916140bf565b606060056001018054610fa79061599b565b612c42826113ec565b612c4c813361394e565b6111b88383613a36565b604080518082019091526013815272105b1b1bddd31a5cdd14985b991bdb535a5b9d606a1b6020820152600160055460ff166003811115612ca757634e487b7160e01b600052602160045260246000fd5b14612cc557604051638ca755f560e01b815260040160405180910390fd5b80516020820120604051612cdb90600690615583565b604051809103902014612d0157604051630a761c7560e31b815260040160405180910390fd5b3385858585604051602001612d1a959493929190615522565b60408051601f198184030181529181528151602092830120600081815260089093529120548890889060ff1615612d645760405163180567a360e31b815260040160405180910390fd5b6000612dab83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b992508891506137129050565b6007549091506001600160a01b03808316911614612ded576007546040516372ee54c960e01b8152610d4e9183916001600160a01b0390911690600401615684565b6000848152600860205260408120805460ff1916600117905560145460135460ff89169291612e1b91615923565b90506000612e28600b5490565b612e3483611388615923565b612e3e9190615923565b905082612e5e57604051633f44c9b160e11b815260040160405180910390fd5b80831115612e7f576040516352df9fe560e01b815260040160405180910390fd5b886004548160ff161115612eaa5760048054604051632305d97560e01b815291820152602401610d4e565b601d546040516370a0823160e01b81528b9160009182916001600160a01b0316906370a0823190612edf903390600401615670565b60206040518083038186803b158015612ef757600080fd5b505afa158015612f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2f9190615434565b1180612fb957506020546040516326d352ab60e11b81526000916001600160a01b031690634da6a55690612f67903390600401615670565b60206040518083038186803b158015612f7f57600080fd5b505afa158015612f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb79190615434565b115b15612fd257612fcf66470de4df820000826158b3565b90505b601e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613003903390600401615670565b60206040518083038186803b15801561301b57600080fd5b505afa15801561302f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130539190615434565b111561306d5761306a662386f26fc10000826158b3565b90505b60ff8216613083826701cdda4faccd0000615923565b61308d9190615904565b3410156130ad576040516375cc118d60e11b815260040160405180910390fd5b6130b88e8e8e614130565b6130c28f8d6137a2565b5050505050505050505050505050505050565b6060601c6040516020016130e9919061558f565b604051602081830303815290604052905090565b6001600160a01b03811660009081526009602052604081205460ff161561312657506001610c99565b6001600160a01b0380841660009081526012602090815260408083209386168352929052205460ff165b9392505050565b6003818154811061316757600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b33613198611f40565b6001600160a01b0316146131be5760405162461bcd60e51b8152600401610d4e906157f4565b6001600160a01b0381166132235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d4e565b61322e6000826139b2565b613240600061323b611f40565b613a36565b610d1c81613d63565b600360055460ff16600381111561327057634e487b7160e01b600052602160045260246000fd5b141561328f57604051630ddc900960e11b815260040160405180910390fd5b6005805482919060ff191660018360038111156132bc57634e487b7160e01b600052602160045260246000fd5b021790555060038160038111156132e357634e487b7160e01b600052602160045260246000fd5b14156133415760408051808201909152600880825267119a5b9a5cda195960c21b602090920191825261331891600691614d77565b50604051600080516020615b058339815191529061333890600690615773565b60405180910390a15b6005546040517f115b0a20885b9271082b68a739b15a23986a94c5e2807b824f9ad7dd918f8aeb91611c1d9160ff90911690615738565b60006001600160e01b031982166380ac58cd60e01b14806133a957506001600160e01b03198216635b5e139f60e01b145b80610c995750610c99826141dc565b6000600b5482108015610c995750506000908152600f6020526040902054600160e01b900460ff161590565b600360055460ff16600381111561340b57634e487b7160e01b600052602160045260246000fd5b141561342a57604051630ddc900960e11b815260040160405180910390fd5b805161343d906006906020840190614d77565b506005805460ff19169055604051600080516020615b0583398151915290611c1d90600690615773565b60008281526011602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600260055460ff1660038111156134ea57634e487b7160e01b600052602160045260246000fd5b1461350857604051635402932b60e01b815260040160405180910390fd5b6005805460ff1916600117905560405160008152600080516020615b25833981519152906020015b60405180910390a1565b600061354582613c49565b9050836001600160a01b031681600001516001600160a01b03161461357c5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061359a575061359a85336130fd565b806135b55750336135aa8461102a565b6001600160a01b0316145b9050806135d557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166135fc57604051633a954ecd60e21b815260040160405180910390fd5b61360860008487613467565b6001600160a01b03858116600090815260106020908152604080832080546001600160401b03198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600f90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166136db57600b5482146136db57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020615ae583398151915260405160405180910390a4610f91565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008060006137738585614201565b915091506137808161426e565b509392505050565b61122682826040518060200160405280600081525061446a565b60006137ae8383614602565b905060005b8260ff168160ff1610156122515760006137f86000848460ff16815181106137eb57634e487b7160e01b600052603260045260246000fd5b6020026020010151613ebc565b905060006040518060a00160405280600063ffffffff168152602001858560ff168151811061383757634e487b7160e01b600052603260045260246000fd5b602002602001015160ff1663ffffffff168152602001600063ffffffff1681526020018363ffffffff16815260200160006001600160801b0316815250905080602160008560ff168860ff16600b546138909190615923565b61389a91906158b3565b8152602080820192909252604090810160002083518154938501519285015160608601516080909601516001600160801b03908116600160801b0263ffffffff978816600160601b0263ffffffff60601b19938916600160401b0293909316600160401b600160801b0319968916600160201b026001600160401b0319909816989094169790971795909517939093161791909117919091169190911790555081905061394681615a15565b9150506137b3565b6139588282611fd5565b61122657613970816001600160a01b03166014614909565b61397b836020614909565b60405160200161398c929190615601565b60408051601f198184030181529082905262461bcd60e51b8252610d4e91600401615760565b6139bc8282611fd5565b611226576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556139f23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b613a408282611fd5565b15611226576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000613aa683613c49565b80519091508215613b0c576000336001600160a01b0383161480613acf5750613acf82336130fd565b80613aea575033613adf8661102a565b6001600160a01b0316145b905080613b0a57604051632ce44b5f60e11b815260040160405180910390fd5b505b613b1860008583613467565b6001600160a01b0380821660008181526010602090815260408083208054600160801b6000196001600160401b038084169190910181166001600160401b0319841681178390048216600190810183169093026001600160401b03600160801b03600160c01b0319909416179290921783558b8652600f909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116613c1057600b548214613c1057805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020615ae5833981519152908390a45050600c805460010190555050565b604080516060810182526000808252602082018190529181019190915281600b54811015613d4a576000818152600f6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290613d485780516001600160a01b031615613cdf579392505050565b50600019016000818152600f6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613d43579392505050565b613cdf565b505b604051636f96cda160e11b815260040160405180910390fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613df990339089908890889060040161569e565b602060405180830381600087803b158015613e1357600080fd5b505af1925050508015613e43575060408051601f3d908101601f19168201909252613e409181019061525c565b60015b613e9e573d808015613e71576040519150601f19603f3d011682016040523d82523d6000602084013e613e76565b606091505b508051613e96576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008063ffffffff8416158015613ed657508260ff166001145b15613f1857506023805463ffffffff169081906000613ef4836159f1565b91906101000a81548163ffffffff021916908363ffffffff16021790555050613150565b63ffffffff8416158015613f2f57508260ff166002145b15613f54575060238054600160201b900463ffffffff169081906004613ef4836159f1565b8260ff1660031415613150575060238054600160401b900463ffffffff169081906008613f80836159f1565b91906101000a81548163ffffffff021916908363ffffffff160217905550509392505050565b606081613fca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613ff45780613fde816159d6565b9150613fed9050600a836158f0565b9150613fce565b6000816001600160401b0381111561401c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614046576020820181803683370190505b5090505b8415613eb45761405b600183615923565b9150614068600a86615a35565b6140739060306158b3565b60f81b81838151811061409657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506140b8600a866158f0565b945061404a565b600160055460ff1660038111156140e657634e487b7160e01b600052602160045260246000fd5b1461410457604051638ca755f560e01b815260040160405180910390fd5b6005805460ff1916600217905560405160018152600080516020615b2583398151915290602001613530565b33838360006141a6838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506018546040516001600160601b031960608b901b166020820152909250603401905060405160208183030381529060405280519060200120614aea565b9050806141c657604051638dce817560e01b815260040160405180910390fd5b6141d3338660ff16613788565b50505050505050565b60006001600160e01b0319821663152a902d60e11b1480610c995750610c9982614b00565b6000808251604114156142385760208301516040840151606085015160001a61422c87828585614b35565b94509450505050611442565b8251604014156142625760208301516040840151614257868383614c18565b935093505050611442565b50600090506002611442565b600081600481111561429057634e487b7160e01b600052602160045260246000fd5b14156142995750565b60018160048111156142bb57634e487b7160e01b600052602160045260246000fd5b14156143045760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610d4e565b600281600481111561432657634e487b7160e01b600052602160045260246000fd5b14156143745760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d4e565b600381600481111561439657634e487b7160e01b600052602160045260246000fd5b14156143ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d4e565b600481600481111561441157634e487b7160e01b600052602160045260246000fd5b1415610d1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d4e565b600b546001600160a01b03841661449357604051622e076360e81b815260040160405180910390fd5b826144b15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260106020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b6001600160401b031990941690921783900481168b01811690920217909155858452600f90925290912080546001600160e01b0319168317600160a01b429093169290920291909117905581908185019061454a90613db5565b156145c0575b60405182906001600160a01b03881690600090600080516020615ae5833981519152908290a46145896000878480600101955087613dc4565b6145a6576040516368d2bf6b60e11b815260040160405180910390fd5b8082106145505782600b54146145bb57600080fd5b6145f3565b5b6040516001830192906001600160a01b03881690600090600080516020615ae5833981519152908290a48082106145c1575b50600b55612251600085838684565b606060008260ff166001600160401b0381111561462f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015614658578160200160208202803683370190505b50905060005b8360ff168160ff161015614708578060ff168460ff16600b546146819190615923565b61468b91906158b3565b60408051602081019290925281018690524460608201526080016040516020818303038152906040528051906020012060001c828260ff16815181106146e157634e487b7160e01b600052603260045260246000fd5b63ffffffff909216602092830291909101909101528061470081615a15565b91505061465e565b5060008360ff166001600160401b0381111561473457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561475d578160200160208202803683370190505b50905060005b8460ff168160ff16101561490057600061477d6003614c51565b9050600063ffffffff801682868560ff16815181106147ac57634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff166147c49190615904565b6147ce91906158f0565b905060006147dc6001614c51565b8210156147eb57506000614836565b6147f56002614c51565b82101561480457506001614836565b61480e6003614c51565b82101561481d57506002614836565b6040516352df9fe560e01b815260040160405180910390fd5b6148418160016158cb565b858560ff168151811061486457634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff1681525050601b8160ff168154811061489c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906010918282040191900660020281819054906101000a900461ffff16809291906148cf90615966565b91906101000a81548161ffff021916908361ffff1602179055505050505080806148f890615a15565b915050614763565b50949350505050565b60606000614918836002615904565b6149239060026158b3565b6001600160401b0381111561494857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614972576020820181803683370190505b509050600360fc1b8160008151811061499b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106149d857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006149fc846002615904565b614a079060016158b3565b90505b6001811115614a9b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a4957634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110614a6d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93614a9481615984565b9050614a0a565b5083156131505760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d4e565b600082614af78584614cdc565b14949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c9957506301ffc9a760e01b6001600160e01b0319831614610c99565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115614b625750600090506003614c0f565b8460ff16601b14158015614b7a57508460ff16601c14155b15614b8b5750600090506004614c0f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614bdf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614c0857600060019250925050614c0f565b9150600090505b94509492505050565b6000806001600160ff1b03831681614c3560ff86901c601b6158b3565b9050614c4387828885614b35565b935093505050935093915050565b601b54600090819060ff84161115614c6957601b5492505b60005b8360ff168160ff161015611f3957601b8160ff1681548110614c9e57634e487b7160e01b600052603260045260246000fd5b60009182526020909120601082040154614cc891600f166002026101000a900461ffff16836158b3565b915080614cd481615a15565b915050614c6c565b600081815b8451811015613780576000858281518110614d0c57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311614d325760008381526020829052604090209250614d43565b600081815260208490526040902092505b5080614d4e816159d6565b915050614ce1565b5080546000825560020290600052602060002090810190610d1c9190614dfb565b828054614d839061599b565b90600052602060002090601f016020900481019282614da55760008555614deb565b82601f10614dbe57805160ff1916838001178555614deb565b82800160010185558215614deb579182015b82811115614deb578251825591602001919060010190614dd0565b50614df7929150614e21565b5090565b5b80821115614df75780546001600160a01b031916815560006001820155600201614dfc565b5b80821115614df75760008155600101614e22565b60006001600160401b03831115614e4f57614e4f615a75565b614e62601f8401601f1916602001615860565b9050828152838383011115614e7657600080fd5b828260208301376000602084830101529392505050565b600082601f830112614e9d578081fd5b81356020614eb2614ead83615890565b615860565b80838252828201915082860187848660051b8901011115614ed1578586fd5b855b85811015614eef57813584529284019290840190600101614ed3565b5090979650505050505050565b60008083601f840112614f0d578182fd5b5081356001600160401b03811115614f23578182fd5b60208301915083602082850101111561144257600080fd5b803563ffffffff81168114614f4f57600080fd5b919050565b803560ff81168114614f4f57600080fd5b600060208284031215614f76578081fd5b813561315081615a8b565b600060208284031215614f92578081fd5b815161315081615a8b565b60008060408385031215614faf578081fd5b8235614fba81615a8b565b91506020830135614fca81615a8b565b809150509250929050565b600080600060608486031215614fe9578081fd5b8335614ff481615a8b565b9250602084013561500481615a8b565b929592945050506040919091013590565b6000806000806080858703121561502a578081fd5b843561503581615a8b565b9350602085013561504581615a8b565b92506040850135915060608501356001600160401b03811115615066578182fd5b8501601f81018713615076578182fd5b61508587823560208401614e36565b91505092959194509250565b600080604083850312156150a3578182fd5b82356150ae81615a8b565b91506020830135614fca81615aa0565b600080604083850312156150d0578182fd5b82356150db81615a8b565b946020939093013593505050565b600080604083850312156150fb578182fd5b82356001600160401b0380821115615111578384fd5b818501915085601f830112615124578384fd5b81356020615134614ead83615890565b8083825282820191508286018a848660051b8901011115615153578889fd5b8896505b8487101561517e57803561516a81615a8b565b835260019690960195918301918301615157565b5096505086013592505080821115615194578283fd5b506151a185828601614e8d565b9150509250929050565b6000602082840312156151bc578081fd5b815161315081615aa0565b6000602082840312156151d8578081fd5b5035919050565b600080604083850312156151f1578182fd5b823591506020830135614fca81615a8b565b600080600060608486031215615217578081fd5b83359250602084013561522981615a8b565b915061523760408501614f54565b90509250925092565b600060208284031215615251578081fd5b813561315081615aae565b60006020828403121561526d578081fd5b815161315081615aae565b60008060008060008060808789031215615290578384fd5b86356001600160401b03808211156152a6578586fd5b6152b28a838b01614efc565b90985096506020890135955060408901359150808211156152d1578384fd5b818901915089601f8301126152e4578384fd5b8135818111156152f2578485fd5b8a60208260051b8501011115615306578485fd5b60208301955080945050505061531e60608801614f54565b90509295509295509295565b600080600080600060808688031215615341578283fd5b85356001600160401b03811115615356578384fd5b61536288828901614efc565b9096509450506020860135925061537b60408701614f3b565b915061538960608701614f54565b90509295509295909350565b600080600080606085870312156153aa578182fd5b84356001600160401b038111156153bf578283fd5b6153cb87828801614efc565b909550935050602085013591506153e460408601614f54565b905092959194509250565b600060208284031215615400578081fd5b81356001600160401b03811115615415578182fd5b8201601f81018413615425578182fd5b613eb484823560208401614e36565b600060208284031215615445578081fd5b5051919050565b6000806040838503121561545e578182fd5b50508035926020909101359150565b60006020828403121561547e578081fd5b61315082614f3b565b6000815180845261549f81602086016020860161593a565b601f01601f19169290920160200192915050565b600081546154c08161599b565b600182811680156154d857600181146154e957615518565b60ff19841687528287019450615518565b8560005260208060002060005b8581101561550f5781548a8201529084019082016154f6565b50505082870194505b5050505092915050565b606086901b6001600160601b03191681526014810185905260006001600160fb1b0384111561554f578081fd5b8360051b8086603485013760f89390931b6001600160f81b0319166034929093019182019290925260350195945050505050565b600061315082846154b3565b600061559b82846154b3565b6c31b7b73a3930b1ba173539b7b760991b8152600d019392505050565b60006155c482856154b3565b65746f6b656e2f60d01b815283516155e381600684016020880161593a565b64173539b7b760d91b60069290910191820152600b01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161563381601785016020880161593a565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161566481602884016020880161593a565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906156d190830184615487565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561572c57835183529284019291840191600101615710565b50909695505050505050565b602081016004831061575a57634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260006131506020830184615487565b600060208083528184546157868161599b565b808487015260406001808416600081146157a757600181146157bb576157e6565b60ff198516898401526060890195506157e6565b898852868820885b858110156157de5781548b82018601529083019088016157c3565b8a0184019650505b509398975050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f191681016001600160401b038111828210171561588857615888615a75565b604052919050565b60006001600160401b038211156158a9576158a9615a75565b5060051b60200190565b600082198211156158c6576158c6615a49565b500190565b600060ff821660ff84168060ff038211156158e8576158e8615a49565b019392505050565b6000826158ff576158ff615a5f565b500490565b600081600019048311821515161561591e5761591e615a49565b500290565b60008282101561593557615935615a49565b500390565b60005b8381101561595557818101518382015260200161593d565b838111156122515750506000910152565b600061ffff82168061597a5761597a615a49565b6000190192915050565b60008161599357615993615a49565b506000190190565b600181811c908216806159af57607f821691505b602082108114156159d057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156159ea576159ea615a49565b5060010190565b600063ffffffff80831681811415615a0b57615a0b615a49565b6001019392505050565b600060ff821660ff811415615a2c57615a2c615a49565b60010192915050565b600082615a4457615a44615a5f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610d1c57600080fd5b8015158114610d1c57600080fd5b6001600160e01b031981168114610d1c57600080fdfe71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef73c24a7893680131e7c50fcccddb220f15bfc9f6968bef4235b6cc5994049124ff4a5dbbab6b1963d10f5edd139f33a7987ecb3c4f65969be77ddba28d946594a2646970667358221220e604772d4c9c3fb23c74bf0e4dc623dc3759c1953d84bec55970d7fa54492a9364736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb00000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d0000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de0000000000000000000000000779421ffe3c1a0a45f03fb246757f7575ce133ef00000000000000000000000068df6bc1df2bdfa09bb49528718106e547efe39a0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad794600000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : signer_ (address): 0xd497c27C285E9D32cA316E8D9B4CCd735dEe4C15
Arg [1] : admin_ (address): 0x859010BaAD3E7f51A5EF1e43550056ea29542Fb0
Arg [2] : royaltyReceiver_ (address): 0x9C4a411Ba341Df1EE71f67B773605406B77E775D
Arg [3] : jfgContract_ (address): 0x7E6Bc952d4b4bD814853301bEe48E99891424de0
Arg [4] : jfmcContract_ (address): 0x779421FfE3c1A0a45f03FB246757F7575Ce133eF
Arg [5] : jfcContract_ (address): 0x68Df6Bc1df2BdfA09Bb49528718106E547Efe39a
Arg [6] : jungleContract_ (address): 0x4D648C35212273d638a5e602aB1177bB75aD7946
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15
Arg [1] : 000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb0
Arg [2] : 0000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d
Arg [3] : 0000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de0
Arg [4] : 000000000000000000000000779421ffe3c1a0a45f03fb246757f7575ce133ef
Arg [5] : 00000000000000000000000068df6bc1df2bdfa09bb49528718106e547efe39a
Arg [6] : 0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad7946
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.