ERC-721
Overview
Max Total Supply
0 HXA
Holders
26
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 HXALoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HexArt
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 369 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: None pragma solidity ^0.8.1; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@uniswap/lib/contracts/libraries/TransferHelper.sol"; import "@openzeppelin/contracts/utils/Address.sol"; interface HexArtMarkets { function isListed(uint256 _tokenId) external view returns (bool); function distibuteRemovalFee() external payable; } 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); } interface ERC20 { function transfer(address to, uint256 value) external returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) external returns (bool success); } interface FeesCollector { function manageArtistFees(uint256 value) external returns (bool); } interface IWETH9 { function deposit() external payable; function withdraw(uint256 wad) external; } abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; modifier checkRoyaltyInfo(address receiver, uint256 feeNumerator) { require(receiver != address(0), "ERC2981: invalid receiver"); _; } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual checkRoyaltyInfo(receiver, feeNumerator) { require(tokenId > 0, "Token Id cannot be zero"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } } contract HexArt is ERC721URIStorage, ERC2981, Ownable { IWETH9 public weth; HexArtMarkets public marketplace; FeesCollector public feeCollector; struct NFTDetail { uint256 nftTokenId; address assettype; } struct ECR20Detail { uint256 balance; address assettype; } uint256 public counter = 0; uint256 constant amountToRemoveAsset = 369000000000000000; address internal _weth9; mapping(uint256 => address) internal initialOwner; mapping(uint256 => NFTDetail[]) internal nftAssetDetails; mapping(uint256 => ECR20Detail[]) internal erc20AssetDetails; mapping(address => bool) public whitelistedAddresses; mapping(uint256 => uint256) public assetLockPeriod; modifier onlyInitialOwner(uint256 _tokenId) { require( initialOwner[_tokenId] == _msgSender(), "Collection: only initial owner can set the royality" ); _; } modifier isWhitelisted(address _address) { require(whitelistedAddresses[_address], "Not have permission"); _; } modifier isNFTOwner(uint256 _nftTokenId) { require( ownerOf(_nftTokenId) == msg.sender, "Collection: caller is not owner nor approved" ); _; } modifier isNotListedOnSale(uint256 _tokenId) { require( !marketplace.isListed(_tokenId), "Cannot add/remove asset to a listed NFT" ); _; } modifier isBurnable(uint256 _tokenId) { NFTDetail[] memory array = getAssetsOfNFT(_tokenId); ECR20Detail[] memory array1 = getERC20AssetsOfNFT(_tokenId); require( (array.length == 0 && array1.length == 0), "Remove all attached asset from hexart before burning" ); _; } event nftMinted( uint256 tokenId, uint96 feeNumerator, uint256 lockperiodInDays, uint256 lockperiodInSec ); event assetAdded(uint256 parentNftId, NFTDetail[] _tokenIds); event assetRemoved( uint256 tokenId, uint256[] assetId, address assetContract ); event allAssetRemoved(uint256 _nftTokenId, NFTDetail[] array); event burnNFT(uint256 _hexartTokenId); event erc20AssetAdded( uint256 parentNFtId, address assetContract, uint256 balance ); event erc20AssetRemoved(uint256 parentNFtId, address assetContract); constructor(address _weth) ERC721("HEXART", "HXA") { weth = IWETH9(_weth); _weth9 = _weth; } receive() external payable {} /** * @notice Sets the royalty info for any token. */ function setRoyaltyforToken( uint256 _tokenId, address _receiver, uint96 _feeNumerator ) external onlyInitialOwner(_tokenId) { _setTokenRoyalty(_tokenId, _receiver, _feeNumerator); } /** * @notice Sets the marketplace address. */ function setMarketplace(address _marketplace) external onlyOwner { require( _marketplace != address(0), "Marketplace address cannot be zero." ); marketplace = HexArtMarkets(_marketplace); } /** * @notice Mints single token. * @param _tokenURI metadata URI * @param _feeNumerator royality percentage (this must be less than max limit) */ function mint( string memory _tokenURI, uint96 _feeNumerator, uint256 _lockperiodInDays ) external returns (uint256 tokenId) { require(msg.sender != address(0), "Collection: _to address not valid"); require( bytes(_tokenURI).length > 0, "Collection: Token URI is not valid" ); counter++; tokenId = counter; _safeMint(msg.sender, tokenId); _setTokenURI(tokenId, _tokenURI); if (_feeNumerator != 0) { _setTokenRoyalty(tokenId, msg.sender, _feeNumerator); } initialOwner[tokenId] = msg.sender; assetLockPeriod[tokenId] = block.timestamp + (86400 * _lockperiodInDays); // 86400 - for 1 day emit nftMinted( tokenId, _feeNumerator, _lockperiodInDays, assetLockPeriod[tokenId] ); } /** * @notice Burns token of entered token id. */ function burn(uint256 _tokenId) external isNFTOwner(_tokenId) isBurnable(_tokenId) isNotListedOnSale(_tokenId) { delete initialOwner[_tokenId]; delete assetLockPeriod[_tokenId]; _burn(_tokenId); emit burnNFT(_tokenId); } /** * @notice Attach NFT(HSI) assets to a given hexart. * @param _assetContract , NFT asset contract address. * @param _tokenIds, Array of asset(HSI) token Ids * @param _tokenId, Hexart token ID. */ function addNFTAsset( address _assetContract, uint256[] calldata _tokenIds, uint256 _tokenId ) external isWhitelisted(_assetContract) isNFTOwner(_tokenId) isNotListedOnSale(_tokenId) { for (uint256 i = 0; i < _tokenIds.length; i++) { ERC721(_assetContract).transferFrom( msg.sender, address(this), _tokenIds[i] ); require( ERC721(_assetContract).ownerOf(_tokenIds[i]) == address(this), "Asset not added" ); nftAssetDetails[_tokenId].push( NFTDetail({nftTokenId: _tokenIds[i], assettype: _assetContract}) ); } emit assetAdded(_tokenId, nftAssetDetails[_tokenId]); } /** * @notice Remove NFT(HSI) assets to a given hexart. * @param _assetContract , NFT asset contract address. * @param _assetId, Array of asset(HSI) token Ids * @param _nftTokenId, Hexart token ID. */ function removeNFTAsset( uint256 _nftTokenId, uint256[] calldata _assetId, address _assetContract ) external isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require( isLockPeriodOver(_nftTokenId), "Lock period asset is not over." ); removeNFT(_nftTokenId, _assetId, _assetContract); emit assetRemoved(_nftTokenId, _assetId, _assetContract); } /** * @notice Remove NFT(HSI) assets to a given hexart. * @param _assetContract , NFT asset contract address. * @param _assetId, Array of asset(HSI) token Ids * @param _nftTokenId, Hexart token ID. */ function removeNFTPayable( uint256 _nftTokenId, uint256[] calldata _assetId, address _assetContract ) external payable isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require( msg.value >= (amountToRemoveAsset * _assetId.length), "Not enough funds sent" ); require(!isLockPeriodOver(_nftTokenId), "Lock period is over"); marketplace.distibuteRemovalFee{value: msg.value}(); removeNFT(_nftTokenId, _assetId, _assetContract); emit assetRemoved(_nftTokenId, _assetId, _assetContract); } /** * @notice Payable function to remove all NFT(HSI) assets to a given hexart. * @param _nftTokenId, Hexart token ID. */ function removeAllNFTAssetsPayable(uint256 _nftTokenId) external payable isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require(!isLockPeriodOver(_nftTokenId), "Lock period is over"); NFTDetail[] memory array = getAssetsOfNFT(_nftTokenId); require( msg.value >= (amountToRemoveAsset * array.length), "Not enough funds sent" ); marketplace.distibuteRemovalFee{value: msg.value}(); removeAllNFT(_nftTokenId); } /** * @notice Function to remove all NFT(HSI) assets to a given hexart. * @param _nftTokenId, Hexart token ID. */ function removeAllNFTAssets(uint256 _nftTokenId) external isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require(isLockPeriodOver(_nftTokenId), "Lock period is not over"); removeAllNFT(_nftTokenId); } /** * @notice Attach ERC-20 assets to a given hexart. * @param _assetContract , ERC-20 asset contract address. * @param _amount, Amount of erc-20 tokens. * @param _tokenId, Hexart token ID. */ function addErc20Asset( address _assetContract, uint256 _tokenId, uint256 _amount ) external payable isWhitelisted(_assetContract) isNFTOwner(_tokenId) isNotListedOnSale(_tokenId) { bool check = false; if (_assetContract == _weth9) { weth.deposit{value: msg.value}(); } else { TransferHelper.safeTransferFrom( _assetContract, _msgSender(), address(this), _amount ); } for (uint256 i = 0; i < erc20AssetDetails[_tokenId].length; i++) { if (erc20AssetDetails[_tokenId][i].assettype == _assetContract) { erc20AssetDetails[_tokenId][i].balance += _amount; check = true; break; } } if (!check) { erc20AssetDetails[_tokenId].push( ECR20Detail({balance: _amount, assettype: _assetContract}) ); } emit erc20AssetAdded(_tokenId, _assetContract, _amount); } /** * @notice Remove erc-20 assets from a given hexart. * @param _assetContract , ERC-20 asset contract address. * @param _nftTokenId, Hexart token ID. */ function removeErc20Asset(address _assetContract, uint256 _nftTokenId) external isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require(isLockPeriodOver(_nftTokenId), "Lock period is not over"); removeErc20(_assetContract, _nftTokenId); emit erc20AssetRemoved(_nftTokenId, _assetContract); } /** * @notice Remove(payable) erc-20 assets from a given hexart. * @param _assetContract , ERC-20 asset contract address. * @param _nftTokenId, Hexart token ID. */ function removeErc20Assetpayable( address _assetContract, uint256 _nftTokenId ) external payable isNFTOwner(_nftTokenId) isNotListedOnSale(_nftTokenId) { require(msg.value >= amountToRemoveAsset, "Not enough funds sent"); require(!isLockPeriodOver(_nftTokenId), "Lock period is not over"); marketplace.distibuteRemovalFee{value: msg.value}(); removeErc20(_assetContract, _nftTokenId); emit erc20AssetRemoved(_nftTokenId, _assetContract); } /** * @notice Transfers token from 'from' address to 'to' address. * @param _tokenId, Hexart token ID. * @param _from, From address. * @param _to,To address. */ function transferNFT( uint256 _tokenId, address _from, address _to ) external returns (bool) { _transfer(_from, _to, _tokenId); return true; } /** @notice Add asset address to the whitelist. @param _addressToWhitelist, Address to whitelist. */ function addAssetToWhitelist(address _addressToWhitelist) external { require( Address.isContract(_addressToWhitelist), "Only contract address are allowed" ); require( _addressToWhitelist != address(0), "Zero address is not allowed" ); whitelistedAddresses[_addressToWhitelist] = true; } /** @notice Remove asset address to the whitelist. @param _addressToWhitelist, Address to whitelist. */ function removeAssetFromWhitelist(address _addressToWhitelist) external onlyOwner { require( _addressToWhitelist != address(0), "Zero address is not allowed" ); whitelistedAddresses[_addressToWhitelist] = false; } /** * @dev returns true if the contract supports the interface with entered bytecode. * @dev 0x2a55205a to test eip 2981 */ function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Returns an array of NFT assets associated with a hexart. */ function getAssetsOfNFT(uint256 _tokenId) public view returns (NFTDetail[] memory) { require(_tokenId > 0, "Token Id cannot be zero"); return nftAssetDetails[_tokenId]; } /** * @notice Returns an array of ERC-20 assets associated with a hexart. */ function getERC20AssetsOfNFT(uint256 _tokenId) public view returns (ECR20Detail[] memory) { require(_tokenId > 0, "Token Id cannot be zero"); return erc20AssetDetails[_tokenId]; } /** * @notice To check the lock period . * @param _nftTokenId, Hexart token ID. * @return check, bool */ function isLockPeriodOver(uint256 _nftTokenId) public view returns (bool) { bool check = block.timestamp >= assetLockPeriod[_nftTokenId]; return check; } /** * @notice Remove NFT assets associated with a NFT. * @param index, Blockchain index of asset. * @param _tokenId , Hexart token ID. */ function removeAssetToken(uint256 index, uint256 _tokenId) internal { if (index < nftAssetDetails[_tokenId].length - 1) { nftAssetDetails[_tokenId][index] = nftAssetDetails[_tokenId][ nftAssetDetails[_tokenId].length - 1 ]; } nftAssetDetails[_tokenId].pop(); } /** * @notice Remove NFT assets associated with a NFT. * @param index, Blockchain index of asset. * @param _tokenId , Hexart token ID. */ function removeErcAssetToken(uint256 index, uint256 _tokenId) internal { if (index < erc20AssetDetails[_tokenId].length - 1) { erc20AssetDetails[_tokenId][index] = erc20AssetDetails[_tokenId][ erc20AssetDetails[_tokenId].length - 1 ]; } erc20AssetDetails[_tokenId].pop(); } /** * @notice Transfer NFT assets associated with a NFT. * @param _nftContract,NFT asset contract address. * @param _assetId ,NFT asset token ID. */ function transferAsset(address _nftContract, uint256 _assetId) internal { ERC721(_nftContract).transferFrom(address(this), msg.sender, _assetId); require( ERC721(_nftContract).ownerOf(_assetId) == msg.sender, "Asset not removed" ); } /** * @notice To check if asset is attached to any given hexart. * @param _assetContract , NFT asset contract address. * @param _assetId, Array of asset(HSI) token Ids * @param _nftTokenId, Hexart token ID. * @return check assetIndex */ function isAssetAttached( uint256 _nftTokenId, uint256 _assetId, address _assetContract ) internal view returns (bool, uint256) { bool check; uint256 assetIndex; NFTDetail[] memory array = getAssetsOfNFT(_nftTokenId); for (uint256 i = 0; i < array.length; i++) { if ( array[i].nftTokenId == _assetId && array[i].assettype == _assetContract ) { check = true; assetIndex = i; break; } } if (!check) { revert("Given Asset Id is not attached to this NFT"); } return (check, assetIndex); } /** * @notice To check if asset is attached to any given hexart. * @param _assetContract , NFT asset contract address. * @param _nftTokenId, Hexart token ID. * @return check assetIndex */ function isErcAssetAttached(uint256 _nftTokenId, address _assetContract) internal view returns (bool, uint256) { bool check; uint256 assetIndex; ECR20Detail[] memory array = getERC20AssetsOfNFT(_nftTokenId); require(array.length > 0, "No asset is attached to this hexart"); for (uint256 i = 0; i < array.length; i++) { if (array[i].assettype == _assetContract) { check = true; assetIndex = i; break; } } if (!check) { revert("Given Asset is not attached to this NFT"); } return (check, assetIndex); } /** * @notice Remove(internal) erc-20 assets from a given hexart. * @param _assetContract , ERC-20 asset contract address. * @param _nftTokenId, Hexart token ID. */ function removeErc20(address _assetContract, uint256 _nftTokenId) internal { (bool check, uint256 index) = isErcAssetAttached( _nftTokenId, _assetContract ); if (check) { if (_assetContract == _weth9) { weth.withdraw(erc20AssetDetails[_nftTokenId][index].balance); payable(_msgSender()).transfer( erc20AssetDetails[_nftTokenId][index].balance ); } else { TransferHelper.safeTransfer( _assetContract, _msgSender(), erc20AssetDetails[_nftTokenId][index].balance ); } removeErcAssetToken(index, _nftTokenId); } } /** * @notice Internal function to remove all NFT(HSI) assets to a given hexart. * @param _nftTokenId, Hexart token ID. */ function removeAllNFT(uint256 _nftTokenId) internal { NFTDetail[] memory array = getAssetsOfNFT(_nftTokenId); require(array.length > 0, "No asset is attached to the given NFT."); for (uint256 i = 0; i < array.length; i++) { transferAsset(array[i].assettype, array[i].nftTokenId); removeAssetToken(i, _nftTokenId); } emit allAssetRemoved(_nftTokenId, array); } /** * @notice Internal function to remove NFT(HSI) assets to a given hexart. * @param _assetContract , NFT asset contract address. * @param _assetId, Array of asset(HSI) token Ids * @param _nftTokenId, Hexart token ID. */ function removeNFT( uint256 _nftTokenId, uint256[] calldata _assetId, address _assetContract ) internal { NFTDetail[] memory array = getAssetsOfNFT(_nftTokenId); require(array.length > 0, "No asset is attached to the given NFT."); for (uint256 i = 0; i < _assetId.length; i++) { (bool check, uint256 index) = isAssetAttached( _nftTokenId, _assetId[i], _assetContract ); if (check) { transferAsset(_assetContract, _assetId[i]); removeAssetToken(index, _nftTokenId); } } } }
// 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/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 369 }, "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":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_nftTokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"address","name":"assettype","type":"address"}],"indexed":false,"internalType":"struct HexArt.NFTDetail[]","name":"array","type":"tuple[]"}],"name":"allAssetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"parentNftId","type":"uint256"},{"components":[{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"address","name":"assettype","type":"address"}],"indexed":false,"internalType":"struct HexArt.NFTDetail[]","name":"_tokenIds","type":"tuple[]"}],"name":"assetAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"assetId","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"assetContract","type":"address"}],"name":"assetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_hexartTokenId","type":"uint256"}],"name":"burnNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"parentNFtId","type":"uint256"},{"indexed":false,"internalType":"address","name":"assetContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"erc20AssetAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"parentNFtId","type":"uint256"},{"indexed":false,"internalType":"address","name":"assetContract","type":"address"}],"name":"erc20AssetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"},{"indexed":false,"internalType":"uint256","name":"lockperiodInDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockperiodInSec","type":"uint256"}],"name":"nftMinted","type":"event"},{"inputs":[{"internalType":"address","name":"_addressToWhitelist","type":"address"}],"name":"addAssetToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_assetContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addErc20Asset","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_assetContract","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"addNFTAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assetLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"contract FeesCollector","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getAssetsOfNFT","outputs":[{"components":[{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"address","name":"assettype","type":"address"}],"internalType":"struct HexArt.NFTDetail[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getERC20AssetsOfNFT","outputs":[{"components":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"address","name":"assettype","type":"address"}],"internalType":"struct HexArt.ECR20Detail[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftTokenId","type":"uint256"}],"name":"isLockPeriodOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplace","outputs":[{"internalType":"contract HexArtMarkets","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"},{"internalType":"uint256","name":"_lockperiodInDays","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftTokenId","type":"uint256"}],"name":"removeAllNFTAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftTokenId","type":"uint256"}],"name":"removeAllNFTAssetsPayable","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_addressToWhitelist","type":"address"}],"name":"removeAssetFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_assetContract","type":"address"},{"internalType":"uint256","name":"_nftTokenId","type":"uint256"}],"name":"removeErc20Asset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_assetContract","type":"address"},{"internalType":"uint256","name":"_nftTokenId","type":"uint256"}],"name":"removeErc20Assetpayable","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftTokenId","type":"uint256"},{"internalType":"uint256[]","name":"_assetId","type":"uint256[]"},{"internalType":"address","name":"_assetContract","type":"address"}],"name":"removeNFTAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftTokenId","type":"uint256"},{"internalType":"uint256[]","name":"_assetId","type":"uint256[]"},{"internalType":"address","name":"_assetContract","type":"address"}],"name":"removeNFTPayable","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketplace","type":"address"}],"name":"setMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setRoyaltyforToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"transferNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH9","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526000600d553480156200001657600080fd5b5060405162004c2a38038062004c2a8339810160408190526200003991620001e1565b604080518082018252600681526512115610549560d21b60208083019182528351808501909452600384526248584160e81b90840152815191929162000082916000916200013b565b508051620000989060019060208401906200013b565b505050620000b5620000af620000e560201b60201c565b620000e9565b600a80546001600160a01b039092166001600160a01b03199283168117909155600e80549092161790556200024f565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001499062000213565b90600052602060002090601f0160209004810192826200016d5760008555620001b8565b82601f106200018857805160ff1916838001178555620001b8565b82800160010185558215620001b8579182015b82811115620001b85782518255916020019190600101906200019b565b50620001c6929150620001ca565b5090565b5b80821115620001c65760008155600101620001cb565b600060208284031215620001f457600080fd5b81516001600160a01b03811681146200020c57600080fd5b9392505050565b600181811c908216806200022857607f821691505b6020821081036200024957634e487b7160e01b600052602260045260246000fd5b50919050565b6149cb806200025f6000396000f3fe60806040526004361061025a5760003560e01c806373ad6c2d11610149578063b4f82c6f116100c6578063e4326a481161008a578063f2fde38b11610064578063f2fde38b146107ab578063fc01c976146107cb578063fe0c2b97146107eb57600080fd5b8063e4326a4814610722578063e985e9c514610742578063eca7b6811461078b57600080fd5b8063b4f82c6f14610682578063b88d4fde14610695578063c415b95c146106b5578063c87b56dd146106d5578063e0c793c0146106f557600080fd5b806398b7e3121161010d57806398b7e312146105c557806398d2e70c146105f2578063a22cb46514610622578063a2a3fa4514610642578063abc8c7af1461066257600080fd5b806373ad6c2d1461053f578063807e9bae1461055f5780638cadf0061461057f5780638da5cb5b1461059257806395d89b41146105b057600080fd5b80633fc8cef3116101d75780635a0dd88d1161019b5780635a0dd88d146104b357806361bc221a146104c65780636352211e146104ea57806370a082311461050a578063715018a61461052a57600080fd5b80633fc8cef31461041357806342842e0e1461043357806342966c6814610453578063491a9cf3146104735780635970678c1461049357600080fd5b8063095ea7b31161021e578063095ea7b31461034757806323b872dd146103675780632a55205a146103875780632aafe132146103c6578063393f26d6146103e657600080fd5b806301ffc9a71461026657806306c933d81461029b57806306fdde03146102cb578063074f22c2146102ed578063081812fc1461030f57600080fd5b3661026157005b600080fd5b34801561027257600080fd5b50610286610281366004613fe2565b6107fe565b60405190151581526020015b60405180910390f35b3480156102a757600080fd5b506102866102b6366004614014565b60126020526000908152604090205460ff1681565b3480156102d757600080fd5b506102e061080f565b6040516102929190614089565b3480156102f957600080fd5b5061030d6103083660046140e1565b6108a1565b005b34801561031b57600080fd5b5061032f61032a36600461413d565b610c19565b6040516001600160a01b039091168152602001610292565b34801561035357600080fd5b5061030d610362366004614156565b610cae565b34801561037357600080fd5b5061030d610382366004614182565b610dc3565b34801561039357600080fd5b506103a76103a23660046141c3565b610e3e565b604080516001600160a01b039093168352602083019190915201610292565b3480156103d257600080fd5b506102866103e13660046141e5565b610eec565b3480156103f257600080fd5b5061040661040136600461413d565b610f03565b604051610292919061427f565b34801561041f57600080fd5b50600a5461032f906001600160a01b031681565b34801561043f57600080fd5b5061030d61044e366004614182565b610fcb565b34801561045f57600080fd5b5061030d61046e36600461413d565b610fe6565b34801561047f57600080fd5b5061030d61048e366004614014565b6111aa565b34801561049f57600080fd5b5061030d6104ae36600461413d565b61127b565b61030d6104c1366004614292565b611397565b3480156104d257600080fd5b506104dc600d5481565b604051908152602001610292565b3480156104f657600080fd5b5061032f61050536600461413d565b6115a8565b34801561051657600080fd5b506104dc610525366004614014565b61161f565b34801561053657600080fd5b5061030d6116a6565b34801561054b57600080fd5b5061030d61055a366004614014565b61170c565b34801561056b57600080fd5b5061030d61057a36600461430d565b6117ea565b61030d61058d36600461413d565b611889565b34801561059e57600080fd5b506009546001600160a01b031661032f565b3480156105bc57600080fd5b506102e0611a72565b3480156105d157600080fd5b506104dc6105e036600461413d565b60136020526000908152604090205481565b3480156105fe57600080fd5b5061028661060d36600461413d565b60009081526013602052604090205442101590565b34801561062e57600080fd5b5061030d61063d366004614359565b611a81565b34801561064e57600080fd5b5061030d61065d366004614156565b611a90565b34801561066e57600080fd5b50600b5461032f906001600160a01b031681565b61030d610690366004614156565b611bf4565b3480156106a157600080fd5b5061030d6106b036600461441e565b611dc9565b3480156106c157600080fd5b50600c5461032f906001600160a01b031681565b3480156106e157600080fd5b506102e06106f036600461413d565b611e45565b34801561070157600080fd5b5061071561071036600461413d565b611fcb565b604051610292919061449e565b34801561072e57600080fd5b5061030d61073d366004614014565b612085565b34801561074e57600080fd5b5061028661075d3660046144fe565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561079757600080fd5b506104dc6107a636600461452c565b612160565b3480156107b757600080fd5b5061030d6107c6366004614014565b612306565b3480156107d757600080fd5b5061030d6107e6366004614292565b6123d1565b61030d6107f9366004614597565b6124f6565b60006108098261281f565b92915050565b60606000805461081e906145cc565b80601f016020809104026020016040519081016040528092919081815260200182805461084a906145cc565b80156108975780601f1061086c57610100808354040283529160200191610897565b820191906000526020600020905b81548152906001019060200180831161087a57829003601f168201915b5050505050905090565b6001600160a01b038416600090815260126020526040902054849060ff166109065760405162461bcd60e51b81526020600482015260136024820152722737ba103430bb32903832b936b4b9b9b4b7b760691b60448201526064015b60405180910390fd5b8133610911826115a8565b6001600160a01b0316146109375760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810185905284916001600160a01b03169063fcce488390602401602060405180830381865afa158015610980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a49190614652565b156109c15760405162461bcd60e51b81526004016108fd9061466f565b60005b85811015610bc757876001600160a01b03166323b872dd33308a8a868181106109ef576109ef6146b6565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610a4657600080fd5b505af1158015610a5a573d6000803e3d6000fd5b5030925050506001600160a01b038916636352211e898985818110610a8157610a816146b6565b905060200201356040518263ffffffff1660e01b8152600401610aa691815260200190565b602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae791906146cc565b6001600160a01b031614610b2f5760405162461bcd60e51b815260206004820152600f60248201526e105cdcd95d081b9bdd081859191959608a1b60448201526064016108fd565b601060008681526020019081526020016000206040518060400160405280898985818110610b5f57610b5f6146b6565b602090810292909201358352506001600160a01b038c81169282019290925283546001808201865560009586529482902084516002909202019081559201519190920180546001600160a01b0319169190921617905580610bbf816146ff565b9150506109c4565b506000848152601060205260409081902090517f8d3aeefd7491d6eb8b8c31a3a65ac72bbbc8ad5233cb25f93f03826b3d583e7091610c0891879190614718565b60405180910390a150505050505050565b6000818152600260205260408120546001600160a01b0316610c925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108fd565b506000908152600460205260409020546001600160a01b031690565b6000610cb9826115a8565b9050806001600160a01b0316836001600160a01b031603610d265760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108fd565b336001600160a01b0382161480610d425750610d42813361075d565b610db45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108fd565b610dbe8383612844565b505050565b610dcd33826128b2565b610e335760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108fd565b610dbe8383836129a8565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610eb35750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610ed2906001600160601b03168761477f565b610edc91906147b4565b91519350909150505b9250929050565b6000610ef98383866129a8565b5060019392505050565b606060008211610f4f5760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b600082815260106020908152604080832080548251818502810185019093528083529193909284015b82821015610fc05760008481526020908190206040805180820190915260028502909101805482526001908101546001600160a01b0316828401529083529092019101610f78565b505050509050919050565b610dbe83838360405180602001604052806000815250611dc9565b8033610ff1826115a8565b6001600160a01b0316146110175760405162461bcd60e51b81526004016108fd90614606565b81600061102382610f03565b9050600061103083611fcb565b90508151600014801561104257508051155b6110b45760405162461bcd60e51b815260206004820152603460248201527f52656d6f766520616c6c2061747461636865642061737365742066726f6d206860448201527f6578617274206265666f7265206275726e696e6700000000000000000000000060648201526084016108fd565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa1580156110fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111219190614652565b1561113e5760405162461bcd60e51b81526004016108fd9061466f565b6000868152600f6020908152604080832080546001600160a01b0319169055601390915281205561116e86612b44565b6040518681527f2890e0d7ee71a164375468b2abf266f4f87d415291cdd95f3225b09f3a8a71c0906020015b60405180910390a1505050505050565b6009546001600160a01b031633146112045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b03811661125a5760405162461bcd60e51b815260206004820152601b60248201527f5a65726f2061646472657373206973206e6f7420616c6c6f776564000000000060448201526064016108fd565b6001600160a01b03166000908152601260205260409020805460ff19169055565b8033611286826115a8565b6001600160a01b0316146112ac5760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113199190614652565b156113365760405162461bcd60e51b81526004016108fd9061466f565b60008381526013602052604090205442101561138e5760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b610dbe83612b84565b83336113a2826115a8565b6001600160a01b0316146113c85760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa158015611411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114359190614652565b156114525760405162461bcd60e51b81526004016108fd9061466f565b6114648467051ef38b821e800061477f565b3410156114ab5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b60008681526013602052604090205442106114fe5760405162461bcd60e51b81526020600482015260136024820152722637b1b5903832b934b7b21034b99037bb32b960691b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b505050505061157386868686612c9b565b7fc50c0c4ae7bee9728332f9648f9450829bfffed675d324662481686e328a21598686868660405161119a94939291906147c8565b6000818152600260205260408120546001600160a01b0316806108095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108fd565b60006001600160a01b03821661168a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108fd565b506001600160a01b031660009081526003602052604090205490565b6009546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b61170a6000612d8c565b565b6009546001600160a01b031633146117665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b0381166117c85760405162461bcd60e51b815260206004820152602360248201527f4d61726b6574706c61636520616464726573732063616e6e6f74206265207a6560448201526239379760e91b60648201526084016108fd565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000838152600f602052604090205483906001600160a01b031633146118785760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e3a206f6e6c7920696e697469616c206f776e6572206360448201527f616e207365742074686520726f79616c6974790000000000000000000000000060648201526084016108fd565b611883848484612dde565b50505050565b8033611894826115a8565b6001600160a01b0316146118ba5760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190614652565b156119445760405162461bcd60e51b81526004016108fd9061466f565b60008381526013602052604090205442106119975760405162461bcd60e51b81526020600482015260136024820152722637b1b5903832b934b7b21034b99037bb32b960691b60448201526064016108fd565b60006119a284610f03565b9050805167051ef38b821e80006119b9919061477f565b341015611a005760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050505061188384612b84565b60606001805461081e906145cc565b611a8c338383612ed5565b5050565b8033611a9b826115a8565b6001600160a01b031614611ac15760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e9190614652565b15611b4b5760405162461bcd60e51b81526004016108fd9061466f565b600083815260136020526040902054421015611ba35760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b611bad8484612fa3565b604080518481526001600160a01b03861660208201527fd45fbe44309e04fde0648369a89a1b75b72c68a37f5ad8a4d4498ba1555a4206910160405180910390a150505050565b8033611bff826115a8565b6001600160a01b031614611c255760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611c6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c929190614652565b15611caf5760405162461bcd60e51b81526004016108fd9061466f565b67051ef38b821e8000341015611cff5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b6000838152601360205260409020544210611d565760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611da657600080fd5b505af1158015611dba573d6000803e3d6000fd5b5050505050611bad8484612fa3565b611dd333836128b2565b611e395760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108fd565b61188384848484613123565b6000818152600260205260409020546060906001600160a01b0316611ec65760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016108fd565b60008281526006602052604081208054611edf906145cc565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0b906145cc565b8015611f585780601f10611f2d57610100808354040283529160200191611f58565b820191906000526020600020905b815481529060010190602001808311611f3b57829003601f168201915b505050505090506000611f7660408051602081019091526000815290565b90508051600003611f88575092915050565b815115611fba578082604051602001611fa2929190614822565b60405160208183030381529060405292505050919050565b611fc384613156565b949350505050565b6060600082116120175760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b600082815260116020908152604080832080548251818502810185019093528083529193909284018215610fc05760008481526020908190206040805180820190915260028502909101805482526001908101546001600160a01b0316828401529083529092019101610f78565b6001600160a01b0381163b6120e65760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920636f6e747261637420616464726573732061726520616c6c6f77656044820152601960fa1b60648201526084016108fd565b6001600160a01b03811661213c5760405162461bcd60e51b815260206004820152601b60248201527f5a65726f2061646472657373206973206e6f7420616c6c6f776564000000000060448201526064016108fd565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000336121b95760405162461bcd60e51b815260206004820152602160248201527f436f6c6c656374696f6e3a205f746f2061646472657373206e6f742076616c696044820152601960fa1b60648201526084016108fd565b60008451116122155760405162461bcd60e51b815260206004820152602260248201527f436f6c6c656374696f6e3a20546f6b656e20555249206973206e6f742076616c6044820152611a5960f21b60648201526084016108fd565b600d8054906000612225836146ff565b9190505550600d549050612239338261323e565b6122438185613258565b6001600160601b0383161561225d5761225d813385612dde565b6000818152600f6020526040902080546001600160a01b03191633179055612288826201518061477f565b6122929042614851565b60008281526013602052604090819020829055517f0f42586b57d850ff5f142c258e1f26c2045701b17f9622559b37085183a9ce73916122f791849187918791909384526001600160601b039290921660208401526040830152606082015260800190565b60405180910390a19392505050565b6009546001600160a01b031633146123605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b0381166123c55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108fd565b6123ce81612d8c565b50565b83336123dc826115a8565b6001600160a01b0316146124025760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa15801561244b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246f9190614652565b1561248c5760405162461bcd60e51b81526004016108fd9061466f565b6000868152601360205260409020544210156124ea5760405162461bcd60e51b815260206004820152601e60248201527f4c6f636b20706572696f64206173736574206973206e6f74206f7665722e000060448201526064016108fd565b61157386868686612c9b565b6001600160a01b038316600090815260126020526040902054839060ff166125565760405162461bcd60e51b81526020600482015260136024820152722737ba103430bb32903832b936b4b9b9b4b7b760691b60448201526064016108fd565b8233612561826115a8565b6001600160a01b0316146125875760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810186905285916001600160a01b03169063fcce488390602401602060405180830381865afa1580156125d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f49190614652565b156126115760405162461bcd60e51b81526004016108fd9061466f565b600e546000906001600160a01b039081169088160361269857600a60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561267a57600080fd5b505af115801561268e573d6000803e3d6000fd5b50505050506126a4565b6126a4873330886132f2565b60005b60008781526011602052604090205481101561276f57600087815260116020526040902080546001600160a01b038a169190839081106126e9576126e96146b6565b60009182526020909120600160029092020101546001600160a01b03160361275d57600087815260116020526040902080548791908390811061272e5761272e6146b6565b9060005260206000209060020201600001600082825461274e9190614851565b909155506001925061276f9050565b80612767816146ff565b9150506126a7565b50806127d957600086815260116020908152604080832081518083019092528882526001600160a01b038b8116838501908152825460018082018555938752949095209251600290940290920192835592519190920180546001600160a01b031916919092161790555b604080518781526001600160a01b03891660208201529081018690527ffa60fc947b1e1e165107874bba24d31badae55d46af30e47e672e22656fe0b7290606001610c08565b60006001600160e01b0319821663152a902d60e11b1480610809575061080982613428565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612879826115a8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661292b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108fd565b6000612936836115a8565b9050806001600160a01b0316846001600160a01b0316148061297d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611fc35750836001600160a01b031661299684610c19565b6001600160a01b031614949350505050565b826001600160a01b03166129bb826115a8565b6001600160a01b031614612a1f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108fd565b6001600160a01b038216612a815760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108fd565b612a8c600082612844565b6001600160a01b0383166000908152600360205260408120805460019290612ab5908490614869565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ae3908490614851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612b4d81613478565b60008181526006602052604090208054612b66906145cc565b1590506123ce5760008181526006602052604081206123ce91613ef9565b6000612b8f82610f03565b90506000815111612bf15760405162461bcd60e51b815260206004820152602660248201527f4e6f20617373657420697320617474616368656420746f207468652067697665604482015265371027232a1760d11b60648201526084016108fd565b60005b8151811015612c5d57612c41828281518110612c1257612c126146b6565b602002602001015160200151838381518110612c3057612c306146b6565b602002602001015160000151613513565b612c4b818461362e565b80612c55816146ff565b915050612bf4565b507ff9683d45d75a732f02cc8b9a7ef71511f9930a42b8a12e8405b3aac20f6f87408282604051612c8f929190614880565b60405180910390a15050565b6000612ca685610f03565b90506000815111612d085760405162461bcd60e51b815260206004820152602660248201527f4e6f20617373657420697320617474616368656420746f207468652067697665604482015265371027232a1760d11b60648201526084016108fd565b60005b83811015612d8457600080612d3988888886818110612d2c57612d2c6146b6565b9050602002013587613735565b915091508115612d6f57612d6585888886818110612d5957612d596146b6565b90506020020135613513565b612d6f818961362e565b50508080612d7c906146ff565b915050612d0b565b505050505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160601b0382166001600160a01b038216612e3f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108fd565b60008511612e895760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b50506040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600890529190942093519051909116600160a01b029116179055565b816001600160a01b0316836001600160a01b031603612f365760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108fd565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080612fb0838561383f565b91509150811561188357600e546001600160a01b03908116908516036130dd57600a54600084815260116020526040902080546001600160a01b0390921691632e1a7d4d919084908110613006576130066146b6565b9060005260206000209060020201600001546040518263ffffffff1660e01b815260040161303691815260200190565b600060405180830381600087803b15801561305057600080fd5b505af1158015613064573d6000803e3d6000fd5b5050505061306f3390565b6001600160a01b03166108fc60116000868152602001908152602001600020838154811061309f5761309f6146b6565b600091825260208220600290910201546040518115909302929091818181858888f193505050501580156130d7573d6000803e3d6000fd5b50613119565b61311984336000868152601160205260409020805485908110613102576131026146b6565b906000526020600020906002020160000154613979565b6118838184613aaa565b61312e8484846129a8565b61313a84848484613b82565b6118835760405162461bcd60e51b81526004016108fd90614899565b6000818152600260205260409020546060906001600160a01b03166131d55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108fd565b60006131ec60408051602081019091526000815290565b9050600081511161320c5760405180602001604052806000815250613237565b8061321684613c83565b604051602001613227929190614822565b6040516020818303038152906040525b9392505050565b611a8c828260405180602001604052806000815250613d84565b6000828152600260205260409020546001600160a01b03166132d35760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016108fd565b60008281526006602090815260409091208251610dbe92840190613f33565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161335691906148f6565b6000604051808303816000865af19150503d8060008114613393576040519150601f19603f3d011682016040523d82523d6000602084013e613398565b606091505b50915091508180156133c25750805115806133c25750808060200190518101906133c29190614652565b612d845760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604482015270185b9cd9995c919c9bdb4819985a5b1959607a1b60648201526084016108fd565b60006001600160e01b031982166380ac58cd60e01b148061345957506001600160e01b03198216635b5e139f60e01b145b8061080957506301ffc9a760e01b6001600160e01b0319831614610809565b6000613483826115a8565b9050613490600083612844565b6001600160a01b03811660009081526003602052604081208054600192906134b9908490614869565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561356157600080fd5b505af1158015613575573d6000803e3d6000fd5b50506040516331a9108f60e11b8152600481018490523392506001600160a01b0385169150636352211e90602401602060405180830381865afa1580156135c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135e491906146cc565b6001600160a01b031614611a8c5760405162461bcd60e51b8152602060048201526011602482015270105cdcd95d081b9bdd081c995b5bdd9959607a1b60448201526064016108fd565b60008181526010602052604090205461364990600190614869565b8210156136e9576000818152601060205260409020805461366c90600190614869565b8154811061367c5761367c6146b6565b90600052602060002090600202016010600083815260200190815260200160002083815481106136ae576136ae6146b6565b600091825260209091208254600290920201908155600191820154910180546001600160a01b0319166001600160a01b039092169190911790555b600081815260106020526040902080548061370657613706614912565b60008281526020812060026000199093019283020190815560010180546001600160a01b031916905590555050565b600080600080600061374688610f03565b905060005b81518110156137d15787828281518110613767576137676146b6565b6020026020010151600001511480156137ae5750866001600160a01b0316828281518110613797576137976146b6565b6020026020010151602001516001600160a01b0316145b156137bf57600193508092506137d1565b806137c9816146ff565b91505061374b565b50826138325760405162461bcd60e51b815260206004820152602a60248201527f476976656e204173736574204964206973206e6f7420617474616368656420746044820152691bc81d1a1a5cc813919560b21b60648201526084016108fd565b5090969095509350505050565b600080600080600061385087611fcb565b905060008151116138af5760405162461bcd60e51b815260206004820152602360248201527f4e6f20617373657420697320617474616368656420746f207468697320686578604482015262185c9d60ea1b60648201526084016108fd565b60005b815181101561390f57866001600160a01b03168282815181106138d7576138d76146b6565b6020026020010151602001516001600160a01b0316036138fd576001935080925061390f565b80613907816146ff565b9150506138b2565b508261396d5760405162461bcd60e51b815260206004820152602760248201527f476976656e204173736574206973206e6f7420617474616368656420746f20746044820152661a1a5cc813919560ca1b60648201526084016108fd565b50909590945092505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916139d591906148f6565b6000604051808303816000865af19150503d8060008114613a12576040519150601f19603f3d011682016040523d82523d6000602084013e613a17565b606091505b5091509150818015613a41575080511580613a41575080806020019051810190613a419190614652565b613aa35760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b60648201526084016108fd565b5050505050565b600081815260116020526040902054613ac590600190614869565b821015613b655760008181526011602052604090208054613ae890600190614869565b81548110613af857613af86146b6565b9060005260206000209060020201601160008381526020019081526020016000208381548110613b2a57613b2a6146b6565b600091825260209091208254600290920201908155600191820154910180546001600160a01b0319166001600160a01b039092169190911790555b600081815260116020526040902080548061370657613706614912565b60006001600160a01b0384163b15613c7857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613bc6903390899088908890600401614928565b6020604051808303816000875af1925050508015613c01575060408051601f3d908101601f19168201909252613bfe91810190614964565b60015b613c5e573d808015613c2f576040519150601f19603f3d011682016040523d82523d6000602084013e613c34565b606091505b508051600003613c565760405162461bcd60e51b81526004016108fd90614899565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fc3565b506001949350505050565b606081600003613caa5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613cd45780613cbe816146ff565b9150613ccd9050600a836147b4565b9150613cae565b60008167ffffffffffffffff811115613cef57613cef614392565b6040519080825280601f01601f191660200182016040528015613d19576020820181803683370190505b5090505b8415611fc357613d2e600183614869565b9150613d3b600a86614981565b613d46906030614851565b60f81b818381518110613d5b57613d5b6146b6565b60200101906001600160f81b031916908160001a905350613d7d600a866147b4565b9450613d1d565b613d8e8383613db7565b613d9b6000848484613b82565b610dbe5760405162461bcd60e51b81526004016108fd90614899565b6001600160a01b038216613e0d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108fd565b6000818152600260205260409020546001600160a01b031615613e725760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108fd565b6001600160a01b0382166000908152600360205260408120805460019290613e9b908490614851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b508054613f05906145cc565b6000825580601f10613f15575050565b601f0160209004906000526020600020908101906123ce9190613fb7565b828054613f3f906145cc565b90600052602060002090601f016020900481019282613f615760008555613fa7565b82601f10613f7a57805160ff1916838001178555613fa7565b82800160010185558215613fa7579182015b82811115613fa7578251825591602001919060010190613f8c565b50613fb3929150613fb7565b5090565b5b80821115613fb35760008155600101613fb8565b6001600160e01b0319811681146123ce57600080fd5b600060208284031215613ff457600080fd5b813561323781613fcc565b6001600160a01b03811681146123ce57600080fd5b60006020828403121561402657600080fd5b813561323781613fff565b60005b8381101561404c578181015183820152602001614034565b838111156118835750506000910152565b60008151808452614075816020860160208601614031565b601f01601f19169290920160200192915050565b602081526000613237602083018461405d565b60008083601f8401126140ae57600080fd5b50813567ffffffffffffffff8111156140c657600080fd5b6020830191508360208260051b8501011115610ee557600080fd5b600080600080606085870312156140f757600080fd5b843561410281613fff565b9350602085013567ffffffffffffffff81111561411e57600080fd5b61412a8782880161409c565b9598909750949560400135949350505050565b60006020828403121561414f57600080fd5b5035919050565b6000806040838503121561416957600080fd5b823561417481613fff565b946020939093013593505050565b60008060006060848603121561419757600080fd5b83356141a281613fff565b925060208401356141b281613fff565b929592945050506040919091013590565b600080604083850312156141d657600080fd5b50508035926020909101359150565b6000806000606084860312156141fa57600080fd5b83359250602084013561420c81613fff565b9150604084013561421c81613fff565b809150509250925092565b600081518084526020808501945080840160005b8381101561427457614261878351805182526020908101516001600160a01b0316910152565b604096909601959082019060010161423b565b509495945050505050565b6020815260006132376020830184614227565b600080600080606085870312156142a857600080fd5b84359350602085013567ffffffffffffffff8111156142c657600080fd5b6142d28782880161409c565b90945092505060408501356142e681613fff565b939692955090935050565b80356001600160601b038116811461430857600080fd5b919050565b60008060006060848603121561432257600080fd5b83359250602084013561433481613fff565b9150614342604085016142f1565b90509250925092565b80151581146123ce57600080fd5b6000806040838503121561436c57600080fd5b823561437781613fff565b915060208301356143878161434b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156143c3576143c3614392565b604051601f8501601f19908116603f011681019082821181831017156143eb576143eb614392565b8160405280935085815286868601111561440457600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121561443457600080fd5b843561443f81613fff565b9350602085013561444f81613fff565b925060408501359150606085013567ffffffffffffffff81111561447257600080fd5b8501601f8101871361448357600080fd5b614492878235602084016143a8565b91505092959194509250565b602080825282518282018190526000919060409081850190868401855b828110156144f1576144e1848351805182526020908101516001600160a01b0316910152565b92840192908501906001016144bb565b5091979650505050505050565b6000806040838503121561451157600080fd5b823561451c81613fff565b9150602083013561438781613fff565b60008060006060848603121561454157600080fd5b833567ffffffffffffffff81111561455857600080fd5b8401601f8101861361456957600080fd5b614578868235602084016143a8565b935050614587602085016142f1565b9150604084013590509250925092565b6000806000606084860312156145ac57600080fd5b83356145b781613fff565b95602085013595506040909401359392505050565b600181811c908216806145e057607f821691505b60208210810361460057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f436f6c6c656374696f6e3a2063616c6c6572206973206e6f74206f776e65722060408201526b1b9bdc88185c1c1c9bdd995960a21b606082015260800190565b60006020828403121561466457600080fd5b81516132378161434b565b60208082526027908201527f43616e6e6f74206164642f72656d6f766520617373657420746f2061206c69736040820152661d19590813919560ca1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156146de57600080fd5b815161323781613fff565b634e487b7160e01b600052601160045260246000fd5b600060018201614711576147116146e9565b5060010190565b60006040808301858452602082818601528186548084526060870191508760005282600020935060005b8181101561477157845483526001808601546001600160a01b0316858501526002909501949286019201614742565b509098975050505050505050565b6000816000190483118215151615614799576147996146e9565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826147c3576147c361479e565b500490565b848152606060208201819052810183905260006001600160fb1b038411156147ef57600080fd5b8360051b80866080850137608081840101905060008152809150506001600160a01b038316604083015295945050505050565b60008351614834818460208801614031565b835190830190614848818360208801614031565b01949350505050565b60008219821115614864576148646146e9565b500190565b60008282101561487b5761487b6146e9565b500390565b828152604060208201526000611fc36040830184614227565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60008251614908818460208701614031565b9190910192915050565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b0380871683528086166020840152508360408301526080606083015261495a608083018461405d565b9695505050505050565b60006020828403121561497657600080fd5b815161323781613fcc565b6000826149905761499061479e565b50069056fea264697066735822122028fbcbb3fb0f5e6fe985c9f10cae33a4592e2ee9551d7a7560b001abecbb026764736f6c634300080e0033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x60806040526004361061025a5760003560e01c806373ad6c2d11610149578063b4f82c6f116100c6578063e4326a481161008a578063f2fde38b11610064578063f2fde38b146107ab578063fc01c976146107cb578063fe0c2b97146107eb57600080fd5b8063e4326a4814610722578063e985e9c514610742578063eca7b6811461078b57600080fd5b8063b4f82c6f14610682578063b88d4fde14610695578063c415b95c146106b5578063c87b56dd146106d5578063e0c793c0146106f557600080fd5b806398b7e3121161010d57806398b7e312146105c557806398d2e70c146105f2578063a22cb46514610622578063a2a3fa4514610642578063abc8c7af1461066257600080fd5b806373ad6c2d1461053f578063807e9bae1461055f5780638cadf0061461057f5780638da5cb5b1461059257806395d89b41146105b057600080fd5b80633fc8cef3116101d75780635a0dd88d1161019b5780635a0dd88d146104b357806361bc221a146104c65780636352211e146104ea57806370a082311461050a578063715018a61461052a57600080fd5b80633fc8cef31461041357806342842e0e1461043357806342966c6814610453578063491a9cf3146104735780635970678c1461049357600080fd5b8063095ea7b31161021e578063095ea7b31461034757806323b872dd146103675780632a55205a146103875780632aafe132146103c6578063393f26d6146103e657600080fd5b806301ffc9a71461026657806306c933d81461029b57806306fdde03146102cb578063074f22c2146102ed578063081812fc1461030f57600080fd5b3661026157005b600080fd5b34801561027257600080fd5b50610286610281366004613fe2565b6107fe565b60405190151581526020015b60405180910390f35b3480156102a757600080fd5b506102866102b6366004614014565b60126020526000908152604090205460ff1681565b3480156102d757600080fd5b506102e061080f565b6040516102929190614089565b3480156102f957600080fd5b5061030d6103083660046140e1565b6108a1565b005b34801561031b57600080fd5b5061032f61032a36600461413d565b610c19565b6040516001600160a01b039091168152602001610292565b34801561035357600080fd5b5061030d610362366004614156565b610cae565b34801561037357600080fd5b5061030d610382366004614182565b610dc3565b34801561039357600080fd5b506103a76103a23660046141c3565b610e3e565b604080516001600160a01b039093168352602083019190915201610292565b3480156103d257600080fd5b506102866103e13660046141e5565b610eec565b3480156103f257600080fd5b5061040661040136600461413d565b610f03565b604051610292919061427f565b34801561041f57600080fd5b50600a5461032f906001600160a01b031681565b34801561043f57600080fd5b5061030d61044e366004614182565b610fcb565b34801561045f57600080fd5b5061030d61046e36600461413d565b610fe6565b34801561047f57600080fd5b5061030d61048e366004614014565b6111aa565b34801561049f57600080fd5b5061030d6104ae36600461413d565b61127b565b61030d6104c1366004614292565b611397565b3480156104d257600080fd5b506104dc600d5481565b604051908152602001610292565b3480156104f657600080fd5b5061032f61050536600461413d565b6115a8565b34801561051657600080fd5b506104dc610525366004614014565b61161f565b34801561053657600080fd5b5061030d6116a6565b34801561054b57600080fd5b5061030d61055a366004614014565b61170c565b34801561056b57600080fd5b5061030d61057a36600461430d565b6117ea565b61030d61058d36600461413d565b611889565b34801561059e57600080fd5b506009546001600160a01b031661032f565b3480156105bc57600080fd5b506102e0611a72565b3480156105d157600080fd5b506104dc6105e036600461413d565b60136020526000908152604090205481565b3480156105fe57600080fd5b5061028661060d36600461413d565b60009081526013602052604090205442101590565b34801561062e57600080fd5b5061030d61063d366004614359565b611a81565b34801561064e57600080fd5b5061030d61065d366004614156565b611a90565b34801561066e57600080fd5b50600b5461032f906001600160a01b031681565b61030d610690366004614156565b611bf4565b3480156106a157600080fd5b5061030d6106b036600461441e565b611dc9565b3480156106c157600080fd5b50600c5461032f906001600160a01b031681565b3480156106e157600080fd5b506102e06106f036600461413d565b611e45565b34801561070157600080fd5b5061071561071036600461413d565b611fcb565b604051610292919061449e565b34801561072e57600080fd5b5061030d61073d366004614014565b612085565b34801561074e57600080fd5b5061028661075d3660046144fe565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561079757600080fd5b506104dc6107a636600461452c565b612160565b3480156107b757600080fd5b5061030d6107c6366004614014565b612306565b3480156107d757600080fd5b5061030d6107e6366004614292565b6123d1565b61030d6107f9366004614597565b6124f6565b60006108098261281f565b92915050565b60606000805461081e906145cc565b80601f016020809104026020016040519081016040528092919081815260200182805461084a906145cc565b80156108975780601f1061086c57610100808354040283529160200191610897565b820191906000526020600020905b81548152906001019060200180831161087a57829003601f168201915b5050505050905090565b6001600160a01b038416600090815260126020526040902054849060ff166109065760405162461bcd60e51b81526020600482015260136024820152722737ba103430bb32903832b936b4b9b9b4b7b760691b60448201526064015b60405180910390fd5b8133610911826115a8565b6001600160a01b0316146109375760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810185905284916001600160a01b03169063fcce488390602401602060405180830381865afa158015610980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a49190614652565b156109c15760405162461bcd60e51b81526004016108fd9061466f565b60005b85811015610bc757876001600160a01b03166323b872dd33308a8a868181106109ef576109ef6146b6565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610a4657600080fd5b505af1158015610a5a573d6000803e3d6000fd5b5030925050506001600160a01b038916636352211e898985818110610a8157610a816146b6565b905060200201356040518263ffffffff1660e01b8152600401610aa691815260200190565b602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae791906146cc565b6001600160a01b031614610b2f5760405162461bcd60e51b815260206004820152600f60248201526e105cdcd95d081b9bdd081859191959608a1b60448201526064016108fd565b601060008681526020019081526020016000206040518060400160405280898985818110610b5f57610b5f6146b6565b602090810292909201358352506001600160a01b038c81169282019290925283546001808201865560009586529482902084516002909202019081559201519190920180546001600160a01b0319169190921617905580610bbf816146ff565b9150506109c4565b506000848152601060205260409081902090517f8d3aeefd7491d6eb8b8c31a3a65ac72bbbc8ad5233cb25f93f03826b3d583e7091610c0891879190614718565b60405180910390a150505050505050565b6000818152600260205260408120546001600160a01b0316610c925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108fd565b506000908152600460205260409020546001600160a01b031690565b6000610cb9826115a8565b9050806001600160a01b0316836001600160a01b031603610d265760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108fd565b336001600160a01b0382161480610d425750610d42813361075d565b610db45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108fd565b610dbe8383612844565b505050565b610dcd33826128b2565b610e335760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108fd565b610dbe8383836129a8565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610eb35750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610ed2906001600160601b03168761477f565b610edc91906147b4565b91519350909150505b9250929050565b6000610ef98383866129a8565b5060019392505050565b606060008211610f4f5760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b600082815260106020908152604080832080548251818502810185019093528083529193909284015b82821015610fc05760008481526020908190206040805180820190915260028502909101805482526001908101546001600160a01b0316828401529083529092019101610f78565b505050509050919050565b610dbe83838360405180602001604052806000815250611dc9565b8033610ff1826115a8565b6001600160a01b0316146110175760405162461bcd60e51b81526004016108fd90614606565b81600061102382610f03565b9050600061103083611fcb565b90508151600014801561104257508051155b6110b45760405162461bcd60e51b815260206004820152603460248201527f52656d6f766520616c6c2061747461636865642061737365742066726f6d206860448201527f6578617274206265666f7265206275726e696e6700000000000000000000000060648201526084016108fd565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa1580156110fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111219190614652565b1561113e5760405162461bcd60e51b81526004016108fd9061466f565b6000868152600f6020908152604080832080546001600160a01b0319169055601390915281205561116e86612b44565b6040518681527f2890e0d7ee71a164375468b2abf266f4f87d415291cdd95f3225b09f3a8a71c0906020015b60405180910390a1505050505050565b6009546001600160a01b031633146112045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b03811661125a5760405162461bcd60e51b815260206004820152601b60248201527f5a65726f2061646472657373206973206e6f7420616c6c6f776564000000000060448201526064016108fd565b6001600160a01b03166000908152601260205260409020805460ff19169055565b8033611286826115a8565b6001600160a01b0316146112ac5760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113199190614652565b156113365760405162461bcd60e51b81526004016108fd9061466f565b60008381526013602052604090205442101561138e5760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b610dbe83612b84565b83336113a2826115a8565b6001600160a01b0316146113c85760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa158015611411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114359190614652565b156114525760405162461bcd60e51b81526004016108fd9061466f565b6114648467051ef38b821e800061477f565b3410156114ab5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b60008681526013602052604090205442106114fe5760405162461bcd60e51b81526020600482015260136024820152722637b1b5903832b934b7b21034b99037bb32b960691b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b505050505061157386868686612c9b565b7fc50c0c4ae7bee9728332f9648f9450829bfffed675d324662481686e328a21598686868660405161119a94939291906147c8565b6000818152600260205260408120546001600160a01b0316806108095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108fd565b60006001600160a01b03821661168a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108fd565b506001600160a01b031660009081526003602052604090205490565b6009546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b61170a6000612d8c565b565b6009546001600160a01b031633146117665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b0381166117c85760405162461bcd60e51b815260206004820152602360248201527f4d61726b6574706c61636520616464726573732063616e6e6f74206265207a6560448201526239379760e91b60648201526084016108fd565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000838152600f602052604090205483906001600160a01b031633146118785760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e3a206f6e6c7920696e697469616c206f776e6572206360448201527f616e207365742074686520726f79616c6974790000000000000000000000000060648201526084016108fd565b611883848484612dde565b50505050565b8033611894826115a8565b6001600160a01b0316146118ba5760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190614652565b156119445760405162461bcd60e51b81526004016108fd9061466f565b60008381526013602052604090205442106119975760405162461bcd60e51b81526020600482015260136024820152722637b1b5903832b934b7b21034b99037bb32b960691b60448201526064016108fd565b60006119a284610f03565b9050805167051ef38b821e80006119b9919061477f565b341015611a005760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b505050505061188384612b84565b60606001805461081e906145cc565b611a8c338383612ed5565b5050565b8033611a9b826115a8565b6001600160a01b031614611ac15760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e9190614652565b15611b4b5760405162461bcd60e51b81526004016108fd9061466f565b600083815260136020526040902054421015611ba35760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b611bad8484612fa3565b604080518481526001600160a01b03861660208201527fd45fbe44309e04fde0648369a89a1b75b72c68a37f5ad8a4d4498ba1555a4206910160405180910390a150505050565b8033611bff826115a8565b6001600160a01b031614611c255760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810184905283916001600160a01b03169063fcce488390602401602060405180830381865afa158015611c6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c929190614652565b15611caf5760405162461bcd60e51b81526004016108fd9061466f565b67051ef38b821e8000341015611cff5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08199d5b991cc81cd95b9d605a1b60448201526064016108fd565b6000838152601360205260409020544210611d565760405162461bcd60e51b81526020600482015260176024820152762637b1b5903832b934b7b21034b9903737ba1037bb32b960491b60448201526064016108fd565b600b60009054906101000a90046001600160a01b03166001600160a01b031663221a4a56346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611da657600080fd5b505af1158015611dba573d6000803e3d6000fd5b5050505050611bad8484612fa3565b611dd333836128b2565b611e395760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108fd565b61188384848484613123565b6000818152600260205260409020546060906001600160a01b0316611ec65760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016108fd565b60008281526006602052604081208054611edf906145cc565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0b906145cc565b8015611f585780601f10611f2d57610100808354040283529160200191611f58565b820191906000526020600020905b815481529060010190602001808311611f3b57829003601f168201915b505050505090506000611f7660408051602081019091526000815290565b90508051600003611f88575092915050565b815115611fba578082604051602001611fa2929190614822565b60405160208183030381529060405292505050919050565b611fc384613156565b949350505050565b6060600082116120175760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b600082815260116020908152604080832080548251818502810185019093528083529193909284018215610fc05760008481526020908190206040805180820190915260028502909101805482526001908101546001600160a01b0316828401529083529092019101610f78565b6001600160a01b0381163b6120e65760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920636f6e747261637420616464726573732061726520616c6c6f77656044820152601960fa1b60648201526084016108fd565b6001600160a01b03811661213c5760405162461bcd60e51b815260206004820152601b60248201527f5a65726f2061646472657373206973206e6f7420616c6c6f776564000000000060448201526064016108fd565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000336121b95760405162461bcd60e51b815260206004820152602160248201527f436f6c6c656374696f6e3a205f746f2061646472657373206e6f742076616c696044820152601960fa1b60648201526084016108fd565b60008451116122155760405162461bcd60e51b815260206004820152602260248201527f436f6c6c656374696f6e3a20546f6b656e20555249206973206e6f742076616c6044820152611a5960f21b60648201526084016108fd565b600d8054906000612225836146ff565b9190505550600d549050612239338261323e565b6122438185613258565b6001600160601b0383161561225d5761225d813385612dde565b6000818152600f6020526040902080546001600160a01b03191633179055612288826201518061477f565b6122929042614851565b60008281526013602052604090819020829055517f0f42586b57d850ff5f142c258e1f26c2045701b17f9622559b37085183a9ce73916122f791849187918791909384526001600160601b039290921660208401526040830152606082015260800190565b60405180910390a19392505050565b6009546001600160a01b031633146123605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b6001600160a01b0381166123c55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108fd565b6123ce81612d8c565b50565b83336123dc826115a8565b6001600160a01b0316146124025760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810187905286916001600160a01b03169063fcce488390602401602060405180830381865afa15801561244b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246f9190614652565b1561248c5760405162461bcd60e51b81526004016108fd9061466f565b6000868152601360205260409020544210156124ea5760405162461bcd60e51b815260206004820152601e60248201527f4c6f636b20706572696f64206173736574206973206e6f74206f7665722e000060448201526064016108fd565b61157386868686612c9b565b6001600160a01b038316600090815260126020526040902054839060ff166125565760405162461bcd60e51b81526020600482015260136024820152722737ba103430bb32903832b936b4b9b9b4b7b760691b60448201526064016108fd565b8233612561826115a8565b6001600160a01b0316146125875760405162461bcd60e51b81526004016108fd90614606565b600b5460405163fcce488360e01b81526004810186905285916001600160a01b03169063fcce488390602401602060405180830381865afa1580156125d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f49190614652565b156126115760405162461bcd60e51b81526004016108fd9061466f565b600e546000906001600160a01b039081169088160361269857600a60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561267a57600080fd5b505af115801561268e573d6000803e3d6000fd5b50505050506126a4565b6126a4873330886132f2565b60005b60008781526011602052604090205481101561276f57600087815260116020526040902080546001600160a01b038a169190839081106126e9576126e96146b6565b60009182526020909120600160029092020101546001600160a01b03160361275d57600087815260116020526040902080548791908390811061272e5761272e6146b6565b9060005260206000209060020201600001600082825461274e9190614851565b909155506001925061276f9050565b80612767816146ff565b9150506126a7565b50806127d957600086815260116020908152604080832081518083019092528882526001600160a01b038b8116838501908152825460018082018555938752949095209251600290940290920192835592519190920180546001600160a01b031916919092161790555b604080518781526001600160a01b03891660208201529081018690527ffa60fc947b1e1e165107874bba24d31badae55d46af30e47e672e22656fe0b7290606001610c08565b60006001600160e01b0319821663152a902d60e11b1480610809575061080982613428565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612879826115a8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661292b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108fd565b6000612936836115a8565b9050806001600160a01b0316846001600160a01b0316148061297d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611fc35750836001600160a01b031661299684610c19565b6001600160a01b031614949350505050565b826001600160a01b03166129bb826115a8565b6001600160a01b031614612a1f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108fd565b6001600160a01b038216612a815760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108fd565b612a8c600082612844565b6001600160a01b0383166000908152600360205260408120805460019290612ab5908490614869565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ae3908490614851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612b4d81613478565b60008181526006602052604090208054612b66906145cc565b1590506123ce5760008181526006602052604081206123ce91613ef9565b6000612b8f82610f03565b90506000815111612bf15760405162461bcd60e51b815260206004820152602660248201527f4e6f20617373657420697320617474616368656420746f207468652067697665604482015265371027232a1760d11b60648201526084016108fd565b60005b8151811015612c5d57612c41828281518110612c1257612c126146b6565b602002602001015160200151838381518110612c3057612c306146b6565b602002602001015160000151613513565b612c4b818461362e565b80612c55816146ff565b915050612bf4565b507ff9683d45d75a732f02cc8b9a7ef71511f9930a42b8a12e8405b3aac20f6f87408282604051612c8f929190614880565b60405180910390a15050565b6000612ca685610f03565b90506000815111612d085760405162461bcd60e51b815260206004820152602660248201527f4e6f20617373657420697320617474616368656420746f207468652067697665604482015265371027232a1760d11b60648201526084016108fd565b60005b83811015612d8457600080612d3988888886818110612d2c57612d2c6146b6565b9050602002013587613735565b915091508115612d6f57612d6585888886818110612d5957612d596146b6565b90506020020135613513565b612d6f818961362e565b50508080612d7c906146ff565b915050612d0b565b505050505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160601b0382166001600160a01b038216612e3f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108fd565b60008511612e895760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049642063616e6e6f74206265207a65726f60481b60448201526064016108fd565b50506040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600890529190942093519051909116600160a01b029116179055565b816001600160a01b0316836001600160a01b031603612f365760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108fd565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080612fb0838561383f565b91509150811561188357600e546001600160a01b03908116908516036130dd57600a54600084815260116020526040902080546001600160a01b0390921691632e1a7d4d919084908110613006576130066146b6565b9060005260206000209060020201600001546040518263ffffffff1660e01b815260040161303691815260200190565b600060405180830381600087803b15801561305057600080fd5b505af1158015613064573d6000803e3d6000fd5b5050505061306f3390565b6001600160a01b03166108fc60116000868152602001908152602001600020838154811061309f5761309f6146b6565b600091825260208220600290910201546040518115909302929091818181858888f193505050501580156130d7573d6000803e3d6000fd5b50613119565b61311984336000868152601160205260409020805485908110613102576131026146b6565b906000526020600020906002020160000154613979565b6118838184613aaa565b61312e8484846129a8565b61313a84848484613b82565b6118835760405162461bcd60e51b81526004016108fd90614899565b6000818152600260205260409020546060906001600160a01b03166131d55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108fd565b60006131ec60408051602081019091526000815290565b9050600081511161320c5760405180602001604052806000815250613237565b8061321684613c83565b604051602001613227929190614822565b6040516020818303038152906040525b9392505050565b611a8c828260405180602001604052806000815250613d84565b6000828152600260205260409020546001600160a01b03166132d35760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016108fd565b60008281526006602090815260409091208251610dbe92840190613f33565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161335691906148f6565b6000604051808303816000865af19150503d8060008114613393576040519150601f19603f3d011682016040523d82523d6000602084013e613398565b606091505b50915091508180156133c25750805115806133c25750808060200190518101906133c29190614652565b612d845760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604482015270185b9cd9995c919c9bdb4819985a5b1959607a1b60648201526084016108fd565b60006001600160e01b031982166380ac58cd60e01b148061345957506001600160e01b03198216635b5e139f60e01b145b8061080957506301ffc9a760e01b6001600160e01b0319831614610809565b6000613483826115a8565b9050613490600083612844565b6001600160a01b03811660009081526003602052604081208054600192906134b9908490614869565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561356157600080fd5b505af1158015613575573d6000803e3d6000fd5b50506040516331a9108f60e11b8152600481018490523392506001600160a01b0385169150636352211e90602401602060405180830381865afa1580156135c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135e491906146cc565b6001600160a01b031614611a8c5760405162461bcd60e51b8152602060048201526011602482015270105cdcd95d081b9bdd081c995b5bdd9959607a1b60448201526064016108fd565b60008181526010602052604090205461364990600190614869565b8210156136e9576000818152601060205260409020805461366c90600190614869565b8154811061367c5761367c6146b6565b90600052602060002090600202016010600083815260200190815260200160002083815481106136ae576136ae6146b6565b600091825260209091208254600290920201908155600191820154910180546001600160a01b0319166001600160a01b039092169190911790555b600081815260106020526040902080548061370657613706614912565b60008281526020812060026000199093019283020190815560010180546001600160a01b031916905590555050565b600080600080600061374688610f03565b905060005b81518110156137d15787828281518110613767576137676146b6565b6020026020010151600001511480156137ae5750866001600160a01b0316828281518110613797576137976146b6565b6020026020010151602001516001600160a01b0316145b156137bf57600193508092506137d1565b806137c9816146ff565b91505061374b565b50826138325760405162461bcd60e51b815260206004820152602a60248201527f476976656e204173736574204964206973206e6f7420617474616368656420746044820152691bc81d1a1a5cc813919560b21b60648201526084016108fd565b5090969095509350505050565b600080600080600061385087611fcb565b905060008151116138af5760405162461bcd60e51b815260206004820152602360248201527f4e6f20617373657420697320617474616368656420746f207468697320686578604482015262185c9d60ea1b60648201526084016108fd565b60005b815181101561390f57866001600160a01b03168282815181106138d7576138d76146b6565b6020026020010151602001516001600160a01b0316036138fd576001935080925061390f565b80613907816146ff565b9150506138b2565b508261396d5760405162461bcd60e51b815260206004820152602760248201527f476976656e204173736574206973206e6f7420617474616368656420746f20746044820152661a1a5cc813919560ca1b60648201526084016108fd565b50909590945092505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916139d591906148f6565b6000604051808303816000865af19150503d8060008114613a12576040519150601f19603f3d011682016040523d82523d6000602084013e613a17565b606091505b5091509150818015613a41575080511580613a41575080806020019051810190613a419190614652565b613aa35760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b60648201526084016108fd565b5050505050565b600081815260116020526040902054613ac590600190614869565b821015613b655760008181526011602052604090208054613ae890600190614869565b81548110613af857613af86146b6565b9060005260206000209060020201601160008381526020019081526020016000208381548110613b2a57613b2a6146b6565b600091825260209091208254600290920201908155600191820154910180546001600160a01b0319166001600160a01b039092169190911790555b600081815260116020526040902080548061370657613706614912565b60006001600160a01b0384163b15613c7857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613bc6903390899088908890600401614928565b6020604051808303816000875af1925050508015613c01575060408051601f3d908101601f19168201909252613bfe91810190614964565b60015b613c5e573d808015613c2f576040519150601f19603f3d011682016040523d82523d6000602084013e613c34565b606091505b508051600003613c565760405162461bcd60e51b81526004016108fd90614899565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fc3565b506001949350505050565b606081600003613caa5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613cd45780613cbe816146ff565b9150613ccd9050600a836147b4565b9150613cae565b60008167ffffffffffffffff811115613cef57613cef614392565b6040519080825280601f01601f191660200182016040528015613d19576020820181803683370190505b5090505b8415611fc357613d2e600183614869565b9150613d3b600a86614981565b613d46906030614851565b60f81b818381518110613d5b57613d5b6146b6565b60200101906001600160f81b031916908160001a905350613d7d600a866147b4565b9450613d1d565b613d8e8383613db7565b613d9b6000848484613b82565b610dbe5760405162461bcd60e51b81526004016108fd90614899565b6001600160a01b038216613e0d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108fd565b6000818152600260205260409020546001600160a01b031615613e725760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108fd565b6001600160a01b0382166000908152600360205260408120805460019290613e9b908490614851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b508054613f05906145cc565b6000825580601f10613f15575050565b601f0160209004906000526020600020908101906123ce9190613fb7565b828054613f3f906145cc565b90600052602060002090601f016020900481019282613f615760008555613fa7565b82601f10613f7a57805160ff1916838001178555613fa7565b82800160010185558215613fa7579182015b82811115613fa7578251825591602001919060010190613f8c565b50613fb3929150613fb7565b5090565b5b80821115613fb35760008155600101613fb8565b6001600160e01b0319811681146123ce57600080fd5b600060208284031215613ff457600080fd5b813561323781613fcc565b6001600160a01b03811681146123ce57600080fd5b60006020828403121561402657600080fd5b813561323781613fff565b60005b8381101561404c578181015183820152602001614034565b838111156118835750506000910152565b60008151808452614075816020860160208601614031565b601f01601f19169290920160200192915050565b602081526000613237602083018461405d565b60008083601f8401126140ae57600080fd5b50813567ffffffffffffffff8111156140c657600080fd5b6020830191508360208260051b8501011115610ee557600080fd5b600080600080606085870312156140f757600080fd5b843561410281613fff565b9350602085013567ffffffffffffffff81111561411e57600080fd5b61412a8782880161409c565b9598909750949560400135949350505050565b60006020828403121561414f57600080fd5b5035919050565b6000806040838503121561416957600080fd5b823561417481613fff565b946020939093013593505050565b60008060006060848603121561419757600080fd5b83356141a281613fff565b925060208401356141b281613fff565b929592945050506040919091013590565b600080604083850312156141d657600080fd5b50508035926020909101359150565b6000806000606084860312156141fa57600080fd5b83359250602084013561420c81613fff565b9150604084013561421c81613fff565b809150509250925092565b600081518084526020808501945080840160005b8381101561427457614261878351805182526020908101516001600160a01b0316910152565b604096909601959082019060010161423b565b509495945050505050565b6020815260006132376020830184614227565b600080600080606085870312156142a857600080fd5b84359350602085013567ffffffffffffffff8111156142c657600080fd5b6142d28782880161409c565b90945092505060408501356142e681613fff565b939692955090935050565b80356001600160601b038116811461430857600080fd5b919050565b60008060006060848603121561432257600080fd5b83359250602084013561433481613fff565b9150614342604085016142f1565b90509250925092565b80151581146123ce57600080fd5b6000806040838503121561436c57600080fd5b823561437781613fff565b915060208301356143878161434b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156143c3576143c3614392565b604051601f8501601f19908116603f011681019082821181831017156143eb576143eb614392565b8160405280935085815286868601111561440457600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121561443457600080fd5b843561443f81613fff565b9350602085013561444f81613fff565b925060408501359150606085013567ffffffffffffffff81111561447257600080fd5b8501601f8101871361448357600080fd5b614492878235602084016143a8565b91505092959194509250565b602080825282518282018190526000919060409081850190868401855b828110156144f1576144e1848351805182526020908101516001600160a01b0316910152565b92840192908501906001016144bb565b5091979650505050505050565b6000806040838503121561451157600080fd5b823561451c81613fff565b9150602083013561438781613fff565b60008060006060848603121561454157600080fd5b833567ffffffffffffffff81111561455857600080fd5b8401601f8101861361456957600080fd5b614578868235602084016143a8565b935050614587602085016142f1565b9150604084013590509250925092565b6000806000606084860312156145ac57600080fd5b83356145b781613fff565b95602085013595506040909401359392505050565b600181811c908216806145e057607f821691505b60208210810361460057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f436f6c6c656374696f6e3a2063616c6c6572206973206e6f74206f776e65722060408201526b1b9bdc88185c1c1c9bdd995960a21b606082015260800190565b60006020828403121561466457600080fd5b81516132378161434b565b60208082526027908201527f43616e6e6f74206164642f72656d6f766520617373657420746f2061206c69736040820152661d19590813919560ca1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156146de57600080fd5b815161323781613fff565b634e487b7160e01b600052601160045260246000fd5b600060018201614711576147116146e9565b5060010190565b60006040808301858452602082818601528186548084526060870191508760005282600020935060005b8181101561477157845483526001808601546001600160a01b0316858501526002909501949286019201614742565b509098975050505050505050565b6000816000190483118215151615614799576147996146e9565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826147c3576147c361479e565b500490565b848152606060208201819052810183905260006001600160fb1b038411156147ef57600080fd5b8360051b80866080850137608081840101905060008152809150506001600160a01b038316604083015295945050505050565b60008351614834818460208801614031565b835190830190614848818360208801614031565b01949350505050565b60008219821115614864576148646146e9565b500190565b60008282101561487b5761487b6146e9565b500390565b828152604060208201526000611fc36040830184614227565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60008251614908818460208701614031565b9190910192915050565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b0380871683528086166020840152508360408301526080606083015261495a608083018461405d565b9695505050505050565b60006020828403121561497657600080fd5b815161323781613fcc565b6000826149905761499061479e565b50069056fea264697066735822122028fbcbb3fb0f5e6fe985c9f10cae33a4592e2ee9551d7a7560b001abecbb026764736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
-----Decoded View---------------
Arg [0] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
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.