Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
6,301 FCR
Holders
1,299
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
FalloutCrystal
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/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@massless.io/smart-contract-library/contracts/royalty/Royalty.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 "./interfaces/IJungle.sol"; import "./PackTokenIds.sol"; error NotModeratorOrOwner(); error MustMintMinimumOne(); error SoldOut(); error TransactionMintLimit(uint256 limit); error IncorrectValueJungle(); error IncorrectEthValue(); error NotYourToken(); error NotHoldingAnyTokens(); error UsedToken(uint256 jfgId); error DeployerIsAdmin(); error NoTrailingSlash(); contract FalloutCrystal is AdminPermissionable, WithdrawalSplittable, PreAuthorisable, PackTokenIds, ERC1155Supply, ERC1155Burnable, Royalty, Signature, SaleState { string private _name; string private _symbol; // Constants mapping(uint256 => uint256) public MAX_SUPPLY; uint256 public constant MAX_BATCH_MINT = 5; address[] private BENEFICIARY_WALLETS = [ address(0x8e5F332a0662C8c06BDD1Eed105Ba1C4800d4c2f), address(0x954BfE5137c8D2816cE018EFd406757f9a060e5f), address(0x2E7D93e2AdFC4a36E2B3a3e23dE7c35212471CfB), address(0xd196e0aFacA3679C27FC05ba8C9D3ABBCD353b5D) ]; uint256[] private BENEFICIARIES_PRIMARY = [5500, 2000, 500, 2000]; // Staking IJungle private _jungleContract; // Jungle Freaks Genesis IERC721 private _jfgContract; // Jungle Bank address public constant JUNGLE_BANK = 0x8e5F332a0662C8c06BDD1Eed105Ba1C4800d4c2f; // Events event Phase1MintBegins(); event Phase2MintBegins(); event MintEnds(); event URIUpdated(string uri_); constructor( address signer_, address admin_, address royaltyReceiver_, IJungle jungleContract_, IERC721 jfgContract_, address[] memory _preAuthorized ) ERC1155( "https://massless-ipfs-public-gateway.mypinata.cloud/ipfs/QmZiZUjvFBKXU3hJ1iJ9bwPQcNNMBBrFQUv7FZybYgqLcD/" ) Signature(signer_) PreAuthorisable(_preAuthorized) { if (_msgSender() == admin_) revert DeployerIsAdmin(); _name = "Fallout Crystal"; _symbol = "FCR"; MAX_SUPPLY[1] = 7000; MAX_SUPPLY[2] = 2992; MAX_SUPPLY[3] = 8; _jungleContract = jungleContract_; _jfgContract = jfgContract_; setRoyaltyReceiver(royaltyReceiver_); setRoyaltyBasisPoints(500); setBeneficiaries(BENEFICIARY_WALLETS, BENEFICIARIES_PRIMARY); _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(DEFAULT_ADMIN_ROLE, admin_); } modifier maxSupplyLimit(uint256 quantity_) { (, , uint256 supplyLimit) = _sumMintablesUntilLevels(); if (quantity_ == 0) revert MustMintMinimumOne(); if (quantity_ > supplyLimit) revert SoldOut(); _; } // Phase 1 Mint function phase1Mint( bytes calldata signature_, bytes32 salt_, uint256 jungle_, uint256[] calldata jfgIds_ ) external payable whenSaleIsActive("Phase1Mint") maxSupplyLimit(jfgIds_.length) onlySignedTx( keccak256(abi.encodePacked(_msgSender(), salt_, jungle_, jfgIds_)), signature_ ) { // Only owner of Jungle Freaks Genesis token can mint for (uint256 i = 0; i < jfgIds_.length; i++) { address staker = _jungleContract.getStaker(jfgIds_[i]); address owner = _jfgContract.ownerOf(jfgIds_[i]); if (staker != _msgSender() && owner != _msgSender()) revert NotYourToken(); bool isUsedToken = usedTokenId(jfgIds_[i]); if (isUsedToken) revert UsedToken(jfgIds_[i]); } _setUsedTokenIds(jfgIds_); _processMint(salt_, jungle_, jfgIds_.length); } // Phase 2 Mint function phase2Mint( bytes calldata signature_, bytes32 salt_, uint256 jungle_, uint256 quantity_ ) external payable whenSaleIsActive("Phase2Mint") maxSupplyLimit(quantity_) onlySignedTx( keccak256( abi.encodePacked(_msgSender(), salt_, jungle_, quantity_) ), signature_ ) { if (quantity_ > MAX_BATCH_MINT) revert TransactionMintLimit(MAX_BATCH_MINT); if ( _jfgContract.balanceOf(_msgSender()) == 0 && _jungleContract.getStakedAmount(_msgSender()) == 0 ) revert NotHoldingAnyTokens(); _processMint(salt_, jungle_, quantity_); } function startPhase1Mint() external onlyAdminOrModerator { _setSaleType("Phase1Mint"); _setSaleState(State.ACTIVE); emit Phase1MintBegins(); } function startPhase2Mint() external onlyAdminOrModerator { _setSaleType("Phase2Mint"); _setSaleState(State.ACTIVE); emit Phase2MintBegins(); } function unpauseMint() external onlyAdminOrModerator { _unpause(); } function pauseMint() external onlyAdminOrModerator { _pause(); } function endMint() external onlyAdmin { if (getSaleState() != State.ACTIVE) revert NoActiveSale(); _setSaleState(State.FINISHED); _retainSpecialTokens(); emit MintEnds(); } function _retainSpecialTokens() private { uint256 mintsLevel2 = MAX_SUPPLY[2] > totalSupply(2) ? MAX_SUPPLY[2] - totalSupply(2) : 0; uint256 mintsLevel3 = MAX_SUPPLY[3] > totalSupply(3) ? MAX_SUPPLY[3] - totalSupply(3) : 0; if (mintsLevel2 > 0) _mint(JUNGLE_BANK, 2, mintsLevel2, ""); if (mintsLevel3 > 0) _mint(JUNGLE_BANK, 3, mintsLevel3, ""); } function _processMint( bytes32 randomness_, uint256 jungle_, uint256 quantity_ ) internal { // Get the eth price when subsidised with jungle // Reverts when not a valid quantity of $JUNGLE uint256 ethPrice = holdersEthPrice(jungle_, quantity_); if (msg.value != ethPrice) revert IncorrectEthValue(); if (jungle_ > 0) { _jungleContract.transferFrom(_msgSender(), JUNGLE_BANK, jungle_); } ( uint256 mintsLevel1, uint256 mintsLevel2, uint256 mintsLevel3 ) = _decideMintsPerLevel(randomness_, quantity_); if (mintsLevel1 > 0) _mint(_msgSender(), 1, mintsLevel1, ""); if (mintsLevel2 > 0) _mint(_msgSender(), 2, mintsLevel2, ""); if (mintsLevel3 > 0) _mint(_msgSender(), 3, mintsLevel3, ""); } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155Supply, ERC1155) { ERC1155Supply._beforeTokenTransfer( operator, from, to, ids, amounts, data ); } // Utilities function _sumMintablesUntilLevels() private view returns ( uint256, uint256, uint256 ) { uint256 totalMintablesBy1 = MAX_SUPPLY[1] > totalSupply(1) ? MAX_SUPPLY[1] - totalSupply(1) : 0; uint256 totalMintablesBy2 = MAX_SUPPLY[2] > totalSupply(2) ? MAX_SUPPLY[2] - totalSupply(2) + totalMintablesBy1 : totalMintablesBy1; uint256 totalMintablesBy3 = MAX_SUPPLY[3] > totalSupply(3) ? MAX_SUPPLY[3] - totalSupply(3) + totalMintablesBy2 : totalMintablesBy2; return (totalMintablesBy1, totalMintablesBy2, totalMintablesBy3); } function _decideMintsPerLevel(bytes32 randomness_, uint256 quantity_) private view returns ( uint256, uint256, uint256 ) { uint32[] memory randomNumbers = new uint32[](quantity_); for (uint8 i; i < quantity_; i++) { randomNumbers[i] = uint32( uint256( keccak256( abi.encodePacked( quantity_ + i, randomness_, block.difficulty ) ) ) ); } uint256 mintsLevel1 = 0; uint256 mintsLevel2 = 0; uint256 mintsLevel3 = 0; ( uint256 totalMintablesBy1, uint256 totalMintablesBy2, uint256 totalMintablesBy3 ) = _sumMintablesUntilLevels(); for (uint256 i = 0; i < quantity_; i++) { uint256 totalMintables = totalMintablesBy3 - (mintsLevel1 + mintsLevel2 + mintsLevel3); uint256 selectedNum = (randomNumbers[i] * totalMintables) / type(uint32).max; if (selectedNum < totalMintablesBy1 - mintsLevel1) { mintsLevel1++; } else if ( selectedNum < totalMintablesBy2 - (mintsLevel1 + mintsLevel2) ) { mintsLevel2++; } else if ( selectedNum < totalMintablesBy3 - (mintsLevel1 + mintsLevel2 + mintsLevel3) ) { mintsLevel3++; } } return (mintsLevel1, mintsLevel2, mintsLevel3); } function holdersEthPrice(uint256 j_, uint256 q_) public pure returns (uint256) { if (j_ == 0 ether) return 0.13 ether * q_; if (j_ == 150 ether * q_) return 0.065 ether * q_; if (j_ == 300 ether * q_) return 0 ether; revert IncorrectValueJungle(); } function setURI(string memory uri_) public onlyAdminOrModerator { if (bytes(uri_)[bytes(uri_).length - 1] != bytes1("/")) revert NoTrailingSlash(); _setURI(uri_); emit URIUpdated(uri_); } function uri(uint256 tokenId_) public view override returns (string memory) { return string(abi.encodePacked(ERC1155.uri(tokenId_), "token/{id}.json")); } function contractURI() public view returns (string memory) { return string(abi.encodePacked(ERC1155.uri(0), "contract.json")); } // Administration function setSignerAddress(address signerAddress_) public onlyAdminOrModerator { _setSignerAddress(signerAddress_); } function setRoyaltyReceiver(address royaltyReceiver_) public onlyAdmin { _setRoyaltyReceiver(royaltyReceiver_); } function setRoyaltyBasisPoints(uint32 royaltyBasisPoints_) public onlyAdmin { _setRoyaltyBasisPoints(royaltyBasisPoints_); } function setAuthorizedAddress(address authorizedAddress_, bool authorized_) public onlyAdmin { _setAuthorizedAddress(authorizedAddress_, authorized_); } function transferOwnership(address newOwner) public virtual 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); } // Compulsory overrides function supportsInterface(bytes4 interfaceId) public view override(ERC1155, Royalty, AccessControl) returns (bool) { return interfaceId == type(IAccessControl).interfaceId || interfaceId == type(IERC2981).interfaceId || interfaceId == type(IContractURI).interfaceId || interfaceId == type(IERC1155).interfaceId || super.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); } function name() public view virtual returns (string memory) { return _name; } function symbol() public view virtual returns (string memory) { return _symbol; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// 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 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/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; 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 pragma solidity ^0.8.4; abstract contract PackTokenIds { mapping(uint256 => uint256) private _DataStore; function usedTokenId(uint256 tokenId) public view returns (bool used) { (uint256 boolRow, uint256 boolColumn) = _tokenPosition(tokenId); uint256 packedBools = _DataStore[boolRow]; used = (packedBools & (uint256(1) << boolColumn)) > 0 ? true : false; } function _tokenPosition(uint256 tokenId) internal pure returns (uint256 boolRow, uint256 boolColumn) { boolRow = (tokenId << 1) / 256; boolColumn = (tokenId << 1) % 256; } // Utilities function _packBool( uint256 _packedBools, uint256 _boolIndex, bool _value ) internal pure returns (uint256) { return _value ? _packedBools | (uint256(1) << _boolIndex) : _packedBools & ~(uint256(1) << _boolIndex); } function _setUsedTokenIds(uint256[] calldata tokenIds) internal { uint256 cRow; uint256 cPackedBools = _DataStore[0]; for (uint256 i; i < tokenIds.length; i++) { (uint256 boolRow, uint256 boolColumn) = _tokenPosition(tokenIds[i]); if (boolRow != cRow) { _DataStore[cRow] = cPackedBools; cRow = boolRow; cPackedBools = _DataStore[boolRow]; } cPackedBools = _packBool(cPackedBools, boolColumn, true); if (i + 1 == tokenIds.length) { _DataStore[cRow] = cPackedBools; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// 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 (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 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 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/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 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 // 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 IJungle","name":"jungleContract_","type":"address"},{"internalType":"contract IERC721","name":"jfgContract_","type":"address"},{"internalType":"address[]","name":"_preAuthorized","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllSalesFinished","type":"error"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"DeployerIsAdmin","type":"error"},{"inputs":[],"name":"HashUsed","type":"error"},{"inputs":[],"name":"IncorrectEthValue","type":"error"},{"inputs":[],"name":"IncorrectSaleType","type":"error"},{"inputs":[],"name":"IncorrectValueJungle","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":"NotHoldingAnyTokens","type":"error"},{"inputs":[],"name":"NotYourToken","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":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"TransactionMintLimit","type":"error"},{"inputs":[{"internalType":"uint256","name":"jfgId","type":"uint256"}],"name":"UsedToken","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":"ZeroWithdrawalAddress","type":"error"},{"inputs":[],"name":"ZeroWithdrawalBasisPoints","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"Phase1MintBegins","type":"event"},{"anonymous":false,"inputs":[],"name":"Phase2MintBegins","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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_saleType","type":"string"}],"name":"TypeOfSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri_","type":"string"}],"name":"URIUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"JUNGLE_BANK","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BATCH_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"MAX_SUPPLY","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":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":[],"name":"endMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"j_","type":"uint256"},{"internalType":"uint256","name":"q_","type":"uint256"}],"name":"holdersEthPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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":"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":[],"name":"pauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"bytes32","name":"salt_","type":"bytes32"},{"internalType":"uint256","name":"jungle_","type":"uint256"},{"internalType":"uint256[]","name":"jfgIds_","type":"uint256[]"}],"name":"phase1Mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"bytes32","name":"salt_","type":"bytes32"},{"internalType":"uint256","name":"jungle_","type":"uint256"},{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"phase2Mint","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":[{"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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"address[]","name":"_wallets","type":"address[]"},{"internalType":"uint256[]","name":"_basisPoints","type":"uint256[]"}],"name":"setBeneficiaries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"royaltyBasisPoints_","type":"uint32"}],"name":"setRoyaltyBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signerAddress_","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startPhase1Mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPhase2Mint","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":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"usedTokenId","outputs":[{"internalType":"bool","name":"used","type":"bool"}],"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
60006080908152610100604052600460c0818152634e6f6e6560e01b60e090815260a091909152600d805460ff19168155916200003f91600e91620008ff565b505060408051608081018252738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f815273954bfe5137c8d2816ce018efd406757f9a060e5f6020820152732e7d93e2adfc4a36e2b3a3e23de7c35212471cfb9181019190915273d196e0afaca3679c27fc05ba8c9d3abbcd353b5d6060820152620000c3915060129060046200098e565b506040805160808101825261157c81526107d0602082018190526101f4928201929092526060810191909152620000ff906013906004620009e6565b503480156200010d57600080fd5b506040516200634638038062006346833981016040819052620001309162000a9e565b856040518060a0016040528060688152602001620062de606891398262000157336200041c565b600160025560005b8151811015620001b957620001a48282815181106200018e57634e487b7160e01b600052603260045260246000fd5b602002602001015160016200046e60201b60201c565b80620001b08162000c1d565b9150506200015f565b50620001c790508162000499565b50600b80546001600160a01b0319166001600160a01b039283161790558516620001ee3390565b6001600160a01b03161415620002175760405163bb0f48d760e01b815260040160405180910390fd5b60408051808201909152600f8082526e11985b1b1bdd5d0810dc9e5cdd185b608a1b60209092019182526200024d9181620008ff565b50604080518082019091526003808252622321a960e91b60209092019182526200027a91601091620008ff565b506011602052611b587f17bc176d2408558f6e4111feebc3cab4e16b63e967be91cde721f4c8a488b55255610bb07f08037d7b151cc412d25674a4e66b334d9ae9d2e5517a7feaae5cdb828bf1c62855600360005260087f9bfbaa59f8e10e7868f8b402de9d605a390c45ddaebd8c9de3c6f31e733c87ff55601480546001600160a01b038086166001600160a01b03199283161790925560158054928516929091169190911790556200032e84620004b2565b6200033b6101f46200051c565b620003f660128054806020026020016040519081016040528092919081815260200182805480156200039757602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000378575b50505050506013805480602002602001604051908101604052809291908181526020018280548015620003ea57602002820191906000526020600020905b815481526020019060010190808311620003d5575b50506200058492505050565b620004036000336200083f565b620004106000866200083f565b50505050505062000c71565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b8051620004ae906008906020840190620008ff565b5050565b33620004bd620008c7565b6001600160a01b03161480620004db5750620004db600033620008d6565b620004f957604051637bb62a2160e01b815260040160405180910390fd5b600a80546001600160a01b0383166001600160a01b031990911617905550565b50565b3362000527620008c7565b6001600160a01b0316148062000545575062000545600033620008d6565b6200056357604051637bb62a2160e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b336200058f620008c7565b6001600160a01b031614620005ea5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b818180518251146200060f5760405163512509d360e11b815260040160405180910390fd5b81516200062f5760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015620006f95760006001600160a01b03168382815181106200066857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156200069957604051631e2add6160e21b815260040160405180910390fd5b818181518110620006ba57634e487b7160e01b600052603260045260246000fd5b602002602001015160001415620006e45760405163572d773160e11b815260040160405180910390fd5b80620006f08162000c1d565b91505062000632565b50620007086003600062000a2a565b60005b8451811015620008385760006001600160a01b03168582815181106200074157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415620007725760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110620007a057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110620007d757634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b03909216919091178155910151910155806200082f8162000c1d565b9150506200070b565b5050505050565b6200084b8282620008d6565b620004ae576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620008833390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001546001600160a01b031690565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b8280546200090d9062000be0565b90600052602060002090601f0160209004810192826200093157600085556200097c565b82601f106200094c57805160ff19168380011785556200097c565b828001600101855582156200097c579182015b828111156200097c5782518255916020019190600101906200095f565b506200098a92915062000a4d565b5090565b8280548282559060005260206000209081019282156200097c579160200282015b828111156200097c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620009af565b8280548282559060005260206000209081019282156200097c579160200282015b828111156200097c578251829061ffff1690559160200191906001019062000a07565b508054600082556002029060005260206000209081019062000519919062000a64565b5b808211156200098a576000815560010162000a4e565b5b808211156200098a5780546001600160a01b03191681556000600182015560020162000a65565b805162000a998162000c5b565b919050565b60008060008060008060c0878903121562000ab7578182fd5b865162000ac48162000c5b565b8096505060208088015162000ad98162000c5b565b604089015190965062000aec8162000c5b565b606089015190955062000aff8162000c5b565b608089015190945062000b128162000c5b565b60a08901519093506001600160401b038082111562000b2f578384fd5b818a0191508a601f83011262000b43578384fd5b81518181111562000b585762000b5862000c45565b8060051b604051601f19603f8301168101818110858211171562000b805762000b8062000c45565b604052828152858101935084860182860187018f101562000b9f578788fd5b8795505b8386101562000bcc5762000bb78162000a8c565b85526001959095019493860193860162000ba3565b508096505050505050509295509295509295565b600181811c9082168062000bf557607f821691505b6020821081141562000c1757634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000c3e57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200051957600080fd5b61565d8062000c816000396000f3fe6080604052600436106102735760003560e01c8062fdd58e1461027f578063017043a5146102b257806301ffc9a7146102c957806302fe5305146102f9578063046dc16614610319578063065dc4c11461033957806306fdde03146103595780630e89341c1461037b5780631351cf511461039b5780631a8bd2da146103bb5780631cf015c6146103d0578063248a9ca3146103f057806325bdb2a81461041057806327125748146104305780632a55205a1461045d5780632eb2c2d61461048b5780632f2ff15d146104ab57806336568abe146104cb57806340288073146104eb578063404a1f37146104fe57806342260b5d1461051e578063450afb2d146105575780634a86c40b1461056c5780634e1273f4146105815780634f558e79146105ae5780635b7633d0146105ce5780635c6fd90b146105f557806369d9dd4f146106155780636b20c45414610635578063715018a614610655578063797669c91461066a5780637ed49b181461068c5780638295c0a9146106ac5780638d623781146106bf5780638da5cb5b146106df5780638dc251e3146106f457806391d148541461071457806395d89b41146107345780639fbc871314610749578063a0ef91df14610769578063a217fddf1461077e578063a22cb46514610793578063a81152f7146107b3578063b48a373d146107c8578063bd85b039146107f0578063c7e42b1b14610810578063cd85cdb514610830578063d1e812a314610845578063d547741f1461085a578063e8a3d4851461087a578063e985e9c51461088f578063efeb5e58146108af578063f242432a146108cf578063f2fde38b146108ef578063f5298aca1461090f57600080fd5b3661027a57005b600080fd5b34801561028b57600080fd5b5061029f61029a3660046148f7565b61092f565b6040519081526020015b60405180910390f35b3480156102be57600080fd5b506102c76109cb565b005b3480156102d557600080fd5b506102e96102e4366004614a7a565b610a8e565b60405190151581526020016102a9565b34801561030557600080fd5b506102c7610314366004614bb4565b610b04565b34801561032557600080fd5b506102c76103343660046146d9565b610c07565b34801561034557600080fd5b506102c7610354366004614956565b610c87565b34801561036557600080fd5b5061036e610ef7565b6040516102a99190614f9a565b34801561038757600080fd5b5061036e610396366004614a3e565b610f89565b3480156103a757600080fd5b506102c76103b63660046148ca565b610fba565b3480156103c757600080fd5b506102c7611027565b3480156103dc57600080fd5b506102c76103eb366004614c32565b611090565b3480156103fc57600080fd5b5061029f61040b366004614a3e565b6110f2565b34801561041c57600080fd5b50600d5460ff166040516102a99190614f72565b34801561043c57600080fd5b5061029f61044b366004614a3e565b60116020526000908152604090205481565b34801561046957600080fd5b5061047d610478366004614c11565b611107565b6040516102a9929190614f21565b34801561049757600080fd5b506102c76104a6366004614749565b61114f565b3480156104b757600080fd5b506102c76104c6366004614a56565b6111df565b3480156104d757600080fd5b506102c76104e6366004614a56565b611201565b6102c76104f9366004614b5d565b61127b565b34801561050a57600080fd5b506102c76105193660046146d9565b6115f0565b34801561052a57600080fd5b50600a5461054290600160a01b900463ffffffff1681565b60405163ffffffff90911681526020016102a9565b34801561056357600080fd5b506102c7611664565b34801561057857600080fd5b506102c7611723565b34801561058d57600080fd5b506105a161059c366004614956565b6117e2565b6040516102a99190614f3a565b3480156105ba57600080fd5b506102e96105c9366004614a3e565b611943565b3480156105da57600080fd5b50600b546001600160a01b03165b6040516102a99190614e50565b34801561060157600080fd5b506102c76106103660046146d9565b611956565b34801561062157600080fd5b506102e9610630366004614a3e565b6119ca565b34801561064157600080fd5b506102c7610650366004614858565b611a09565b34801561066157600080fd5b506102c7611a4c565b34801561067657600080fd5b5061029f6000805160206155a883398151915281565b34801561069857600080fd5b5061029f6106a7366004614c11565b611a85565b6102c76106ba366004614ab2565b611b0b565b3480156106cb57600080fd5b506105a16106da366004614a3e565b611f57565b3480156106eb57600080fd5b506105e8612053565b34801561070057600080fd5b506102c761070f3660046146d9565b612062565b34801561072057600080fd5b506102e961072f366004614a56565b6120c1565b34801561074057600080fd5b5061036e6120ea565b34801561075557600080fd5b50600a546105e8906001600160a01b031681565b34801561077557600080fd5b506102c76120f9565b34801561078a57600080fd5b5061029f600081565b34801561079f57600080fd5b506102c76107ae3660046148ca565b61225c565b3480156107bf57600080fd5b5061029f600581565b3480156107d457600080fd5b506105e8738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f81565b3480156107fc57600080fd5b5061029f61080b366004614a3e565b612267565b34801561081c57600080fd5b506102c761082b3660046146d9565b612279565b34801561083c57600080fd5b506102c7612481565b34801561085157600080fd5b5061036e6124e8565b34801561086657600080fd5b506102c7610875366004614a56565b6124fa565b34801561088657600080fd5b5061036e612517565b34801561089b57600080fd5b506102e96108aa366004614711565b612547565b3480156108bb57600080fd5b5061047d6108ca366004614a3e565b6125a1565b3480156108db57600080fd5b506102c76108ea3660046147f2565b6125d9565b3480156108fb57600080fd5b506102c761090a3660046146d9565b61261e565b34801561091b57600080fd5b506102c761092a366004614922565b6126d8565b60006001600160a01b0383166109a05760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526006602090815260408083206001600160a01b03861684529091529020545b92915050565b336109d4612053565b6001600160a01b031614806109ef57506109ef6000336120c1565b610a0c57604051637bb62a2160e01b815260040160405180910390fd5b6001600d5460ff166003811115610a3357634e487b7160e01b600052602160045260246000fd5b14610a5157604051638ca755f560e01b815260040160405180910390fd5b610a5b600361271b565b610a6361284a565b6040517faf24d3bccd7e329975f60c4d13b81252ff061649fb46d1c416c9b6a13100bff190600090a1565b60006001600160e01b03198216637965db0b60e01b1480610abf57506001600160e01b0319821663152a902d60e11b145b80610ada57506001600160e01b0319821663e8a3d48560e01b145b80610af557506001600160e01b03198216636cdb3d1360e11b145b806109c557506109c58261297a565b33610b0d612053565b6001600160a01b03161480610b285750610b286000336120c1565b80610b465750610b466000805160206155a8833981519152336120c1565b610b635760405163c5cca88d60e01b815260040160405180910390fd5b8051602f60f81b908290610b79906001906152f7565b81518110610b9757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191614610bc45760405163a467f6f560e01b815260040160405180910390fd5b610bcd8161299f565b7fe3afa94108b5f5e82e5f6e539d161ff4b5402a85f696c67b9768ec3ae54ce36681604051610bfc9190614f9a565b60405180910390a150565b33610c10612053565b6001600160a01b03161480610c2b5750610c2b6000336120c1565b80610c495750610c496000805160206155a8833981519152336120c1565b610c665760405163c5cca88d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b03831617905550565b50565b33610c90612053565b6001600160a01b031614610cb65760405162461bcd60e51b8152600401610997906151d5565b81818051825114610cda5760405163512509d360e11b815260040160405180910390fd5b8151610cf95760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015610dbb5760006001600160a01b0316838281518110610d3057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610d6057604051631e2add6160e21b815260040160405180910390fd5b818181518110610d8057634e487b7160e01b600052603260045260246000fd5b602002602001015160001415610da95760405163572d773160e11b815260040160405180910390fd5b80610db3816153bc565b915050610cfc565b50610dc8600360006144ca565b60005b8451811015610ef05760006001600160a01b0316858281518110610dff57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610e2f5760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110610e5c57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110610e9257634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015580610ee8816153bc565b915050610dcb565b5050505050565b6060600f8054610f0690615355565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3290615355565b8015610f7f5780601f10610f5457610100808354040283529160200191610f7f565b820191906000526020600020905b815481529060010190602001808311610f6257829003601f168201915b5050505050905090565b6060610f94826129b2565b604051602001610fa49190614dae565b6040516020818303038152906040529050919050565b33610fc3612053565b6001600160a01b03161480610fde5750610fde6000336120c1565b610ffb57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600460205260409020805460ff19168215151790555050565b5050565b33611030612053565b6001600160a01b0316148061104b575061104b6000336120c1565b8061106957506110696000805160206155a8833981519152336120c1565b6110865760405163c5cca88d60e01b815260040160405180910390fd5b61108e612a46565b565b33611099612053565b6001600160a01b031614806110b457506110b46000336120c1565b6110d157604051637bb62a2160e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b60009081526020819052604090206001015490565b600a54600090819081906127109061112c90600160a01b900463ffffffff16866152d8565b61113691906152c4565b600a546001600160a01b031693509150505b9250929050565b6001600160a01b03851633148061116b575061116b8533612547565b6111d25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610997565b610ef08585858585612abd565b6111e8826110f2565b6111f28133612c74565b6111fc8383612cd8565b505050565b6001600160a01b03811633146112715760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610997565b6110238282612d5c565b60408051808201909152600a815269141a185cd94c935a5b9d60b21b60208201526001600d5460ff1660038111156112c357634e487b7160e01b600052602160045260246000fd5b146112e157604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516112f790600e90614d0e565b60405180910390201461131d57604051630a761c7560e31b815260040160405180910390fd5b816000611328612dc1565b925050508161134a57604051633f44c9b160e11b815260040160405180910390fd5b8082111561136b576040516352df9fe560e01b815260040160405180910390fd5b3360405160609190911b6001600160601b031916602082015260348101879052605481018690526074810185905260940160408051601f1981840301815291815281516020928301206000818152600c9093529120548990899060ff16156113e65760405163180567a360e31b815260040160405180910390fd5b600061143383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061142d9250889150612f0a9050565b90612f5c565b600b549091506001600160a01b0380831691161461147557600b546040516372ee54c960e01b81526109979183916001600160a01b0390911690600401614e64565b6000848152600c60205260409020805460ff1916600117905560058811156114b35760405163792639f960e11b815260056004820152602401610997565b6015546001600160a01b03166370a08231336040518263ffffffff1660e01b81526004016114e19190614e50565b60206040518083038186803b1580156114f957600080fd5b505afa15801561150d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115319190614bf9565b1580156115b957506014546001600160a01b0316634da6a556336040518263ffffffff1660e01b81526004016115679190614e50565b60206040518083038186803b15801561157f57600080fd5b505afa158015611593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b79190614bf9565b155b156115d757604051631cbee31f60e21b815260040160405180910390fd5b6115e28a8a8a612f78565b505050505050505050505050565b336115f9612053565b6001600160a01b0316148061161457506116146000336120c1565b61163157604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b03811661165957604051633ef39b8160e01b815260040160405180910390fd5b611023600083612d5c565b3361166d612053565b6001600160a01b0316148061168857506116886000336120c1565b806116a657506116a66000805160206155a8833981519152336120c1565b6116c35760405163c5cca88d60e01b815260040160405180910390fd5b6116ee6040518060400160405280600a815260200169141a185cd94c935a5b9d60b21b8152506130df565b6116f8600161271b565b6040517f23adac25386318036c42b20b159b8b8825154a1cf03e7f6f08a525adb99ed07890600090a1565b3361172c612053565b6001600160a01b0316148061174757506117476000336120c1565b8061176557506117656000805160206155a8833981519152336120c1565b6117825760405163c5cca88d60e01b815260040160405180910390fd5b6117ad6040518060400160405280600a815260200169141a185cd94c535a5b9d60b21b8152506130df565b6117b7600161271b565b6040517f51c4ff149519310d67c9c034afbabdc89ac52886d921366bfe89e62f28779a5b90600090a1565b606081518351146118475760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610997565b600083516001600160401b0381111561187057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611899578160200160208202803683370190505b50905060005b845181101561193b576119008582815181106118cb57634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106118f357634e487b7160e01b600052603260045260246000fd5b602002602001015161092f565b82828151811061192057634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611934816153bc565b905061189f565b509392505050565b60008061194f83612267565b1192915050565b3361195f612053565b6001600160a01b0316148061197a575061197a6000336120c1565b61199757604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b0381166119bf57604051633ef39b8160e01b815260040160405180910390fd5b611023600083612cd8565b60008060006119d884613162565b60008281526005602052604090205491935091506001821b81166119fd576000611a00565b60015b95945050505050565b6001600160a01b038316331480611a255750611a258333612547565b611a415760405162461bcd60e51b8152600401610997906150ba565b6111fc83838361318e565b33611a55612053565b6001600160a01b031614611a7b5760405162461bcd60e51b8152600401610997906151d5565b61108e6000613329565b600082611aa557611a9e826701cdda4faccd00006152d8565b90506109c5565b611ab882680821ab0d44149800006152d8565b831415611ad057611a9e8266e6ed27d66680006152d8565b611ae382681043561a88293000006152d8565b831415611af2575060006109c5565b604051631fdf5ecb60e01b815260040160405180910390fd5b60408051808201909152600a815269141a185cd94c535a5b9d60b21b60208201526001600d5460ff166003811115611b5357634e487b7160e01b600052602160045260246000fd5b14611b7157604051638ca755f560e01b815260040160405180910390fd5b80516020820120604051611b8790600e90614d0e565b604051809103902014611bad57604051630a761c7560e31b815260040160405180910390fd5b816000611bb8612dc1565b9250505081611bda57604051633f44c9b160e11b815260040160405180910390fd5b80821115611bfb576040516352df9fe560e01b815260040160405180910390fd5b3387878787604051602001611c14959493929190614cbc565b60408051601f1981840301815291815281516020928301206000818152600c9093529120548a908a9060ff1615611c5e5760405163180567a360e31b815260040160405180910390fd5b6000611ca583838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061142d9250889150612f0a9050565b600b549091506001600160a01b03808316911614611ce757600b546040516372ee54c960e01b81526109979183916001600160a01b0390911690600401614e64565b6000848152600c60205260408120805460ff191660011790555b88811015611f32576014546000906001600160a01b031663e3c998fe8c8c85818110611d3d57634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401611d6291815260200190565b60206040518083038186803b158015611d7a57600080fd5b505afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db291906146f5565b6015549091506000906001600160a01b0316636352211e8d8d86818110611de957634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401611e0e91815260200190565b60206040518083038186803b158015611e2657600080fd5b505afa158015611e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5e91906146f5565b90506001600160a01b0382163314801590611e8257506001600160a01b0381163314155b15611ea057604051630247f98760e21b815260040160405180910390fd5b6000611ed18d8d86818110611ec557634e487b7160e01b600052603260045260246000fd5b905060200201356119ca565b90508015611f1c578c8c85818110611ef957634e487b7160e01b600052603260045260246000fd5b90506020020135604051631ed0363960e31b815260040161099791815260200190565b5050508080611f2a906153bc565b915050611d01565b50611f3d898961337b565b611f488b8b8a612f78565b50505050505050505050505050565b6003546060906000906001600160401b03811115611f8557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611fae578160200160208202803683370190505b50905060005b60035481101561204c57600061271060038381548110611fe457634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101548661200191906152d8565b61200b91906152c4565b90508083838151811061202e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101525080612044816153bc565b915050611fb4565b5092915050565b6001546001600160a01b031690565b3361206b612053565b6001600160a01b0316148061208657506120866000336120c1565b6120a357604051637bb62a2160e01b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b03831617905550565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060108054610f0690615355565b60028054141561211b5760405162461bcd60e51b815260040161099790615252565b60028055478061213e5760405163334ab3f560e11b815260040160405180910390fd5b600061214982611f57565b905060005b600354811015612252576003818154811061217957634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015482516001600160a01b03909116906108fc908490849081106121bc57634e487b7160e01b600052603260045260246000fd5b60200260200101519081150290604051600060405180830381858888f1935050505061224057806003828154811061220457634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154604051634dc511bf60e11b815260048101929092526001600160a01b03166024820152604401610997565b8061224a816153bc565b91505061214e565b5050600160025550565b611023338383613454565b60009081526009602052604090205490565b60028054141561229b5760405162461bcd60e51b815260040161099790615252565b600280556040516370a0823160e01b81526000906001600160a01b038316906370a08231906122ce903090600401614e50565b60206040518083038186803b1580156122e657600080fd5b505afa1580156122fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231e9190614bf9565b90508061233e5760405163334ab3f560e11b815260040160405180910390fd5b600061234982611f57565b905060005b60035481101561247657836001600160a01b031663a9059cbb6003838154811061238857634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015484516001600160a01b03909116908590859081106123c757634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016123ec929190614f21565b602060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243e9190614a22565b61246457806003828154811061220457634e487b7160e01b600052603260045260246000fd5b8061246e816153bc565b91505061234e565b505060016002555050565b3361248a612053565b6001600160a01b031614806124a557506124a56000336120c1565b806124c357506124c36000805160206155a8833981519152336120c1565b6124e05760405163c5cca88d60e01b815260040160405180910390fd5b61108e613535565b6060600d6001018054610f0690615355565b612503826110f2565b61250d8133612c74565b6111fc8383612d5c565b606061252360006129b2565b6040516020016125339190614d7d565b604051602081830303815290604052905090565b6001600160a01b03811660009081526004602052604081205460ff1615612570575060016109c5565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff165b9392505050565b600381815481106125b157600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001600160a01b0385163314806125f557506125f58533612547565b6126115760405162461bcd60e51b8152600401610997906150ba565b610ef085858585856135a6565b33612627612053565b6001600160a01b03161461264d5760405162461bcd60e51b8152600401610997906151d5565b6001600160a01b0381166126b25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610997565b6126bd600082612cd8565b6126cf60006126ca612053565b612d5c565b610c8481613329565b6001600160a01b0383163314806126f457506126f48333612547565b6127105760405162461bcd60e51b8152600401610997906150ba565b6111fc8383836136bb565b6003600d5460ff16600381111561274257634e487b7160e01b600052602160045260246000fd5b141561276157604051630ddc900960e11b815260040160405180910390fd5b600d805482919060ff1916600183600381111561278e57634e487b7160e01b600052602160045260246000fd5b021790555060038160038111156127b557634e487b7160e01b600052602160045260246000fd5b14156128135760408051808201909152600880825267119a5b9a5cda195960c21b60209092019182526127ea91600e916144eb565b506040516000805160206155c88339815191529061280a90600e90614fad565b60405180910390a15b600d546040517f115b0a20885b9271082b68a739b15a23986a94c5e2807b824f9ad7dd918f8aeb91610bfc9160ff90911690614f72565b60006128566002612267565b60026000526011602052600080516020615588833981519152541161287c5760006128aa565b6128866002612267565b60026000526011602052600080516020615588833981519152546128aa91906152f7565b905060006128b86003612267565b6003600052601160205260008051602061554883398151915254116128de57600061290c565b6128e86003612267565b600360005260116020526000805160206155488339815191525461290c91906152f7565b9050811561294457612944738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f600284604051806020016040528060008152506137ae565b801561102357611023738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f600383604051806020016040528060008152506137ae565b60006001600160e01b0319821663152a902d60e11b14806109c557506109c58261389f565b80516110239060089060208401906144eb565b6060600880546129c190615355565b80601f01602080910402602001604051908101604052809291908181526020018280546129ed90615355565b8015612a3a5780601f10612a0f57610100808354040283529160200191612a3a565b820191906000526020600020905b815481529060010190602001808311612a1d57829003601f168201915b50505050509050919050565b6002600d5460ff166003811115612a6d57634e487b7160e01b600052602160045260246000fd5b14612a8b57604051635402932b60e01b815260040160405180910390fd5b600d805460ff1916600117905560405160008152600080516020615608833981519152906020015b60405180910390a1565b8151835114612ade5760405162461bcd60e51b81526004016109979061520a565b6001600160a01b038416612b045760405162461bcd60e51b815260040161099790615103565b33612b138187878787876138df565b60005b8451811015612c18576000858281518110612b4157634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110612b6d57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526006835260408082206001600160a01b038e168352909352919091205490915081811015612bbe5760405162461bcd60e51b81526004016109979061518b565b60008381526006602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612bfd9084906152ac565b9250508190555050505080612c11906153bc565b9050612b16565b50846001600160a01b0316866001600160a01b0316826001600160a01b03166000805160206155288339815191528787604051612c56929190614f4d565b60405180910390a4612c6c8187878787876138ed565b505050505050565b612c7e82826120c1565b61102357612c96816001600160a01b03166014613a5f565b612ca1836020613a5f565b604051602001612cb2929190614de1565b60408051601f198184030181529082905262461bcd60e51b825261099791600401614f9a565b612ce282826120c1565b611023576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612d183390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612d6682826120c1565b15611023576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080600080612dd16001612267565b600160005260116020526000805160206155e88339815191525411612df7576000612e25565b612e016001612267565b600160005260116020526000805160206155e883398151915254612e2591906152f7565b90506000612e336002612267565b600260005260116020526000805160206155888339815191525411612e585781612e91565b81612e636002612267565b6002600052601160205260008051602061558883398151915254612e8791906152f7565b612e9191906152ac565b90506000612e9f6003612267565b600360005260116020526000805160206155488339815191525411612ec45781612efd565b81612ecf6003612267565b6003600052601160205260008051602061554883398151915254612ef391906152f7565b612efd91906152ac565b9296919550919350915050565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000612f6b8585613c40565b9150915061193b81613cad565b6000612f848383611a85565b9050803414612fa65760405163ab0a033b60e01b815260040160405180910390fd5b821561305a576014546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f602482015260448101869052606401602060405180830381600087803b15801561302057600080fd5b505af1158015613034573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130589190614a22565b505b60008060006130698786613ea9565b9194509250905082156130925761309233600185604051806020016040528060008152506137ae565b81156130b4576130b433600284604051806020016040528060008152506137ae565b80156130d6576130d633600383604051806020016040528060008152506137ae565b50505050505050565b6003600d5460ff16600381111561310657634e487b7160e01b600052602160045260246000fd5b141561312557604051630ddc900960e11b815260040160405180910390fd5b805161313890600e9060208401906144eb565b50600d805460ff191690556040516000805160206155c883398151915290610bfc90600e90614fad565b600080613175610100600185901b6152c4565b9150613187610100600185901b6153f7565b9050915091565b6001600160a01b0383166131b45760405162461bcd60e51b815260040161099790615148565b80518251146131d55760405162461bcd60e51b81526004016109979061520a565b60003390506131f8818560008686604051806020016040528060008152506138df565b60005b83518110156132dc57600084828151811061322657634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061325257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526006835260408082206001600160a01b038c1683529093529190912054909150818110156132a35760405162461bcd60e51b815260040161099790615076565b60009283526006602090815260408085206001600160a01b038b16865290915290922091039055806132d4816153bc565b9150506131fb565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615528833981519152868660405161331b929190614f4d565b60405180910390a450505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc54815b83811015610ef0576000806133e38787858181106133d757634e487b7160e01b600052603260045260246000fd5b90506020020135613162565b9150915084821461340d576000948552600560205260408086209490945581855292909320549183905b613419848260016140da565b9350856134278460016152ac565b141561343f5760008581526005602052604090208490555b5050808061344c906153bc565b9150506133a9565b816001600160a01b0316836001600160a01b031614156134c85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610997565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600d5460ff16600381111561355c57634e487b7160e01b600052602160045260246000fd5b1461357a57604051638ca755f560e01b815260040160405180910390fd5b600d805460ff191660021790556040516001815260008051602061560883398151915290602001612ab3565b6001600160a01b0384166135cc5760405162461bcd60e51b815260040161099790615103565b336135eb8187876135dc886140fc565b6135e5886140fc565b876138df565b60008481526006602090815260408083206001600160a01b038a1684529091529020548381101561362e5760405162461bcd60e51b81526004016109979061518b565b60008581526006602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061366d9084906152ac565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020615568833981519152910160405180910390a46130d6828888888888614155565b6001600160a01b0383166136e15760405162461bcd60e51b815260040161099790615148565b33613710818560006136f2876140fc565b6136fb876140fc565b604051806020016040528060008152506138df565b60008381526006602090815260408083206001600160a01b0388168452909152902054828110156137535760405162461bcd60e51b815260040161099790615076565b60008481526006602090815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020615568833981519152910160405180910390a45050505050565b6001600160a01b03841661380e5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610997565b3361381f816000876135dc886140fc565b60008481526006602090815260408083206001600160a01b0389168452909152812080548592906138519084906152ac565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020615568833981519152910160405180910390a4610ef081600087878787614155565b60006001600160e01b03198216636cdb3d1360e11b14806138d057506001600160e01b031982166303a24d0760e21b145b806109c557506109c582614226565b612c6c86868686868661425b565b6138ff846001600160a01b031661439f565b15612c6c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906139389089908990889088908890600401614e7e565b602060405180830381600087803b15801561395257600080fd5b505af1925050508015613982575060408051601f3d908101601f1916820190925261397f91810190614a96565b60015b613a2f5761398e61544d565b806308c379a014156139c857506139a3615465565b806139ae57506139ca565b8060405162461bcd60e51b81526004016109979190614f9a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610997565b6001600160e01b0319811663bc197c8160e01b146130d65760405162461bcd60e51b81526004016109979061502e565b60606000613a6e8360026152d8565b613a799060026152ac565b6001600160401b03811115613a9e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ac8576020820181803683370190505b509050600360fc1b81600081518110613af157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b2e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613b528460026152d8565b613b5d9060016152ac565b90505b6001811115613bf1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613b9f57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613bc357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613bea8161533e565b9050613b60565b50831561259a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610997565b600080825160411415613c775760208301516040840151606085015160001a613c6b878285856143ae565b94509450505050611148565b825160401415613ca15760208301516040840151613c96868383614491565b935093505050611148565b50600090506002611148565b6000816004811115613ccf57634e487b7160e01b600052602160045260246000fd5b1415613cd85750565b6001816004811115613cfa57634e487b7160e01b600052602160045260246000fd5b1415613d435760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610997565b6002816004811115613d6557634e487b7160e01b600052602160045260246000fd5b1415613db35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610997565b6003816004811115613dd557634e487b7160e01b600052602160045260246000fd5b1415613e2e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610997565b6004816004811115613e5057634e487b7160e01b600052602160045260246000fd5b1415610c845760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610997565b600080600080846001600160401b03811115613ed557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613efe578160200160208202803683370190505b50905060005b858160ff161015613f9957613f1c60ff8216876152ac565b60408051602081019290925281018890524460608201526080016040516020818303038152906040528051906020012060001c828260ff1681518110613f7257634e487b7160e01b600052603260045260246000fd5b63ffffffff9092166020928302919091019091015280613f91816153d7565b915050613f04565b50600080600080806000613fab612dc1565b92509250925060005b8b8110156140c657600085613fc9888a6152ac565b613fd391906152ac565b613fdd90846152f7565b9050600063ffffffff8016828b858151811061400957634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff1661402191906152d8565b61402b91906152c4565b905061403789876152f7565b8110156140505788614048816153bc565b9950506140b1565b61405a888a6152ac565b61406490866152f7565b81101561407d5787614075816153bc565b9850506140b1565b86614088898b6152ac565b61409291906152ac565b61409c90856152f7565b8110156140b157866140ad816153bc565b9750505b505080806140be906153bc565b915050613fb4565b50949b939a50919850919650505050505050565b6000816140ed576001831b1984166140f4565b6001831b84175b949350505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061414457634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b614167846001600160a01b031661439f565b15612c6c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141a09089908990889088908890600401614edc565b602060405180830381600087803b1580156141ba57600080fd5b505af19250505080156141ea575060408051601f3d908101601f191682019092526141e791810190614a96565b60015b6141f65761398e61544d565b6001600160e01b0319811663f23a6e6160e01b146130d65760405162461bcd60e51b81526004016109979061502e565b60006001600160e01b03198216637965db0b60e01b14806109c557506301ffc9a760e01b6001600160e01b03198316146109c5565b6001600160a01b0385166142fe5760005b83518110156142fc5782818151811061429557634e487b7160e01b600052603260045260246000fd5b6020026020010151600960008684815181106142c157634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546142e691906152ac565b909155506142f59050816153bc565b905061426c565b505b6001600160a01b038416612c6c5760005b83518110156130d65782818151811061433857634e487b7160e01b600052603260045260246000fd5b60200260200101516009600086848151811061436457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600082825461438991906152f7565b909155506143989050816153bc565b905061430f565b6001600160a01b03163b151590565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156143db5750600090506003614488565b8460ff16601b141580156143f357508460ff16601c14155b156144045750600090506004614488565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614458573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661448157600060019250925050614488565b9150600090505b94509492505050565b6000806001600160ff1b038316816144ae60ff86901c601b6152ac565b90506144bc878288856143ae565b935093505050935093915050565b5080546000825560020290600052602060002090810190610c84919061456f565b8280546144f790615355565b90600052602060002090601f016020900481019282614519576000855561455f565b82601f1061453257805160ff191683800117855561455f565b8280016001018555821561455f579182015b8281111561455f578251825591602001919060010190614544565b5061456b929150614595565b5090565b5b8082111561456b5780546001600160a01b031916815560006001820155600201614570565b5b8082111561456b5760008155600101614596565b60006001600160401b038311156145c3576145c3615437565b6040516145da601f8501601f191660200182615390565b8091508381528484840111156145ef57600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614617578081fd5b8135602061462482615289565b6040516146318282615390565b8381528281019150858301600585901b87018401881015614650578586fd5b855b8581101561466e57813584529284019290840190600101614652565b5090979650505050505050565b60008083601f84011261468c578182fd5b5081356001600160401b038111156146a2578182fd5b60208301915083602082850101111561114857600080fd5b600082601f8301126146ca578081fd5b61259a838335602085016145aa565b6000602082840312156146ea578081fd5b813561259a816154ee565b600060208284031215614706578081fd5b815161259a816154ee565b60008060408385031215614723578081fd5b823561472e816154ee565b9150602083013561473e816154ee565b809150509250929050565b600080600080600060a08688031215614760578081fd5b853561476b816154ee565b9450602086013561477b816154ee565b935060408601356001600160401b0380821115614796578283fd5b6147a289838a01614607565b945060608801359150808211156147b7578283fd5b6147c389838a01614607565b935060808801359150808211156147d8578283fd5b506147e5888289016146ba565b9150509295509295909350565b600080600080600060a08688031215614809578081fd5b8535614814816154ee565b94506020860135614824816154ee565b9350604086013592506060860135915060808601356001600160401b0381111561484c578182fd5b6147e5888289016146ba565b60008060006060848603121561486c578081fd5b8335614877816154ee565b925060208401356001600160401b0380821115614892578283fd5b61489e87838801614607565b935060408601359150808211156148b3578283fd5b506148c086828701614607565b9150509250925092565b600080604083850312156148dc578182fd5b82356148e7816154ee565b9150602083013561473e81615503565b60008060408385031215614909578182fd5b8235614914816154ee565b946020939093013593505050565b600080600060608486031215614936578081fd5b8335614941816154ee565b95602085013595506040909401359392505050565b60008060408385031215614968578182fd5b82356001600160401b038082111561497e578384fd5b818501915085601f830112614991578384fd5b8135602061499e82615289565b6040516149ab8282615390565b8381528281019150858301600585901b870184018b10156149ca578889fd5b8896505b848710156149f55780356149e1816154ee565b8352600196909601959183019183016149ce565b5096505086013592505080821115614a0b578283fd5b50614a1885828601614607565b9150509250929050565b600060208284031215614a33578081fd5b815161259a81615503565b600060208284031215614a4f578081fd5b5035919050565b60008060408385031215614a68578182fd5b82359150602083013561473e816154ee565b600060208284031215614a8b578081fd5b813561259a81615511565b600060208284031215614aa7578081fd5b815161259a81615511565b60008060008060008060808789031215614aca578384fd5b86356001600160401b0380821115614ae0578586fd5b614aec8a838b0161467b565b909850965060208901359550604089013594506060890135915080821115614b12578283fd5b818901915089601f830112614b25578283fd5b813581811115614b33578384fd5b8a60208260051b8501011115614b47578384fd5b6020830194508093505050509295509295509295565b600080600080600060808688031215614b74578283fd5b85356001600160401b03811115614b89578384fd5b614b958882890161467b565b9099909850602088013597604081013597506060013595509350505050565b600060208284031215614bc5578081fd5b81356001600160401b03811115614bda578182fd5b8201601f81018413614bea578182fd5b6140f4848235602084016145aa565b600060208284031215614c0a578081fd5b5051919050565b60008060408385031215614c23578182fd5b50508035926020909101359150565b600060208284031215614c43578081fd5b813563ffffffff8116811461259a578182fd5b6000815180845260208085019450808401835b83811015614c8557815187529582019590820190600101614c69565b509495945050505050565b60008151808452614ca881602086016020860161530e565b601f01601f19169290920160200192915050565b606086901b6001600160601b0319168152601481018590526034810184905260006001600160fb1b03831115614cf0578081fd5b8260051b808560548501379190910160540190815295945050505050565b6000808354614d1c81615355565b60018281168015614d345760018114614d4557614d71565b60ff19841687528287019450614d71565b8786526020808720875b85811015614d685781548a820152908401908201614d4f565b50505082870194505b50929695505050505050565b60008251614d8f81846020870161530e565b6c31b7b73a3930b1ba173539b7b760991b920191825250600d01919050565b60008251614dc081846020870161530e565b6e3a37b5b2b717bdb4b23e973539b7b760891b920191825250600f01919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351614e1381601785016020880161530e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614e4481602884016020880161530e565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0386811682528516602082015260a060408201819052600090614eaa90830186614c56565b8281036060840152614ebc8186614c56565b90508281036080840152614ed08185614c90565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614f1690830184614c90565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b60208152600061259a6020830184614c56565b604081526000614f606040830185614c56565b8281036020840152611a008185614c56565b6020810160048310614f9457634e487b7160e01b600052602160045260246000fd5b91905290565b60208152600061259a6020830184614c90565b60006020808352818454614fc081615355565b80848701526040600180841660008114614fe15760018114614ff557615020565b60ff19851689840152606089019550615020565b898852868820885b858110156150185781548b8201860152908301908801614ffd565b8a0184019650505b509398975050505050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006001600160401b038211156152a2576152a2615437565b5060051b60200190565b600082198211156152bf576152bf61540b565b500190565b6000826152d3576152d3615421565b500490565b60008160001904831182151516156152f2576152f261540b565b500290565b6000828210156153095761530961540b565b500390565b60005b83811015615329578181015183820152602001615311565b83811115615338576000848401525b50505050565b60008161534d5761534d61540b565b506000190190565b600181811c9082168061536957607f821691505b6020821081141561538a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156153b5576153b5615437565b6040525050565b60006000198214156153d0576153d061540b565b5060010190565b600060ff821660ff8114156153ee576153ee61540b565b60010192915050565b60008261540657615406615421565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561546257600481823e5160e01c5b90565b600060443d10156154735790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156154a257505050505090565b82850191508151818111156154ba5750505050505090565b843d87010160208285010111156154d45750505050505090565b6154e360208286010187615390565b509095945050505050565b6001600160a01b0381168114610c8457600080fd5b8015158114610c8457600080fd5b6001600160e01b031981168114610c8457600080fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9bfbaa59f8e10e7868f8b402de9d605a390c45ddaebd8c9de3c6f31e733c87ffc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6208037d7b151cc412d25674a4e66b334d9ae9d2e5517a7feaae5cdb828bf1c62871f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f73c24a7893680131e7c50fcccddb220f15bfc9f6968bef4235b6cc599404912417bc176d2408558f6e4111feebc3cab4e16b63e967be91cde721f4c8a488b552ff4a5dbbab6b1963d10f5edd139f33a7987ecb3c4f65969be77ddba28d946594a2646970667358221220ab79bb68df24ba47dbb4bbe0f65f9596d042465b6184b0e4246932fe89977af964736f6c6343000804003368747470733a2f2f6d6173736c6573732d697066732d7075626c69632d676174657761792e6d7970696e6174612e636c6f75642f697066732f516d5a695a556a7646424b585533684a31694a3962775051634e4e4d4242724651557637465a79625967714c63442f000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb00000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad79460000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102735760003560e01c8062fdd58e1461027f578063017043a5146102b257806301ffc9a7146102c957806302fe5305146102f9578063046dc16614610319578063065dc4c11461033957806306fdde03146103595780630e89341c1461037b5780631351cf511461039b5780631a8bd2da146103bb5780631cf015c6146103d0578063248a9ca3146103f057806325bdb2a81461041057806327125748146104305780632a55205a1461045d5780632eb2c2d61461048b5780632f2ff15d146104ab57806336568abe146104cb57806340288073146104eb578063404a1f37146104fe57806342260b5d1461051e578063450afb2d146105575780634a86c40b1461056c5780634e1273f4146105815780634f558e79146105ae5780635b7633d0146105ce5780635c6fd90b146105f557806369d9dd4f146106155780636b20c45414610635578063715018a614610655578063797669c91461066a5780637ed49b181461068c5780638295c0a9146106ac5780638d623781146106bf5780638da5cb5b146106df5780638dc251e3146106f457806391d148541461071457806395d89b41146107345780639fbc871314610749578063a0ef91df14610769578063a217fddf1461077e578063a22cb46514610793578063a81152f7146107b3578063b48a373d146107c8578063bd85b039146107f0578063c7e42b1b14610810578063cd85cdb514610830578063d1e812a314610845578063d547741f1461085a578063e8a3d4851461087a578063e985e9c51461088f578063efeb5e58146108af578063f242432a146108cf578063f2fde38b146108ef578063f5298aca1461090f57600080fd5b3661027a57005b600080fd5b34801561028b57600080fd5b5061029f61029a3660046148f7565b61092f565b6040519081526020015b60405180910390f35b3480156102be57600080fd5b506102c76109cb565b005b3480156102d557600080fd5b506102e96102e4366004614a7a565b610a8e565b60405190151581526020016102a9565b34801561030557600080fd5b506102c7610314366004614bb4565b610b04565b34801561032557600080fd5b506102c76103343660046146d9565b610c07565b34801561034557600080fd5b506102c7610354366004614956565b610c87565b34801561036557600080fd5b5061036e610ef7565b6040516102a99190614f9a565b34801561038757600080fd5b5061036e610396366004614a3e565b610f89565b3480156103a757600080fd5b506102c76103b63660046148ca565b610fba565b3480156103c757600080fd5b506102c7611027565b3480156103dc57600080fd5b506102c76103eb366004614c32565b611090565b3480156103fc57600080fd5b5061029f61040b366004614a3e565b6110f2565b34801561041c57600080fd5b50600d5460ff166040516102a99190614f72565b34801561043c57600080fd5b5061029f61044b366004614a3e565b60116020526000908152604090205481565b34801561046957600080fd5b5061047d610478366004614c11565b611107565b6040516102a9929190614f21565b34801561049757600080fd5b506102c76104a6366004614749565b61114f565b3480156104b757600080fd5b506102c76104c6366004614a56565b6111df565b3480156104d757600080fd5b506102c76104e6366004614a56565b611201565b6102c76104f9366004614b5d565b61127b565b34801561050a57600080fd5b506102c76105193660046146d9565b6115f0565b34801561052a57600080fd5b50600a5461054290600160a01b900463ffffffff1681565b60405163ffffffff90911681526020016102a9565b34801561056357600080fd5b506102c7611664565b34801561057857600080fd5b506102c7611723565b34801561058d57600080fd5b506105a161059c366004614956565b6117e2565b6040516102a99190614f3a565b3480156105ba57600080fd5b506102e96105c9366004614a3e565b611943565b3480156105da57600080fd5b50600b546001600160a01b03165b6040516102a99190614e50565b34801561060157600080fd5b506102c76106103660046146d9565b611956565b34801561062157600080fd5b506102e9610630366004614a3e565b6119ca565b34801561064157600080fd5b506102c7610650366004614858565b611a09565b34801561066157600080fd5b506102c7611a4c565b34801561067657600080fd5b5061029f6000805160206155a883398151915281565b34801561069857600080fd5b5061029f6106a7366004614c11565b611a85565b6102c76106ba366004614ab2565b611b0b565b3480156106cb57600080fd5b506105a16106da366004614a3e565b611f57565b3480156106eb57600080fd5b506105e8612053565b34801561070057600080fd5b506102c761070f3660046146d9565b612062565b34801561072057600080fd5b506102e961072f366004614a56565b6120c1565b34801561074057600080fd5b5061036e6120ea565b34801561075557600080fd5b50600a546105e8906001600160a01b031681565b34801561077557600080fd5b506102c76120f9565b34801561078a57600080fd5b5061029f600081565b34801561079f57600080fd5b506102c76107ae3660046148ca565b61225c565b3480156107bf57600080fd5b5061029f600581565b3480156107d457600080fd5b506105e8738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f81565b3480156107fc57600080fd5b5061029f61080b366004614a3e565b612267565b34801561081c57600080fd5b506102c761082b3660046146d9565b612279565b34801561083c57600080fd5b506102c7612481565b34801561085157600080fd5b5061036e6124e8565b34801561086657600080fd5b506102c7610875366004614a56565b6124fa565b34801561088657600080fd5b5061036e612517565b34801561089b57600080fd5b506102e96108aa366004614711565b612547565b3480156108bb57600080fd5b5061047d6108ca366004614a3e565b6125a1565b3480156108db57600080fd5b506102c76108ea3660046147f2565b6125d9565b3480156108fb57600080fd5b506102c761090a3660046146d9565b61261e565b34801561091b57600080fd5b506102c761092a366004614922565b6126d8565b60006001600160a01b0383166109a05760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526006602090815260408083206001600160a01b03861684529091529020545b92915050565b336109d4612053565b6001600160a01b031614806109ef57506109ef6000336120c1565b610a0c57604051637bb62a2160e01b815260040160405180910390fd5b6001600d5460ff166003811115610a3357634e487b7160e01b600052602160045260246000fd5b14610a5157604051638ca755f560e01b815260040160405180910390fd5b610a5b600361271b565b610a6361284a565b6040517faf24d3bccd7e329975f60c4d13b81252ff061649fb46d1c416c9b6a13100bff190600090a1565b60006001600160e01b03198216637965db0b60e01b1480610abf57506001600160e01b0319821663152a902d60e11b145b80610ada57506001600160e01b0319821663e8a3d48560e01b145b80610af557506001600160e01b03198216636cdb3d1360e11b145b806109c557506109c58261297a565b33610b0d612053565b6001600160a01b03161480610b285750610b286000336120c1565b80610b465750610b466000805160206155a8833981519152336120c1565b610b635760405163c5cca88d60e01b815260040160405180910390fd5b8051602f60f81b908290610b79906001906152f7565b81518110610b9757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191614610bc45760405163a467f6f560e01b815260040160405180910390fd5b610bcd8161299f565b7fe3afa94108b5f5e82e5f6e539d161ff4b5402a85f696c67b9768ec3ae54ce36681604051610bfc9190614f9a565b60405180910390a150565b33610c10612053565b6001600160a01b03161480610c2b5750610c2b6000336120c1565b80610c495750610c496000805160206155a8833981519152336120c1565b610c665760405163c5cca88d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b03831617905550565b50565b33610c90612053565b6001600160a01b031614610cb65760405162461bcd60e51b8152600401610997906151d5565b81818051825114610cda5760405163512509d360e11b815260040160405180910390fd5b8151610cf95760405163a763b50160e01b815260040160405180910390fd5b60005b8251811015610dbb5760006001600160a01b0316838281518110610d3057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610d6057604051631e2add6160e21b815260040160405180910390fd5b818181518110610d8057634e487b7160e01b600052603260045260246000fd5b602002602001015160001415610da95760405163572d773160e11b815260040160405180910390fd5b80610db3816153bc565b915050610cfc565b50610dc8600360006144ca565b60005b8451811015610ef05760006001600160a01b0316858281518110610dff57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610e2f5760405163f8cc3de360e01b815260040160405180910390fd5b60036040518060400160405280878481518110610e5c57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03168152602001868481518110610e9257634e487b7160e01b600052603260045260246000fd5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015580610ee8816153bc565b915050610dcb565b5050505050565b6060600f8054610f0690615355565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3290615355565b8015610f7f5780601f10610f5457610100808354040283529160200191610f7f565b820191906000526020600020905b815481529060010190602001808311610f6257829003601f168201915b5050505050905090565b6060610f94826129b2565b604051602001610fa49190614dae565b6040516020818303038152906040529050919050565b33610fc3612053565b6001600160a01b03161480610fde5750610fde6000336120c1565b610ffb57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0382166000908152600460205260409020805460ff19168215151790555050565b5050565b33611030612053565b6001600160a01b0316148061104b575061104b6000336120c1565b8061106957506110696000805160206155a8833981519152336120c1565b6110865760405163c5cca88d60e01b815260040160405180910390fd5b61108e612a46565b565b33611099612053565b6001600160a01b031614806110b457506110b46000336120c1565b6110d157604051637bb62a2160e01b815260040160405180910390fd5b600a805463ffffffff60a01b1916600160a01b63ffffffff84160217905550565b60009081526020819052604090206001015490565b600a54600090819081906127109061112c90600160a01b900463ffffffff16866152d8565b61113691906152c4565b600a546001600160a01b031693509150505b9250929050565b6001600160a01b03851633148061116b575061116b8533612547565b6111d25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610997565b610ef08585858585612abd565b6111e8826110f2565b6111f28133612c74565b6111fc8383612cd8565b505050565b6001600160a01b03811633146112715760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610997565b6110238282612d5c565b60408051808201909152600a815269141a185cd94c935a5b9d60b21b60208201526001600d5460ff1660038111156112c357634e487b7160e01b600052602160045260246000fd5b146112e157604051638ca755f560e01b815260040160405180910390fd5b805160208201206040516112f790600e90614d0e565b60405180910390201461131d57604051630a761c7560e31b815260040160405180910390fd5b816000611328612dc1565b925050508161134a57604051633f44c9b160e11b815260040160405180910390fd5b8082111561136b576040516352df9fe560e01b815260040160405180910390fd5b3360405160609190911b6001600160601b031916602082015260348101879052605481018690526074810185905260940160408051601f1981840301815291815281516020928301206000818152600c9093529120548990899060ff16156113e65760405163180567a360e31b815260040160405180910390fd5b600061143383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061142d9250889150612f0a9050565b90612f5c565b600b549091506001600160a01b0380831691161461147557600b546040516372ee54c960e01b81526109979183916001600160a01b0390911690600401614e64565b6000848152600c60205260409020805460ff1916600117905560058811156114b35760405163792639f960e11b815260056004820152602401610997565b6015546001600160a01b03166370a08231336040518263ffffffff1660e01b81526004016114e19190614e50565b60206040518083038186803b1580156114f957600080fd5b505afa15801561150d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115319190614bf9565b1580156115b957506014546001600160a01b0316634da6a556336040518263ffffffff1660e01b81526004016115679190614e50565b60206040518083038186803b15801561157f57600080fd5b505afa158015611593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b79190614bf9565b155b156115d757604051631cbee31f60e21b815260040160405180910390fd5b6115e28a8a8a612f78565b505050505050505050505050565b336115f9612053565b6001600160a01b0316148061161457506116146000336120c1565b61163157604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b03811661165957604051633ef39b8160e01b815260040160405180910390fd5b611023600083612d5c565b3361166d612053565b6001600160a01b0316148061168857506116886000336120c1565b806116a657506116a66000805160206155a8833981519152336120c1565b6116c35760405163c5cca88d60e01b815260040160405180910390fd5b6116ee6040518060400160405280600a815260200169141a185cd94c935a5b9d60b21b8152506130df565b6116f8600161271b565b6040517f23adac25386318036c42b20b159b8b8825154a1cf03e7f6f08a525adb99ed07890600090a1565b3361172c612053565b6001600160a01b0316148061174757506117476000336120c1565b8061176557506117656000805160206155a8833981519152336120c1565b6117825760405163c5cca88d60e01b815260040160405180910390fd5b6117ad6040518060400160405280600a815260200169141a185cd94c535a5b9d60b21b8152506130df565b6117b7600161271b565b6040517f51c4ff149519310d67c9c034afbabdc89ac52886d921366bfe89e62f28779a5b90600090a1565b606081518351146118475760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610997565b600083516001600160401b0381111561187057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611899578160200160208202803683370190505b50905060005b845181101561193b576119008582815181106118cb57634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106118f357634e487b7160e01b600052603260045260246000fd5b602002602001015161092f565b82828151811061192057634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611934816153bc565b905061189f565b509392505050565b60008061194f83612267565b1192915050565b3361195f612053565b6001600160a01b0316148061197a575061197a6000336120c1565b61199757604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b0381166119bf57604051633ef39b8160e01b815260040160405180910390fd5b611023600083612cd8565b60008060006119d884613162565b60008281526005602052604090205491935091506001821b81166119fd576000611a00565b60015b95945050505050565b6001600160a01b038316331480611a255750611a258333612547565b611a415760405162461bcd60e51b8152600401610997906150ba565b6111fc83838361318e565b33611a55612053565b6001600160a01b031614611a7b5760405162461bcd60e51b8152600401610997906151d5565b61108e6000613329565b600082611aa557611a9e826701cdda4faccd00006152d8565b90506109c5565b611ab882680821ab0d44149800006152d8565b831415611ad057611a9e8266e6ed27d66680006152d8565b611ae382681043561a88293000006152d8565b831415611af2575060006109c5565b604051631fdf5ecb60e01b815260040160405180910390fd5b60408051808201909152600a815269141a185cd94c535a5b9d60b21b60208201526001600d5460ff166003811115611b5357634e487b7160e01b600052602160045260246000fd5b14611b7157604051638ca755f560e01b815260040160405180910390fd5b80516020820120604051611b8790600e90614d0e565b604051809103902014611bad57604051630a761c7560e31b815260040160405180910390fd5b816000611bb8612dc1565b9250505081611bda57604051633f44c9b160e11b815260040160405180910390fd5b80821115611bfb576040516352df9fe560e01b815260040160405180910390fd5b3387878787604051602001611c14959493929190614cbc565b60408051601f1981840301815291815281516020928301206000818152600c9093529120548a908a9060ff1615611c5e5760405163180567a360e31b815260040160405180910390fd5b6000611ca583838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061142d9250889150612f0a9050565b600b549091506001600160a01b03808316911614611ce757600b546040516372ee54c960e01b81526109979183916001600160a01b0390911690600401614e64565b6000848152600c60205260408120805460ff191660011790555b88811015611f32576014546000906001600160a01b031663e3c998fe8c8c85818110611d3d57634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401611d6291815260200190565b60206040518083038186803b158015611d7a57600080fd5b505afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db291906146f5565b6015549091506000906001600160a01b0316636352211e8d8d86818110611de957634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401611e0e91815260200190565b60206040518083038186803b158015611e2657600080fd5b505afa158015611e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5e91906146f5565b90506001600160a01b0382163314801590611e8257506001600160a01b0381163314155b15611ea057604051630247f98760e21b815260040160405180910390fd5b6000611ed18d8d86818110611ec557634e487b7160e01b600052603260045260246000fd5b905060200201356119ca565b90508015611f1c578c8c85818110611ef957634e487b7160e01b600052603260045260246000fd5b90506020020135604051631ed0363960e31b815260040161099791815260200190565b5050508080611f2a906153bc565b915050611d01565b50611f3d898961337b565b611f488b8b8a612f78565b50505050505050505050505050565b6003546060906000906001600160401b03811115611f8557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611fae578160200160208202803683370190505b50905060005b60035481101561204c57600061271060038381548110611fe457634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101548661200191906152d8565b61200b91906152c4565b90508083838151811061202e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101525080612044816153bc565b915050611fb4565b5092915050565b6001546001600160a01b031690565b3361206b612053565b6001600160a01b0316148061208657506120866000336120c1565b6120a357604051637bb62a2160e01b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b03831617905550565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060108054610f0690615355565b60028054141561211b5760405162461bcd60e51b815260040161099790615252565b60028055478061213e5760405163334ab3f560e11b815260040160405180910390fd5b600061214982611f57565b905060005b600354811015612252576003818154811061217957634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015482516001600160a01b03909116906108fc908490849081106121bc57634e487b7160e01b600052603260045260246000fd5b60200260200101519081150290604051600060405180830381858888f1935050505061224057806003828154811061220457634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154604051634dc511bf60e11b815260048101929092526001600160a01b03166024820152604401610997565b8061224a816153bc565b91505061214e565b5050600160025550565b611023338383613454565b60009081526009602052604090205490565b60028054141561229b5760405162461bcd60e51b815260040161099790615252565b600280556040516370a0823160e01b81526000906001600160a01b038316906370a08231906122ce903090600401614e50565b60206040518083038186803b1580156122e657600080fd5b505afa1580156122fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231e9190614bf9565b90508061233e5760405163334ab3f560e11b815260040160405180910390fd5b600061234982611f57565b905060005b60035481101561247657836001600160a01b031663a9059cbb6003838154811061238857634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015484516001600160a01b03909116908590859081106123c757634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016123ec929190614f21565b602060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243e9190614a22565b61246457806003828154811061220457634e487b7160e01b600052603260045260246000fd5b8061246e816153bc565b91505061234e565b505060016002555050565b3361248a612053565b6001600160a01b031614806124a557506124a56000336120c1565b806124c357506124c36000805160206155a8833981519152336120c1565b6124e05760405163c5cca88d60e01b815260040160405180910390fd5b61108e613535565b6060600d6001018054610f0690615355565b612503826110f2565b61250d8133612c74565b6111fc8383612d5c565b606061252360006129b2565b6040516020016125339190614d7d565b604051602081830303815290604052905090565b6001600160a01b03811660009081526004602052604081205460ff1615612570575060016109c5565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff165b9392505050565b600381815481106125b157600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001600160a01b0385163314806125f557506125f58533612547565b6126115760405162461bcd60e51b8152600401610997906150ba565b610ef085858585856135a6565b33612627612053565b6001600160a01b03161461264d5760405162461bcd60e51b8152600401610997906151d5565b6001600160a01b0381166126b25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610997565b6126bd600082612cd8565b6126cf60006126ca612053565b612d5c565b610c8481613329565b6001600160a01b0383163314806126f457506126f48333612547565b6127105760405162461bcd60e51b8152600401610997906150ba565b6111fc8383836136bb565b6003600d5460ff16600381111561274257634e487b7160e01b600052602160045260246000fd5b141561276157604051630ddc900960e11b815260040160405180910390fd5b600d805482919060ff1916600183600381111561278e57634e487b7160e01b600052602160045260246000fd5b021790555060038160038111156127b557634e487b7160e01b600052602160045260246000fd5b14156128135760408051808201909152600880825267119a5b9a5cda195960c21b60209092019182526127ea91600e916144eb565b506040516000805160206155c88339815191529061280a90600e90614fad565b60405180910390a15b600d546040517f115b0a20885b9271082b68a739b15a23986a94c5e2807b824f9ad7dd918f8aeb91610bfc9160ff90911690614f72565b60006128566002612267565b60026000526011602052600080516020615588833981519152541161287c5760006128aa565b6128866002612267565b60026000526011602052600080516020615588833981519152546128aa91906152f7565b905060006128b86003612267565b6003600052601160205260008051602061554883398151915254116128de57600061290c565b6128e86003612267565b600360005260116020526000805160206155488339815191525461290c91906152f7565b9050811561294457612944738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f600284604051806020016040528060008152506137ae565b801561102357611023738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f600383604051806020016040528060008152506137ae565b60006001600160e01b0319821663152a902d60e11b14806109c557506109c58261389f565b80516110239060089060208401906144eb565b6060600880546129c190615355565b80601f01602080910402602001604051908101604052809291908181526020018280546129ed90615355565b8015612a3a5780601f10612a0f57610100808354040283529160200191612a3a565b820191906000526020600020905b815481529060010190602001808311612a1d57829003601f168201915b50505050509050919050565b6002600d5460ff166003811115612a6d57634e487b7160e01b600052602160045260246000fd5b14612a8b57604051635402932b60e01b815260040160405180910390fd5b600d805460ff1916600117905560405160008152600080516020615608833981519152906020015b60405180910390a1565b8151835114612ade5760405162461bcd60e51b81526004016109979061520a565b6001600160a01b038416612b045760405162461bcd60e51b815260040161099790615103565b33612b138187878787876138df565b60005b8451811015612c18576000858281518110612b4157634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110612b6d57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526006835260408082206001600160a01b038e168352909352919091205490915081811015612bbe5760405162461bcd60e51b81526004016109979061518b565b60008381526006602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612bfd9084906152ac565b9250508190555050505080612c11906153bc565b9050612b16565b50846001600160a01b0316866001600160a01b0316826001600160a01b03166000805160206155288339815191528787604051612c56929190614f4d565b60405180910390a4612c6c8187878787876138ed565b505050505050565b612c7e82826120c1565b61102357612c96816001600160a01b03166014613a5f565b612ca1836020613a5f565b604051602001612cb2929190614de1565b60408051601f198184030181529082905262461bcd60e51b825261099791600401614f9a565b612ce282826120c1565b611023576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612d183390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612d6682826120c1565b15611023576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080600080612dd16001612267565b600160005260116020526000805160206155e88339815191525411612df7576000612e25565b612e016001612267565b600160005260116020526000805160206155e883398151915254612e2591906152f7565b90506000612e336002612267565b600260005260116020526000805160206155888339815191525411612e585781612e91565b81612e636002612267565b6002600052601160205260008051602061558883398151915254612e8791906152f7565b612e9191906152ac565b90506000612e9f6003612267565b600360005260116020526000805160206155488339815191525411612ec45781612efd565b81612ecf6003612267565b6003600052601160205260008051602061554883398151915254612ef391906152f7565b612efd91906152ac565b9296919550919350915050565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000612f6b8585613c40565b9150915061193b81613cad565b6000612f848383611a85565b9050803414612fa65760405163ab0a033b60e01b815260040160405180910390fd5b821561305a576014546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152738e5f332a0662c8c06bdd1eed105ba1c4800d4c2f602482015260448101869052606401602060405180830381600087803b15801561302057600080fd5b505af1158015613034573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130589190614a22565b505b60008060006130698786613ea9565b9194509250905082156130925761309233600185604051806020016040528060008152506137ae565b81156130b4576130b433600284604051806020016040528060008152506137ae565b80156130d6576130d633600383604051806020016040528060008152506137ae565b50505050505050565b6003600d5460ff16600381111561310657634e487b7160e01b600052602160045260246000fd5b141561312557604051630ddc900960e11b815260040160405180910390fd5b805161313890600e9060208401906144eb565b50600d805460ff191690556040516000805160206155c883398151915290610bfc90600e90614fad565b600080613175610100600185901b6152c4565b9150613187610100600185901b6153f7565b9050915091565b6001600160a01b0383166131b45760405162461bcd60e51b815260040161099790615148565b80518251146131d55760405162461bcd60e51b81526004016109979061520a565b60003390506131f8818560008686604051806020016040528060008152506138df565b60005b83518110156132dc57600084828151811061322657634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061325257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526006835260408082206001600160a01b038c1683529093529190912054909150818110156132a35760405162461bcd60e51b815260040161099790615076565b60009283526006602090815260408085206001600160a01b038b16865290915290922091039055806132d4816153bc565b9150506131fb565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615528833981519152868660405161331b929190614f4d565b60405180910390a450505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc54815b83811015610ef0576000806133e38787858181106133d757634e487b7160e01b600052603260045260246000fd5b90506020020135613162565b9150915084821461340d576000948552600560205260408086209490945581855292909320549183905b613419848260016140da565b9350856134278460016152ac565b141561343f5760008581526005602052604090208490555b5050808061344c906153bc565b9150506133a9565b816001600160a01b0316836001600160a01b031614156134c85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610997565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600d5460ff16600381111561355c57634e487b7160e01b600052602160045260246000fd5b1461357a57604051638ca755f560e01b815260040160405180910390fd5b600d805460ff191660021790556040516001815260008051602061560883398151915290602001612ab3565b6001600160a01b0384166135cc5760405162461bcd60e51b815260040161099790615103565b336135eb8187876135dc886140fc565b6135e5886140fc565b876138df565b60008481526006602090815260408083206001600160a01b038a1684529091529020548381101561362e5760405162461bcd60e51b81526004016109979061518b565b60008581526006602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061366d9084906152ac565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020615568833981519152910160405180910390a46130d6828888888888614155565b6001600160a01b0383166136e15760405162461bcd60e51b815260040161099790615148565b33613710818560006136f2876140fc565b6136fb876140fc565b604051806020016040528060008152506138df565b60008381526006602090815260408083206001600160a01b0388168452909152902054828110156137535760405162461bcd60e51b815260040161099790615076565b60008481526006602090815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020615568833981519152910160405180910390a45050505050565b6001600160a01b03841661380e5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610997565b3361381f816000876135dc886140fc565b60008481526006602090815260408083206001600160a01b0389168452909152812080548592906138519084906152ac565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020615568833981519152910160405180910390a4610ef081600087878787614155565b60006001600160e01b03198216636cdb3d1360e11b14806138d057506001600160e01b031982166303a24d0760e21b145b806109c557506109c582614226565b612c6c86868686868661425b565b6138ff846001600160a01b031661439f565b15612c6c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906139389089908990889088908890600401614e7e565b602060405180830381600087803b15801561395257600080fd5b505af1925050508015613982575060408051601f3d908101601f1916820190925261397f91810190614a96565b60015b613a2f5761398e61544d565b806308c379a014156139c857506139a3615465565b806139ae57506139ca565b8060405162461bcd60e51b81526004016109979190614f9a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610997565b6001600160e01b0319811663bc197c8160e01b146130d65760405162461bcd60e51b81526004016109979061502e565b60606000613a6e8360026152d8565b613a799060026152ac565b6001600160401b03811115613a9e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ac8576020820181803683370190505b509050600360fc1b81600081518110613af157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b2e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613b528460026152d8565b613b5d9060016152ac565b90505b6001811115613bf1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613b9f57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613bc357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613bea8161533e565b9050613b60565b50831561259a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610997565b600080825160411415613c775760208301516040840151606085015160001a613c6b878285856143ae565b94509450505050611148565b825160401415613ca15760208301516040840151613c96868383614491565b935093505050611148565b50600090506002611148565b6000816004811115613ccf57634e487b7160e01b600052602160045260246000fd5b1415613cd85750565b6001816004811115613cfa57634e487b7160e01b600052602160045260246000fd5b1415613d435760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610997565b6002816004811115613d6557634e487b7160e01b600052602160045260246000fd5b1415613db35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610997565b6003816004811115613dd557634e487b7160e01b600052602160045260246000fd5b1415613e2e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610997565b6004816004811115613e5057634e487b7160e01b600052602160045260246000fd5b1415610c845760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610997565b600080600080846001600160401b03811115613ed557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613efe578160200160208202803683370190505b50905060005b858160ff161015613f9957613f1c60ff8216876152ac565b60408051602081019290925281018890524460608201526080016040516020818303038152906040528051906020012060001c828260ff1681518110613f7257634e487b7160e01b600052603260045260246000fd5b63ffffffff9092166020928302919091019091015280613f91816153d7565b915050613f04565b50600080600080806000613fab612dc1565b92509250925060005b8b8110156140c657600085613fc9888a6152ac565b613fd391906152ac565b613fdd90846152f7565b9050600063ffffffff8016828b858151811061400957634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff1661402191906152d8565b61402b91906152c4565b905061403789876152f7565b8110156140505788614048816153bc565b9950506140b1565b61405a888a6152ac565b61406490866152f7565b81101561407d5787614075816153bc565b9850506140b1565b86614088898b6152ac565b61409291906152ac565b61409c90856152f7565b8110156140b157866140ad816153bc565b9750505b505080806140be906153bc565b915050613fb4565b50949b939a50919850919650505050505050565b6000816140ed576001831b1984166140f4565b6001831b84175b949350505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061414457634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b614167846001600160a01b031661439f565b15612c6c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141a09089908990889088908890600401614edc565b602060405180830381600087803b1580156141ba57600080fd5b505af19250505080156141ea575060408051601f3d908101601f191682019092526141e791810190614a96565b60015b6141f65761398e61544d565b6001600160e01b0319811663f23a6e6160e01b146130d65760405162461bcd60e51b81526004016109979061502e565b60006001600160e01b03198216637965db0b60e01b14806109c557506301ffc9a760e01b6001600160e01b03198316146109c5565b6001600160a01b0385166142fe5760005b83518110156142fc5782818151811061429557634e487b7160e01b600052603260045260246000fd5b6020026020010151600960008684815181106142c157634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546142e691906152ac565b909155506142f59050816153bc565b905061426c565b505b6001600160a01b038416612c6c5760005b83518110156130d65782818151811061433857634e487b7160e01b600052603260045260246000fd5b60200260200101516009600086848151811061436457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600082825461438991906152f7565b909155506143989050816153bc565b905061430f565b6001600160a01b03163b151590565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156143db5750600090506003614488565b8460ff16601b141580156143f357508460ff16601c14155b156144045750600090506004614488565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614458573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661448157600060019250925050614488565b9150600090505b94509492505050565b6000806001600160ff1b038316816144ae60ff86901c601b6152ac565b90506144bc878288856143ae565b935093505050935093915050565b5080546000825560020290600052602060002090810190610c84919061456f565b8280546144f790615355565b90600052602060002090601f016020900481019282614519576000855561455f565b82601f1061453257805160ff191683800117855561455f565b8280016001018555821561455f579182015b8281111561455f578251825591602001919060010190614544565b5061456b929150614595565b5090565b5b8082111561456b5780546001600160a01b031916815560006001820155600201614570565b5b8082111561456b5760008155600101614596565b60006001600160401b038311156145c3576145c3615437565b6040516145da601f8501601f191660200182615390565b8091508381528484840111156145ef57600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614617578081fd5b8135602061462482615289565b6040516146318282615390565b8381528281019150858301600585901b87018401881015614650578586fd5b855b8581101561466e57813584529284019290840190600101614652565b5090979650505050505050565b60008083601f84011261468c578182fd5b5081356001600160401b038111156146a2578182fd5b60208301915083602082850101111561114857600080fd5b600082601f8301126146ca578081fd5b61259a838335602085016145aa565b6000602082840312156146ea578081fd5b813561259a816154ee565b600060208284031215614706578081fd5b815161259a816154ee565b60008060408385031215614723578081fd5b823561472e816154ee565b9150602083013561473e816154ee565b809150509250929050565b600080600080600060a08688031215614760578081fd5b853561476b816154ee565b9450602086013561477b816154ee565b935060408601356001600160401b0380821115614796578283fd5b6147a289838a01614607565b945060608801359150808211156147b7578283fd5b6147c389838a01614607565b935060808801359150808211156147d8578283fd5b506147e5888289016146ba565b9150509295509295909350565b600080600080600060a08688031215614809578081fd5b8535614814816154ee565b94506020860135614824816154ee565b9350604086013592506060860135915060808601356001600160401b0381111561484c578182fd5b6147e5888289016146ba565b60008060006060848603121561486c578081fd5b8335614877816154ee565b925060208401356001600160401b0380821115614892578283fd5b61489e87838801614607565b935060408601359150808211156148b3578283fd5b506148c086828701614607565b9150509250925092565b600080604083850312156148dc578182fd5b82356148e7816154ee565b9150602083013561473e81615503565b60008060408385031215614909578182fd5b8235614914816154ee565b946020939093013593505050565b600080600060608486031215614936578081fd5b8335614941816154ee565b95602085013595506040909401359392505050565b60008060408385031215614968578182fd5b82356001600160401b038082111561497e578384fd5b818501915085601f830112614991578384fd5b8135602061499e82615289565b6040516149ab8282615390565b8381528281019150858301600585901b870184018b10156149ca578889fd5b8896505b848710156149f55780356149e1816154ee565b8352600196909601959183019183016149ce565b5096505086013592505080821115614a0b578283fd5b50614a1885828601614607565b9150509250929050565b600060208284031215614a33578081fd5b815161259a81615503565b600060208284031215614a4f578081fd5b5035919050565b60008060408385031215614a68578182fd5b82359150602083013561473e816154ee565b600060208284031215614a8b578081fd5b813561259a81615511565b600060208284031215614aa7578081fd5b815161259a81615511565b60008060008060008060808789031215614aca578384fd5b86356001600160401b0380821115614ae0578586fd5b614aec8a838b0161467b565b909850965060208901359550604089013594506060890135915080821115614b12578283fd5b818901915089601f830112614b25578283fd5b813581811115614b33578384fd5b8a60208260051b8501011115614b47578384fd5b6020830194508093505050509295509295509295565b600080600080600060808688031215614b74578283fd5b85356001600160401b03811115614b89578384fd5b614b958882890161467b565b9099909850602088013597604081013597506060013595509350505050565b600060208284031215614bc5578081fd5b81356001600160401b03811115614bda578182fd5b8201601f81018413614bea578182fd5b6140f4848235602084016145aa565b600060208284031215614c0a578081fd5b5051919050565b60008060408385031215614c23578182fd5b50508035926020909101359150565b600060208284031215614c43578081fd5b813563ffffffff8116811461259a578182fd5b6000815180845260208085019450808401835b83811015614c8557815187529582019590820190600101614c69565b509495945050505050565b60008151808452614ca881602086016020860161530e565b601f01601f19169290920160200192915050565b606086901b6001600160601b0319168152601481018590526034810184905260006001600160fb1b03831115614cf0578081fd5b8260051b808560548501379190910160540190815295945050505050565b6000808354614d1c81615355565b60018281168015614d345760018114614d4557614d71565b60ff19841687528287019450614d71565b8786526020808720875b85811015614d685781548a820152908401908201614d4f565b50505082870194505b50929695505050505050565b60008251614d8f81846020870161530e565b6c31b7b73a3930b1ba173539b7b760991b920191825250600d01919050565b60008251614dc081846020870161530e565b6e3a37b5b2b717bdb4b23e973539b7b760891b920191825250600f01919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351614e1381601785016020880161530e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614e4481602884016020880161530e565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0386811682528516602082015260a060408201819052600090614eaa90830186614c56565b8281036060840152614ebc8186614c56565b90508281036080840152614ed08185614c90565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614f1690830184614c90565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b60208152600061259a6020830184614c56565b604081526000614f606040830185614c56565b8281036020840152611a008185614c56565b6020810160048310614f9457634e487b7160e01b600052602160045260246000fd5b91905290565b60208152600061259a6020830184614c90565b60006020808352818454614fc081615355565b80848701526040600180841660008114614fe15760018114614ff557615020565b60ff19851689840152606089019550615020565b898852868820885b858110156150185781548b8201860152908301908801614ffd565b8a0184019650505b509398975050505050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006001600160401b038211156152a2576152a2615437565b5060051b60200190565b600082198211156152bf576152bf61540b565b500190565b6000826152d3576152d3615421565b500490565b60008160001904831182151516156152f2576152f261540b565b500290565b6000828210156153095761530961540b565b500390565b60005b83811015615329578181015183820152602001615311565b83811115615338576000848401525b50505050565b60008161534d5761534d61540b565b506000190190565b600181811c9082168061536957607f821691505b6020821081141561538a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156153b5576153b5615437565b6040525050565b60006000198214156153d0576153d061540b565b5060010190565b600060ff821660ff8114156153ee576153ee61540b565b60010192915050565b60008261540657615406615421565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561546257600481823e5160e01c5b90565b600060443d10156154735790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156154a257505050505090565b82850191508151818111156154ba5750505050505090565b843d87010160208285010111156154d45750505050505090565b6154e360208286010187615390565b509095945050505050565b6001600160a01b0381168114610c8457600080fd5b8015158114610c8457600080fd5b6001600160e01b031981168114610c8457600080fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9bfbaa59f8e10e7868f8b402de9d605a390c45ddaebd8c9de3c6f31e733c87ffc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6208037d7b151cc412d25674a4e66b334d9ae9d2e5517a7feaae5cdb828bf1c62871f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f73c24a7893680131e7c50fcccddb220f15bfc9f6968bef4235b6cc599404912417bc176d2408558f6e4111feebc3cab4e16b63e967be91cde721f4c8a488b552ff4a5dbbab6b1963d10f5edd139f33a7987ecb3c4f65969be77ddba28d946594a2646970667358221220ab79bb68df24ba47dbb4bbe0f65f9596d042465b6184b0e4246932fe89977af964736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb00000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad79460000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : signer_ (address): 0xd497c27C285E9D32cA316E8D9B4CCd735dEe4C15
Arg [1] : admin_ (address): 0x859010BaAD3E7f51A5EF1e43550056ea29542Fb0
Arg [2] : royaltyReceiver_ (address): 0x9C4a411Ba341Df1EE71f67B773605406B77E775D
Arg [3] : jungleContract_ (address): 0x4D648C35212273d638a5e602aB1177bB75aD7946
Arg [4] : jfgContract_ (address): 0x7E6Bc952d4b4bD814853301bEe48E99891424de0
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000d497c27c285e9d32ca316e8d9b4ccd735dee4c15
Arg [1] : 000000000000000000000000859010baad3e7f51a5ef1e43550056ea29542fb0
Arg [2] : 0000000000000000000000009c4a411ba341df1ee71f67b773605406b77e775d
Arg [3] : 0000000000000000000000004d648c35212273d638a5e602ab1177bb75ad7946
Arg [4] : 0000000000000000000000007e6bc952d4b4bd814853301bee48e99891424de0
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [6] : 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.