Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15702834 | 635 days ago | IN | Create: SubscriptionService | 0 ETH | 0.02859316 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SubscriptionService
Compiler Version
v0.8.2+commit.661d1103
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.2; import "ERC721Enumerable.sol"; import "Ownable.sol"; import "SubJsonParser.sol"; contract SubscriptionService is ERC721Enumerable, Ownable, SubJsonParser { struct SubData { uint32 tier; uint32 start; uint32 length; } uint256 public constant MAX = 500; uint256 public maxSupply = 300; bool public paused; uint32 public counter; uint256[3] public subPrice; uint256 buyCounter; mapping(uint256 => uint256) expiredStack; uint256 expiredCounter; mapping(uint256 => SubData) public subData; mapping(address => bool) public authorisedCaller; bool public initiated; bool public buySwitch; event SubBought(address indexed buyer, uint256 indexed tokenId, uint32 tier, uint256 value); constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {} function init (string memory __name, string memory __symbol) external { require(!initiated); initiated = true; paused = true; subPrice[0] = 1_950_000_000_000_000_000; subPrice[1] = 3_705_000_000_000_000_000; subPrice[2] = 5_265_000_000_000_000_000; counter = 1; _name = __name; _symbol = __symbol; _owner = msg.sender; } modifier notPaused() { require(!paused, "Paused"); _; } modifier authorised() { require(authorisedCaller[msg.sender], "Not authorised to execute."); _; } modifier nonBuyable() { require(!buySwitch, "Not authorised to buy."); _; } function setCaller(address _caller, bool _value) external onlyOwner { authorisedCaller[_caller] = _value; } function fetchEth() external onlyOwner { payable(owner()).transfer(address(this).balance); } function pause() external onlyOwner { paused = true; } function unpause() external onlyOwner { paused = false; } function switchIt() external onlyOwner { buySwitch = !buySwitch; } function pushNewBox() external authorised { counter++; } function setPrice(uint256 _index, uint256 _price) external onlyOwner { subPrice[_index] = _price; } function setMaxSupply(uint256 _max) external onlyOwner { require(_max <= MAX); maxSupply = _max; } function refundSub(uint256 _tokenId) external onlyOwner { require(!isExpired(_tokenId), "Expired"); SubData memory data = subData[_tokenId]; expiredStack[expiredCounter++] = _tokenId; delete subData[_tokenId]; _burn(_tokenId); } function expireSub(uint256 _tokenId) external { require(isExpired(_tokenId), "Not expired"); expiredStack[expiredCounter++] = _tokenId; delete subData[_tokenId]; _burn(_tokenId); } function buySub(uint8 _tier) external payable { buySub(_tier, msg.sender); } function buySubOwner(uint8 _tier, address _for) public payable onlyOwner { require(_tier == 0 || _tier == 1 || _tier == 2, "Sub: Wrong sub model"); require(totalSupply() < maxSupply, "No more subs of that tier to buy"); require(msg.value == subPrice[_tier], "!price"); if (buyCounter < MAX) { subData[++buyCounter] = SubData(_tier, counter, _getLength(_tier)); _mint(_for, buyCounter); emit SubBought(_for, buyCounter, _tier, msg.value); } else { require(expiredCounter > 0, "No subs available, try next month"); uint256 id = expiredStack[--expiredCounter]; subData[id] = SubData(_tier, counter, _getLength(_tier)); _mint(_for, id); emit SubBought(_for, id, _tier, msg.value); } } function buySub(uint8 _tier, address _for) public payable nonBuyable { require(_tier == 0 || _tier == 1 || _tier == 2, "Sub: Wrong sub model"); require(totalSupply() < maxSupply, "No more subs of that tier to buy"); require(msg.value == subPrice[_tier], "!price"); if (buyCounter < MAX) { subData[++buyCounter] = SubData(_tier, counter, _getLength(_tier)); _mint(_for, buyCounter); emit SubBought(_for, buyCounter, _tier, msg.value); } else { require(expiredCounter > 0, "No subs available, try next month"); uint256 id = expiredStack[--expiredCounter]; subData[id] = SubData(_tier, counter, _getLength(_tier)); _mint(_for, id); emit SubBought(_for, id, _tier, msg.value); } } function isExpired(uint256 _tokenId) public view returns(bool) { SubData memory data = subData[_tokenId]; return data.start + data.length <= counter; } function _getType(uint32 _length) internal pure returns(uint256) { if (_length == 3) return 0; else if (_length == 6) return 1; if (_length == 9) return 2; return 0; } function _getLength(uint8 _type) internal pure returns(uint32) { if (_type == uint8(0)) return uint32(3); else if (_type == uint8(1)) return uint32(6); if (_type == uint8(2)) return uint32(9); return 0; } function fetchValidHolders(uint256 _start, uint256 _len) external view returns(address[] memory holders) { holders = new address[](_len); for (uint256 i = _start; i < _start + _len; i++) { if (_exists(i)) { address owner = ownerOf(i); if (!isExpired(i)) holders[i - _start] = ownerOf(i); } } } function returnSubDataOfHolder(address _holder) external view returns(SubData[] memory data) { uint256 amount = balanceOf(_holder); data = new SubData[](amount); for (uint256 i = 0; i < amount; i++) { data[i] = subData[tokenOfOwnerByIndex(_holder, i)]; } } function hasUserSub(address _holder, uint256 _tierId) external view returns(bool) { uint256 amount = balanceOf(_holder); for (uint256 i = 0; i < amount; i++) { uint256 tokenId = tokenOfOwnerByIndex(_holder, i); SubData memory data = subData[tokenId]; if (data.tier == _tierId && !isExpired(tokenId)) return true; } return false; } function _transfer(address from, address to, uint256 tokenId) internal override notPaused { super._transfer(from, to, tokenId); } function tokenURI(uint256 _tokenId) public view override returns(string memory) { SubData memory data = subData[_tokenId]; require(_exists(_tokenId)); return string( abi.encodePacked( generateTokenUriPart1(_tokenId, uint256(data.tier)), generateTokenUriPart2(_getLength(uint8(data.tier)), counter, data.start, data.length) ) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// 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 "IERC721Metadata.sol"; import "Address.sol"; import "Context.sol"; import "Strings.sol"; import "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 internal _name; // Token symbol string internal _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 (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "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/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 (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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "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 internal _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: UNLICENSED pragma solidity ^0.8.2; contract SubJsonParser { function generateTokenUriPart1(uint256 _tokenId, uint256 _tier) public pure returns(string memory) { return string( abi.encodePacked( bytes('data:application/json;utf8,{"name":"'), _getName(_tokenId, _tier), bytes('","description":"'), "NFTBox subscription that guarantees the reception of a monthly box until it expires.", bytes('","external_url":"'), _getExternalUrl() ) ); } function generateTokenUriPart2(uint256 _tier, uint256 _counter, uint256 _start, uint256 _length) public pure returns(string memory) { return string( abi.encodePacked( bytes('","attributes":['), _tierSub(_tier), _expiry(_length <= (_counter - _start) ? 0 : (_length - (_counter - _start))), bytes(',"image":"'), _getImageCache(_tier), bytes('"}') ) ); } function _getImageCache(uint256 _tier) internal pure returns(string memory) { if (_tier == 3) return string(abi.encodePacked("https://ipfs.io/ipfs/QmV3GaTzqLvGSRTAuiLQGsBUDDx4Dr7G7gxqtR8eRhudLL")); if (_tier == 6) return string(abi.encodePacked("https://ipfs.io/ipfs/QmZBtFNpbrstaKwSDzsB3uFGMeN7b5VjT93Udab2EbB2tQ")); if (_tier == 9) return string(abi.encodePacked("https://ipfs.io/ipfs/QmPCv1DEWH6pTXXVVdR3nqcavT1bzNRY5QoyR6KEzVjUkb")); return string(abi.encodePacked("")); } function _getName(uint256 _tokenId, uint256 _tier) internal pure returns(string memory) { return string(abi.encodePacked("NFTBox ", _tierName(_tier), " Subscription")); } function _tierSub(uint256 _tier) internal pure returns(string memory) { return string(abi.encodePacked(bytes('{"trait_type": "Tier","value":"'), _tierName(_tier), bytes('"},'))); } function _tierName(uint256 _tier) internal pure returns(string memory) { if (_tier == 0) return string(abi.encodePacked("Bronze")); if (_tier == 1) return string(abi.encodePacked("Silver")); if (_tier == 2) return string(abi.encodePacked("Gold")); if (_tier == 3) return string(abi.encodePacked("Bronze")); if (_tier == 6) return string(abi.encodePacked("Silver")); if (_tier == 9) return string(abi.encodePacked("Gold")); } function _expiry(uint256 _expirationCount) internal pure returns(string memory) { return string(abi.encodePacked(bytes('{"trait_type": "Boxes left","value":"'), _uint2str(_expirationCount), bytes('"}]'))); } function _getImageCache(string memory _hash) internal pure returns(string memory) { return string(abi.encodePacked("https://ipfs.io/ipfs/", _hash)); } function _getExternalUrl() internal pure returns(string memory) { return string(abi.encodePacked("https://www.nftboxes.io/")); } function _uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k-1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"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":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"tier","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SubBought","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"},{"inputs":[],"name":"MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorisedCaller","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint8","name":"_tier","type":"uint8"},{"internalType":"address","name":"_for","type":"address"}],"name":"buySub","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"buySub","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"address","name":"_for","type":"address"}],"name":"buySubOwner","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buySwitch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"expireSub","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fetchEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_len","type":"uint256"}],"name":"fetchValidHolders","outputs":[{"internalType":"address[]","name":"holders","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_tier","type":"uint256"}],"name":"generateTokenUriPart1","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tier","type":"uint256"},{"internalType":"uint256","name":"_counter","type":"uint256"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_length","type":"uint256"}],"name":"generateTokenUriPart2","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_tierId","type":"uint256"}],"name":"hasUserSub","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"__name","type":"string"},{"internalType":"string","name":"__symbol","type":"string"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initiated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pushNewBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"refundSub","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"}],"name":"returnSubDataOfHolder","outputs":[{"components":[{"internalType":"uint32","name":"tier","type":"uint32"},{"internalType":"uint32","name":"start","type":"uint32"},{"internalType":"uint32","name":"length","type":"uint32"}],"internalType":"struct SubscriptionService.SubData[]","name":"data","type":"tuple[]"}],"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":"_caller","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"subData","outputs":[{"internalType":"uint32","name":"tier","type":"uint32"},{"internalType":"uint32","name":"start","type":"uint32"},{"internalType":"uint32","name":"length","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"subPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"switchIt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405261012c600b553480156200001757600080fd5b5060405162003a8038038062003a808339810160408190526200003a916200023d565b81518290829062000053906000906020850190620000e4565b50805162000069906001906020840190620000e4565b50505062000086620000806200008e60201b60201c565b62000092565b5050620002f7565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000f290620002a4565b90600052602060002090601f01602090048101928262000116576000855562000161565b82601f106200013157805160ff191683800117855562000161565b8280016001018555821562000161579182015b828111156200016157825182559160200191906001019062000144565b506200016f92915062000173565b5090565b5b808211156200016f576000815560010162000174565b600082601f8301126200019b578081fd5b81516001600160401b0380821115620001b857620001b8620002e1565b604051601f8301601f19908116603f01168101908282118183101715620001e357620001e3620002e1565b81604052838152602092508683858801011115620001ff578485fd5b8491505b8382101562000222578582018301518183018401529082019062000203565b838211156200023357848385830101525b9695505050505050565b6000806040838503121562000250578182fd5b82516001600160401b038082111562000267578384fd5b62000275868387016200018a565b935060208501519150808211156200028b578283fd5b506200029a858286016200018a565b9150509250929050565b600281046001821680620002b957607f821691505b60208210811415620002db57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61377980620003076000396000f3fe6080604052600436106102935760003560e01c80638456cb591161015a578063b88d4fde116100c1578063d49d51811161007a578063d49d518114610816578063d5abeb011461082c578063d9548e5314610842578063e985e9c514610862578063f2fde38b146108ab578063f7d97577146108cb57610293565b8063b88d4fde14610754578063b8dea09514610774578063c13491f814610789578063c87b56dd146107a9578063cca7cd3a146107c9578063d00f7965146107f657610293565b80639cae6eae116101135780639cae6eae146106885780639f118536146106a8578063a22cb465146106c2578063a74772c8146106e2578063a7fb653e14610712578063aaae61eb1461072757610293565b80638456cb59146105ed57806384e528a2146106025780638da5cb5b14610615578063952444dc1461063357806395d89b41146106535780639bc852f91461066857610293565b80634be3a391116101fe5780636352211e116101b75780636352211e146105455780636f8b44b0146105655780637029144c1461058557806370a08231146105a5578063715018a6146105c557806381db741e146105da57610293565b80634be3a3911461043c5780634f6ccce7146104ac5780635446126d146104cc5780635c183bf8146104df5780635c975abb146104f457806361bc221a1461050e57610293565b80632b5d5042116102505780632b5d5042146103885780632f745c59146103a757806338add3ee146103c75780633f31c4fa146103e75780633f4ba83a1461040757806342842e0e1461041c57610293565b806301ffc9a71461029857806306fdde03146102cd578063081812fc146102ef578063095ea7b31461032757806318160ddd1461034957806323b872dd14610368575b600080fd5b3480156102a457600080fd5b506102b86102b3366004612ffa565b6108eb565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102e2610918565b6040516102c4919061345e565b3480156102fb57600080fd5b5061030f61030a366004613093565b6109aa565b6040516001600160a01b0390911681526020016102c4565b34801561033357600080fd5b50610347610342366004612fd1565b610a44565b005b34801561035557600080fd5b506008545b6040519081526020016102c4565b34801561037457600080fd5b50610347610383366004612ee3565b610b5a565b34801561039457600080fd5b506015546102b890610100900460ff1681565b3480156103b357600080fd5b5061035a6103c2366004612fd1565b610b8b565b3480156103d357600080fd5b506102e26103e23660046130ab565b610c24565b3480156103f357600080fd5b5061035a610402366004613093565b610d0b565b34801561041357600080fd5b50610347610d22565b34801561042857600080fd5b50610347610437366004612ee3565b610d58565b34801561044857600080fd5b50610485610457366004613093565b60136020526000908152604090205463ffffffff80821691600160201b8104821691600160401b9091041683565b6040805163ffffffff948516815292841660208401529216918101919091526060016102c4565b3480156104b857600080fd5b5061035a6104c7366004613093565b610d73565b6103476104da366004613117565b610e14565b3480156104eb57600080fd5b50610347611216565b34801561050057600080fd5b50600c546102b89060ff1681565b34801561051a57600080fd5b50600c5461053090610100900463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561055157600080fd5b5061030f610560366004613093565b61127c565b34801561057157600080fd5b50610347610580366004613093565b6112f3565b34801561059157600080fd5b506103476105a0366004613032565b611331565b3480156105b157600080fd5b5061035a6105c0366004612e97565b6113cc565b3480156105d157600080fd5b50610347611453565b6103476105e8366004613117565b611489565b3480156105f957600080fd5b506103476114b3565b6103476106103660046130fd565b6114ec565b34801561062157600080fd5b50600a546001600160a01b031661030f565b34801561063f57600080fd5b506102b861064e366004612fd1565b6114f6565b34801561065f57600080fd5b506102e26115ac565b34801561067457600080fd5b50610347610683366004613093565b6115bb565b34801561069457600080fd5b506103476106a3366004612f97565b611657565b3480156106b457600080fd5b506015546102b89060ff1681565b3480156106ce57600080fd5b506103476106dd366004612f97565b6116ac565b3480156106ee57600080fd5b506102b86106fd366004612e97565b60146020526000908152604090205460ff1681565b34801561071e57600080fd5b506103476116b7565b34801561073357600080fd5b506107476107423660046130ab565b6116fe565b6040516102c491906133ac565b34801561076057600080fd5b5061034761076f366004612f1e565b61180b565b34801561078057600080fd5b50610347611843565b34801561079557600080fd5b506103476107a4366004613093565b6118de565b3480156107b557600080fd5b506102e26107c4366004613093565b6119e3565b3480156107d557600080fd5b506107e96107e4366004612e97565b611ac6565b6040516102c491906133f9565b34801561080257600080fd5b506102e26108113660046130cc565b611bef565b34801561082257600080fd5b5061035a6101f481565b34801561083857600080fd5b5061035a600b5481565b34801561084e57600080fd5b506102b861085d366004613093565b611cce565b34801561086e57600080fd5b506102b861087d366004612eb1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108b757600080fd5b506103476108c6366004612e97565b611d37565b3480156108d757600080fd5b506103476108e63660046130ab565b611dcf565b60006001600160e01b0319821663780e9d6360e01b1480610910575061091082611e21565b90505b919050565b6060600080546109279061363e565b80601f01602080910402602001604051908101604052809291908181526020018280546109539061363e565b80156109a05780601f10610975576101008083540402835291602001916109a0565b820191906000526020600020905b81548152906001019060200180831161098357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a285760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a4f8261127c565b9050806001600160a01b0316836001600160a01b03161415610abd5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a1f565b336001600160a01b0382161480610ad95750610ad9813361087d565b610b4b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a1f565b610b558383611e71565b505050565b610b643382611edf565b610b805760405162461bcd60e51b8152600401610a1f906134f8565b610b55838383611fd5565b6000610b96836113cc565b8210610bf85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a1f565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b60606040518060600160405280602481526020016136fb60249139610c49848461201c565b604051806040016040528060118152602001701116113232b9b1b934b83a34b7b7111d1160791b8152506040518060400160405280601281526020017111161132bc3a32b93730b62fbab936111d1160711b815250610ce0604080517f68747470733a2f2f7777772e6e6674626f7865732e696f2f0000000000000000602082015281516018818303018152603890910190915290565b604051602001610cf49594939291906131a1565b604051602081830303815290604052905092915050565b600d8160038110610d1b57600080fd5b0154905081565b600a546001600160a01b03163314610d4c5760405162461bcd60e51b8152600401610a1f906134c3565b600c805460ff19169055565b610b558383836040518060200160405280600081525061180b565b6000610d7e60085490565b8210610de15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a1f565b60088281548110610e0257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601554610100900460ff1615610e655760405162461bcd60e51b81526020600482015260166024820152752737ba1030baba3437b934b9b2b2103a3790313abc9760511b6044820152606401610a1f565b60ff82161580610e7857508160ff166001145b80610e8657508160ff166002145b610ec95760405162461bcd60e51b815260206004820152601460248201527314dd588e8815dc9bdb99c81cdd58881b5bd9195b60621b6044820152606401610a1f565b600b5460085410610f1c5760405162461bcd60e51b815260206004820181905260248201527f4e6f206d6f72652073756273206f662074686174207469657220746f206275796044820152606401610a1f565b600d8260ff1660038110610f4057634e487b7160e01b600052603260045260246000fd5b01543414610f795760405162461bcd60e51b815260206004820152600660248201526521707269636560d01b6044820152606401610a1f565b6101f46010541015611095576040805160608101825260ff84168152600c54610100900463ffffffff166020820152908101610fb484612037565b63ffffffff1681525060136000601060008154610fd090613679565b9182905550815260208082019290925260409081016000208351815493850151949092015163ffffffff1990931663ffffffff9283161767ffffffff000000001916600160201b948316949094029390931763ffffffff60401b1916600160401b9190921602179055601054611047908290612079565b6010546040805160ff851681523460208201526001600160a01b038416917f5e195f0c34eac4627d79ae413c5df65a2a608fd9df11bcda3be51b8587b7f2f0910160405180910390a3611212565b6000601254116110f15760405162461bcd60e51b815260206004820152602160248201527f4e6f207375627320617661696c61626c652c20747279206e657874206d6f6e746044820152600d60fb1b6064820152608401610a1f565b60006011600060126000815461110690613627565b91829055508152602080820192909252604090810160002054815160608101835260ff87168152600c54610100900463ffffffff16938101939093529250810161114f85612037565b63ffffffff908116909152600083815260136020908152604091829020845181549286015195909301518416600160401b0263ffffffff60401b19958516600160201b0267ffffffff00000000199490951663ffffffff19909316929092179290921692909217929092161790556111c78282612079565b6040805160ff8516815234602082015282916001600160a01b038516917f5e195f0c34eac4627d79ae413c5df65a2a608fd9df11bcda3be51b8587b7f2f091015b60405180910390a3505b5050565b600a546001600160a01b031633146112405760405162461bcd60e51b8152600401610a1f906134c3565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611279573d6000803e3d6000fd5b50565b6000818152600260205260408120546001600160a01b0316806109105760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a1f565b600a546001600160a01b0316331461131d5760405162461bcd60e51b8152600401610a1f906134c3565b6101f481111561132c57600080fd5b600b55565b60155460ff161561134157600080fd5b60158054600160ff199182168117909255600c8054671b0fcaab20030000600d5567336acddebcd28000600e55674911099ad66e8000600f5590911690911764ffffffff00191661010017905581516113a1906000906020850190612d3a565b5080516113b5906001906020840190612d3a565b5050600a80546001600160a01b0319163317905550565b60006001600160a01b0382166114375760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a1f565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461147d5760405162461bcd60e51b8152600401610a1f906134c3565b61148760006121c8565b565b600a546001600160a01b03163314610e655760405162461bcd60e51b8152600401610a1f906134c3565b600a546001600160a01b031633146114dd5760405162461bcd60e51b8152600401610a1f906134c3565b600c805460ff19166001179055565b6112798133610e14565b600080611502846113cc565b905060005b818110156115a157600061151b8683610b8b565b6000818152601360209081526040918290208251606081018452905463ffffffff808216808452600160201b8304821694840194909452600160401b9091041692810192909252919250908614801561157a575061157882611cce565b155b1561158c576001945050505050610c1e565b5050808061159990613679565b915050611507565b506000949350505050565b6060600180546109279061363e565b6115c481611cce565b6115fe5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195e1c1a5c995960aa1b6044820152606401610a1f565b6012805482916011916000918261161483613679565b90915550815260208082019290925260409081016000908120939093558383526013909152902080546bffffffffffffffffffffffff191690556112798161221a565b600a546001600160a01b031633146116815760405162461bcd60e51b8152600401610a1f906134c3565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b6112123383836122c2565b600a546001600160a01b031633146116e15760405162461bcd60e51b8152600401610a1f906134c3565b6015805461ff001981166101009182900460ff1615909102179055565b60608167ffffffffffffffff81111561172757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611750578160200160208202803683370190505b509050825b61175f8385613549565b811015611804576000818152600260205260409020546001600160a01b0316156117f257600061178e8261127c565b905061179982611cce565b6117f0576117a68261127c565b836117b187856135e4565b815181106117cf57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b505b806117fc81613679565b915050611755565b5092915050565b6118153383611edf565b6118315760405162461bcd60e51b8152600401610a1f906134f8565b61183d84848484612389565b50505050565b3360009081526014602052604090205460ff166118a25760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420617574686f726973656420746f20657865637574652e0000000000006044820152606401610a1f565b600c8054610100900463ffffffff169060016118bd83613694565b91906101000a81548163ffffffff021916908363ffffffff16021790555050565b600a546001600160a01b031633146119085760405162461bcd60e51b8152600401610a1f906134c3565b61191181611cce565b156119485760405162461bcd60e51b8152602060048201526007602482015266115e1c1a5c995960ca1b6044820152606401610a1f565b60008181526013602090815260408083208151606081018352905463ffffffff8082168352600160201b8204811694830194909452600160401b9004909216908201526012805491928492601192826119a083613679565b90915550815260208082019290925260409081016000908120939093558483526013909152902080546bffffffffffffffffffffffff191690556112128261221a565b6000818152601360209081526040808320815160608082018452915463ffffffff8082168352600160201b8204811683870152600160401b909104168184015285855260029093529220546001600160a01b0316611a4057600080fd5b611a5483826000015163ffffffff16610c24565b611a9e611a648360000151612037565b63ffffffff16600c60019054906101000a900463ffffffff1663ffffffff16846020015163ffffffff16856040015163ffffffff16611bef565b604051602001611aaf9291906132fa565b604051602081830303815290604052915050919050565b60606000611ad3836113cc565b90508067ffffffffffffffff811115611afc57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b4757816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611b1a5790505b50915060005b81811015611be85760136000611b638684610b8b565b815260208082019290925260409081016000208151606081018352905463ffffffff8082168352600160201b8204811694830194909452600160401b9004909216908201528351849083908110611bca57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611be090613679565b915050611b4d565b5050919050565b60606040518060400160405280601081526020016f222c2261747472696275746573223a5b60801b815250611c23866123bc565b611c58611c3086886135e4565b851115611c5057611c4186886135e4565b611c4b90866135e4565b611c53565b60005b612441565b6040518060400160405280600a815260200169161134b6b0b3b2911d1160b11b815250611c8489612493565b60405180604001604052806002815260200161227d60f01b815250604051602001611cb49695949392919061327b565b60405160208183030381529060405290505b949350505050565b60008181526013602090815260408083208151606081018352905463ffffffff8082168352600160201b82048116948301859052600160401b9091048116928201839052600c5491936101009092041691611d2891613561565b63ffffffff1611159392505050565b600a546001600160a01b03163314611d615760405162461bcd60e51b8152600401610a1f906134c3565b6001600160a01b038116611dc65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a1f565b611279816121c8565b600a546001600160a01b03163314611df95760405162461bcd60e51b8152600401610a1f906134c3565b80600d8360038110611e1b57634e487b7160e01b600052603260045260246000fd5b01555050565b60006001600160e01b031982166380ac58cd60e01b1480611e5257506001600160e01b03198216635b5e139f60e01b145b8061091057506301ffc9a760e01b6001600160e01b0319831614610910565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ea68261127c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f585760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a1f565b6000611f638361127c565b9050806001600160a01b0316846001600160a01b03161480611faa57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611cc65750836001600160a01b0316611fc3846109aa565b6001600160a01b031614949350505050565b600c5460ff16156120115760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610a1f565b610b55838383612600565b6060612027826127a7565b604051602001610cf49190613329565b600060ff821661204957506003610913565b60ff82166001141561205d57506006610913565b60ff82166002141561207157506009610913565b506000919050565b6001600160a01b0382166120cf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a1f565b6000818152600260205260409020546001600160a01b0316156121345760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a1f565b61214060008383612873565b6001600160a01b0382166000908152600360205260408120805460019290612169908490613549565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611212565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006122258261127c565b905061223381600084612873565b61223e600083611e71565b6001600160a01b03811660009081526003602052604081208054600192906122679084906135e4565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4611212565b816001600160a01b0316836001600160a01b031614156123245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a1f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101611208565b612394848484611fd5565b6123a084848484612930565b61183d5760405162461bcd60e51b8152600401610a1f90613471565b60606040518060400160405280601f81526020017f7b2274726169745f74797065223a202254696572222c2276616c7565223a22008152506123fd836127a7565b60405180604001604052806003815260200162089f4b60ea1b81525060405160200161242b9392919061315e565b6040516020818303038152906040529050919050565b606060405180606001604052806025815260200161371f6025913961246583612a3a565b60405180604001604052806003815260200162227d5d60e81b81525060405160200161242b9392919061315e565b6060816003141561251957604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d56334761547a714c7681527f475352544175694c51477342554444783444723747376778717452386552687560208201526219131360ea1b604082015260430190565b6040516020818303038152906040529050610913565b816006141561258757604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d5a4274464e7062727381527f74614b7753447a7342337546474d654e376235566a543933556461623245624260208201526232745160e81b604082015260430190565b81600914156125f557604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d50437631444557483681527f7054585856566452336e716361765431627a4e525935516f7952364b457a566a6020820152622ab5b160e91b604082015260430190565b60405160200161242b565b826001600160a01b03166126138261127c565b6001600160a01b0316146126775760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a1f565b6001600160a01b0382166126d95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a1f565b6126e4838383612873565b6126ef600082611e71565b6001600160a01b03831660009081526003602052604081208054600192906127189084906135e4565b90915550506001600160a01b0382166000908152600360205260408120805460019290612746908490613549565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b55565b6060816127c8576040516542726f6e7a6560d01b6020820152602601612503565b81600114156127eb576040516529b4b63b32b960d11b6020820152602601612503565b816002141561280c576040516311dbdb1960e21b6020820152602401612503565b816003141561282f576040516542726f6e7a6560d01b6020820152602601612503565b8160061415612852576040516529b4b63b32b960d11b6020820152602601612503565b8160091415610913576040516311dbdb1960e21b6020820152602401612503565b6001600160a01b0383166128ce576128c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6128f1565b816001600160a01b0316836001600160a01b0316146128f1576128f18382612b80565b6001600160a01b03821661290d5761290881612c1d565b610b55565b826001600160a01b0316826001600160a01b031614610b5557610b558282612cf6565b60006001600160a01b0384163b15612a3257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061297490339089908890889060040161336f565b602060405180830381600087803b15801561298e57600080fd5b505af19250505080156129be575060408051601f3d908101601f191682019092526129bb91810190613016565b60015b612a18573d8080156129ec576040519150601f19603f3d011682016040523d82523d6000602084013e6129f1565b606091505b508051612a105760405162461bcd60e51b8152600401610a1f90613471565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cc6565b506001611cc6565b606081612a5f57506040805180820190915260018152600360fc1b6020820152610913565b8160005b8115612a895780612a7381613679565b9150612a829050600a836135a5565b9150612a63565b60008167ffffffffffffffff811115612ab257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612adc576020820181803683370190505b509050815b8515612b7757612af26001826135e4565b90506000612b01600a886135a5565b612b0c90600a6135c5565b612b1690886135e4565b612b21906030613580565b905060008160f81b905080848481518110612b4c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b6e600a896135a5565b97505050612ae1565b50949350505050565b60006001612b8d846113cc565b612b9791906135e4565b600083815260076020526040902054909150808214612bea576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612c2f906001906135e4565b60008381526009602052604081205460088054939450909284908110612c6557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110612c9457634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612cda57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612d01836113cc565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612d469061363e565b90600052602060002090601f016020900481019282612d685760008555612dae565b82601f10612d8157805160ff1916838001178555612dae565b82800160010185558215612dae579182015b82811115612dae578251825591602001919060010190612d93565b50612dba929150612dbe565b5090565b5b80821115612dba5760008155600101612dbf565b600067ffffffffffffffff80841115612dee57612dee6136ce565b604051601f8501601f19908116603f01168101908282118183101715612e1657612e166136ce565b81604052809350858152868686011115612e2f57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461091357600080fd5b600082601f830112612e70578081fd5b612e7f83833560208501612dd3565b9392505050565b803560ff8116811461091357600080fd5b600060208284031215612ea8578081fd5b612e7f82612e49565b60008060408385031215612ec3578081fd5b612ecc83612e49565b9150612eda60208401612e49565b90509250929050565b600080600060608486031215612ef7578081fd5b612f0084612e49565b9250612f0e60208501612e49565b9150604084013590509250925092565b60008060008060808587031215612f33578081fd5b612f3c85612e49565b9350612f4a60208601612e49565b925060408501359150606085013567ffffffffffffffff811115612f6c578182fd5b8501601f81018713612f7c578182fd5b612f8b87823560208401612dd3565b91505092959194509250565b60008060408385031215612fa9578182fd5b612fb283612e49565b915060208301358015158114612fc6578182fd5b809150509250929050565b60008060408385031215612fe3578182fd5b612fec83612e49565b946020939093013593505050565b60006020828403121561300b578081fd5b8135612e7f816136e4565b600060208284031215613027578081fd5b8151612e7f816136e4565b60008060408385031215613044578182fd5b823567ffffffffffffffff8082111561305b578384fd5b61306786838701612e60565b9350602085013591508082111561307c578283fd5b5061308985828601612e60565b9150509250929050565b6000602082840312156130a4578081fd5b5035919050565b600080604083850312156130bd578182fd5b50508035926020909101359150565b600080600080608085870312156130e1578384fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561310e578081fd5b612e7f82612e86565b60008060408385031215613129578182fd5b612ecc83612e86565b6000815180845261314a8160208601602086016135fb565b601f01601f19169290920160200192915050565b600084516131708184602089016135fb565b8451908301906131848183602089016135fb565b84519101906131978183602088016135fb565b0195945050505050565b6000865160206131b48285838c016135fb565b8751918401916131c78184848c016135fb565b87519201916131d98184848b016135fb565b7f4e4654426f7820737562736372697074696f6e20746861742067756172616e7492019182527f6565732074686520726563657074696f6e206f662061206d6f6e74686c792062818301527337bc103ab73a34b61034ba1032bc3834b932b99760611b6040830152855161325381605485018985016135fb565b855192019161326881605485018489016135fb565b9190910160540198975050505050505050565b60008751602061328e8285838d016135fb565b8851918401916132a18184848d016135fb565b88519201916132b38184848c016135fb565b87519201916132c58184848b016135fb565b86519201916132d78184848a016135fb565b85519201916132e981848489016135fb565b919091019998505050505050505050565b6000835161330c8184602088016135fb565b8351908301906133208183602088016135fb565b01949350505050565b600066027232a2137bc160cd1b8252825161334b8160078501602087016135fb565b6c1029bab139b1b934b83a34b7b760991b6007939091019283015250601401919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133a290830184613132565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133ed5783516001600160a01b0316835292840192918401916001016133c8565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015613451578151805163ffffffff90811686528782015181168887015290860151168585015260609093019290850190600101613416565b5091979650505050505050565b600060208252612e7f6020830184613132565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561355c5761355c6136b8565b500190565b600063ffffffff808316818516808303821115613320576133206136b8565b600060ff821660ff84168060ff0382111561359d5761359d6136b8565b019392505050565b6000826135c057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156135df576135df6136b8565b500290565b6000828210156135f6576135f66136b8565b500390565b60005b838110156136165781810151838201526020016135fe565b8381111561183d5750506000910152565b600081613636576136366136b8565b506000190190565b60028104600182168061365257607f821691505b6020821081141561367357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561368d5761368d6136b8565b5060010190565b600063ffffffff808316818114156136ae576136ae6136b8565b6001019392505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461127957600080fdfe646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d65223a227b2274726169745f74797065223a2022426f786573206c656674222c2276616c7565223a22a264697066735822122057db0feae226a5b42f228ec9e93d5c0dd0e4a14f26c18e6dd87c94664529fdbe64736f6c63430008020033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102935760003560e01c80638456cb591161015a578063b88d4fde116100c1578063d49d51811161007a578063d49d518114610816578063d5abeb011461082c578063d9548e5314610842578063e985e9c514610862578063f2fde38b146108ab578063f7d97577146108cb57610293565b8063b88d4fde14610754578063b8dea09514610774578063c13491f814610789578063c87b56dd146107a9578063cca7cd3a146107c9578063d00f7965146107f657610293565b80639cae6eae116101135780639cae6eae146106885780639f118536146106a8578063a22cb465146106c2578063a74772c8146106e2578063a7fb653e14610712578063aaae61eb1461072757610293565b80638456cb59146105ed57806384e528a2146106025780638da5cb5b14610615578063952444dc1461063357806395d89b41146106535780639bc852f91461066857610293565b80634be3a391116101fe5780636352211e116101b75780636352211e146105455780636f8b44b0146105655780637029144c1461058557806370a08231146105a5578063715018a6146105c557806381db741e146105da57610293565b80634be3a3911461043c5780634f6ccce7146104ac5780635446126d146104cc5780635c183bf8146104df5780635c975abb146104f457806361bc221a1461050e57610293565b80632b5d5042116102505780632b5d5042146103885780632f745c59146103a757806338add3ee146103c75780633f31c4fa146103e75780633f4ba83a1461040757806342842e0e1461041c57610293565b806301ffc9a71461029857806306fdde03146102cd578063081812fc146102ef578063095ea7b31461032757806318160ddd1461034957806323b872dd14610368575b600080fd5b3480156102a457600080fd5b506102b86102b3366004612ffa565b6108eb565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102e2610918565b6040516102c4919061345e565b3480156102fb57600080fd5b5061030f61030a366004613093565b6109aa565b6040516001600160a01b0390911681526020016102c4565b34801561033357600080fd5b50610347610342366004612fd1565b610a44565b005b34801561035557600080fd5b506008545b6040519081526020016102c4565b34801561037457600080fd5b50610347610383366004612ee3565b610b5a565b34801561039457600080fd5b506015546102b890610100900460ff1681565b3480156103b357600080fd5b5061035a6103c2366004612fd1565b610b8b565b3480156103d357600080fd5b506102e26103e23660046130ab565b610c24565b3480156103f357600080fd5b5061035a610402366004613093565b610d0b565b34801561041357600080fd5b50610347610d22565b34801561042857600080fd5b50610347610437366004612ee3565b610d58565b34801561044857600080fd5b50610485610457366004613093565b60136020526000908152604090205463ffffffff80821691600160201b8104821691600160401b9091041683565b6040805163ffffffff948516815292841660208401529216918101919091526060016102c4565b3480156104b857600080fd5b5061035a6104c7366004613093565b610d73565b6103476104da366004613117565b610e14565b3480156104eb57600080fd5b50610347611216565b34801561050057600080fd5b50600c546102b89060ff1681565b34801561051a57600080fd5b50600c5461053090610100900463ffffffff1681565b60405163ffffffff90911681526020016102c4565b34801561055157600080fd5b5061030f610560366004613093565b61127c565b34801561057157600080fd5b50610347610580366004613093565b6112f3565b34801561059157600080fd5b506103476105a0366004613032565b611331565b3480156105b157600080fd5b5061035a6105c0366004612e97565b6113cc565b3480156105d157600080fd5b50610347611453565b6103476105e8366004613117565b611489565b3480156105f957600080fd5b506103476114b3565b6103476106103660046130fd565b6114ec565b34801561062157600080fd5b50600a546001600160a01b031661030f565b34801561063f57600080fd5b506102b861064e366004612fd1565b6114f6565b34801561065f57600080fd5b506102e26115ac565b34801561067457600080fd5b50610347610683366004613093565b6115bb565b34801561069457600080fd5b506103476106a3366004612f97565b611657565b3480156106b457600080fd5b506015546102b89060ff1681565b3480156106ce57600080fd5b506103476106dd366004612f97565b6116ac565b3480156106ee57600080fd5b506102b86106fd366004612e97565b60146020526000908152604090205460ff1681565b34801561071e57600080fd5b506103476116b7565b34801561073357600080fd5b506107476107423660046130ab565b6116fe565b6040516102c491906133ac565b34801561076057600080fd5b5061034761076f366004612f1e565b61180b565b34801561078057600080fd5b50610347611843565b34801561079557600080fd5b506103476107a4366004613093565b6118de565b3480156107b557600080fd5b506102e26107c4366004613093565b6119e3565b3480156107d557600080fd5b506107e96107e4366004612e97565b611ac6565b6040516102c491906133f9565b34801561080257600080fd5b506102e26108113660046130cc565b611bef565b34801561082257600080fd5b5061035a6101f481565b34801561083857600080fd5b5061035a600b5481565b34801561084e57600080fd5b506102b861085d366004613093565b611cce565b34801561086e57600080fd5b506102b861087d366004612eb1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108b757600080fd5b506103476108c6366004612e97565b611d37565b3480156108d757600080fd5b506103476108e63660046130ab565b611dcf565b60006001600160e01b0319821663780e9d6360e01b1480610910575061091082611e21565b90505b919050565b6060600080546109279061363e565b80601f01602080910402602001604051908101604052809291908181526020018280546109539061363e565b80156109a05780601f10610975576101008083540402835291602001916109a0565b820191906000526020600020905b81548152906001019060200180831161098357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a285760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a4f8261127c565b9050806001600160a01b0316836001600160a01b03161415610abd5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a1f565b336001600160a01b0382161480610ad95750610ad9813361087d565b610b4b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a1f565b610b558383611e71565b505050565b610b643382611edf565b610b805760405162461bcd60e51b8152600401610a1f906134f8565b610b55838383611fd5565b6000610b96836113cc565b8210610bf85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a1f565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b60606040518060600160405280602481526020016136fb60249139610c49848461201c565b604051806040016040528060118152602001701116113232b9b1b934b83a34b7b7111d1160791b8152506040518060400160405280601281526020017111161132bc3a32b93730b62fbab936111d1160711b815250610ce0604080517f68747470733a2f2f7777772e6e6674626f7865732e696f2f0000000000000000602082015281516018818303018152603890910190915290565b604051602001610cf49594939291906131a1565b604051602081830303815290604052905092915050565b600d8160038110610d1b57600080fd5b0154905081565b600a546001600160a01b03163314610d4c5760405162461bcd60e51b8152600401610a1f906134c3565b600c805460ff19169055565b610b558383836040518060200160405280600081525061180b565b6000610d7e60085490565b8210610de15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a1f565b60088281548110610e0257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601554610100900460ff1615610e655760405162461bcd60e51b81526020600482015260166024820152752737ba1030baba3437b934b9b2b2103a3790313abc9760511b6044820152606401610a1f565b60ff82161580610e7857508160ff166001145b80610e8657508160ff166002145b610ec95760405162461bcd60e51b815260206004820152601460248201527314dd588e8815dc9bdb99c81cdd58881b5bd9195b60621b6044820152606401610a1f565b600b5460085410610f1c5760405162461bcd60e51b815260206004820181905260248201527f4e6f206d6f72652073756273206f662074686174207469657220746f206275796044820152606401610a1f565b600d8260ff1660038110610f4057634e487b7160e01b600052603260045260246000fd5b01543414610f795760405162461bcd60e51b815260206004820152600660248201526521707269636560d01b6044820152606401610a1f565b6101f46010541015611095576040805160608101825260ff84168152600c54610100900463ffffffff166020820152908101610fb484612037565b63ffffffff1681525060136000601060008154610fd090613679565b9182905550815260208082019290925260409081016000208351815493850151949092015163ffffffff1990931663ffffffff9283161767ffffffff000000001916600160201b948316949094029390931763ffffffff60401b1916600160401b9190921602179055601054611047908290612079565b6010546040805160ff851681523460208201526001600160a01b038416917f5e195f0c34eac4627d79ae413c5df65a2a608fd9df11bcda3be51b8587b7f2f0910160405180910390a3611212565b6000601254116110f15760405162461bcd60e51b815260206004820152602160248201527f4e6f207375627320617661696c61626c652c20747279206e657874206d6f6e746044820152600d60fb1b6064820152608401610a1f565b60006011600060126000815461110690613627565b91829055508152602080820192909252604090810160002054815160608101835260ff87168152600c54610100900463ffffffff16938101939093529250810161114f85612037565b63ffffffff908116909152600083815260136020908152604091829020845181549286015195909301518416600160401b0263ffffffff60401b19958516600160201b0267ffffffff00000000199490951663ffffffff19909316929092179290921692909217929092161790556111c78282612079565b6040805160ff8516815234602082015282916001600160a01b038516917f5e195f0c34eac4627d79ae413c5df65a2a608fd9df11bcda3be51b8587b7f2f091015b60405180910390a3505b5050565b600a546001600160a01b031633146112405760405162461bcd60e51b8152600401610a1f906134c3565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611279573d6000803e3d6000fd5b50565b6000818152600260205260408120546001600160a01b0316806109105760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a1f565b600a546001600160a01b0316331461131d5760405162461bcd60e51b8152600401610a1f906134c3565b6101f481111561132c57600080fd5b600b55565b60155460ff161561134157600080fd5b60158054600160ff199182168117909255600c8054671b0fcaab20030000600d5567336acddebcd28000600e55674911099ad66e8000600f5590911690911764ffffffff00191661010017905581516113a1906000906020850190612d3a565b5080516113b5906001906020840190612d3a565b5050600a80546001600160a01b0319163317905550565b60006001600160a01b0382166114375760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a1f565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461147d5760405162461bcd60e51b8152600401610a1f906134c3565b61148760006121c8565b565b600a546001600160a01b03163314610e655760405162461bcd60e51b8152600401610a1f906134c3565b600a546001600160a01b031633146114dd5760405162461bcd60e51b8152600401610a1f906134c3565b600c805460ff19166001179055565b6112798133610e14565b600080611502846113cc565b905060005b818110156115a157600061151b8683610b8b565b6000818152601360209081526040918290208251606081018452905463ffffffff808216808452600160201b8304821694840194909452600160401b9091041692810192909252919250908614801561157a575061157882611cce565b155b1561158c576001945050505050610c1e565b5050808061159990613679565b915050611507565b506000949350505050565b6060600180546109279061363e565b6115c481611cce565b6115fe5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195e1c1a5c995960aa1b6044820152606401610a1f565b6012805482916011916000918261161483613679565b90915550815260208082019290925260409081016000908120939093558383526013909152902080546bffffffffffffffffffffffff191690556112798161221a565b600a546001600160a01b031633146116815760405162461bcd60e51b8152600401610a1f906134c3565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b6112123383836122c2565b600a546001600160a01b031633146116e15760405162461bcd60e51b8152600401610a1f906134c3565b6015805461ff001981166101009182900460ff1615909102179055565b60608167ffffffffffffffff81111561172757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611750578160200160208202803683370190505b509050825b61175f8385613549565b811015611804576000818152600260205260409020546001600160a01b0316156117f257600061178e8261127c565b905061179982611cce565b6117f0576117a68261127c565b836117b187856135e4565b815181106117cf57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b505b806117fc81613679565b915050611755565b5092915050565b6118153383611edf565b6118315760405162461bcd60e51b8152600401610a1f906134f8565b61183d84848484612389565b50505050565b3360009081526014602052604090205460ff166118a25760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420617574686f726973656420746f20657865637574652e0000000000006044820152606401610a1f565b600c8054610100900463ffffffff169060016118bd83613694565b91906101000a81548163ffffffff021916908363ffffffff16021790555050565b600a546001600160a01b031633146119085760405162461bcd60e51b8152600401610a1f906134c3565b61191181611cce565b156119485760405162461bcd60e51b8152602060048201526007602482015266115e1c1a5c995960ca1b6044820152606401610a1f565b60008181526013602090815260408083208151606081018352905463ffffffff8082168352600160201b8204811694830194909452600160401b9004909216908201526012805491928492601192826119a083613679565b90915550815260208082019290925260409081016000908120939093558483526013909152902080546bffffffffffffffffffffffff191690556112128261221a565b6000818152601360209081526040808320815160608082018452915463ffffffff8082168352600160201b8204811683870152600160401b909104168184015285855260029093529220546001600160a01b0316611a4057600080fd5b611a5483826000015163ffffffff16610c24565b611a9e611a648360000151612037565b63ffffffff16600c60019054906101000a900463ffffffff1663ffffffff16846020015163ffffffff16856040015163ffffffff16611bef565b604051602001611aaf9291906132fa565b604051602081830303815290604052915050919050565b60606000611ad3836113cc565b90508067ffffffffffffffff811115611afc57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b4757816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611b1a5790505b50915060005b81811015611be85760136000611b638684610b8b565b815260208082019290925260409081016000208151606081018352905463ffffffff8082168352600160201b8204811694830194909452600160401b9004909216908201528351849083908110611bca57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611be090613679565b915050611b4d565b5050919050565b60606040518060400160405280601081526020016f222c2261747472696275746573223a5b60801b815250611c23866123bc565b611c58611c3086886135e4565b851115611c5057611c4186886135e4565b611c4b90866135e4565b611c53565b60005b612441565b6040518060400160405280600a815260200169161134b6b0b3b2911d1160b11b815250611c8489612493565b60405180604001604052806002815260200161227d60f01b815250604051602001611cb49695949392919061327b565b60405160208183030381529060405290505b949350505050565b60008181526013602090815260408083208151606081018352905463ffffffff8082168352600160201b82048116948301859052600160401b9091048116928201839052600c5491936101009092041691611d2891613561565b63ffffffff1611159392505050565b600a546001600160a01b03163314611d615760405162461bcd60e51b8152600401610a1f906134c3565b6001600160a01b038116611dc65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a1f565b611279816121c8565b600a546001600160a01b03163314611df95760405162461bcd60e51b8152600401610a1f906134c3565b80600d8360038110611e1b57634e487b7160e01b600052603260045260246000fd5b01555050565b60006001600160e01b031982166380ac58cd60e01b1480611e5257506001600160e01b03198216635b5e139f60e01b145b8061091057506301ffc9a760e01b6001600160e01b0319831614610910565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ea68261127c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f585760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a1f565b6000611f638361127c565b9050806001600160a01b0316846001600160a01b03161480611faa57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611cc65750836001600160a01b0316611fc3846109aa565b6001600160a01b031614949350505050565b600c5460ff16156120115760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610a1f565b610b55838383612600565b6060612027826127a7565b604051602001610cf49190613329565b600060ff821661204957506003610913565b60ff82166001141561205d57506006610913565b60ff82166002141561207157506009610913565b506000919050565b6001600160a01b0382166120cf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a1f565b6000818152600260205260409020546001600160a01b0316156121345760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a1f565b61214060008383612873565b6001600160a01b0382166000908152600360205260408120805460019290612169908490613549565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611212565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006122258261127c565b905061223381600084612873565b61223e600083611e71565b6001600160a01b03811660009081526003602052604081208054600192906122679084906135e4565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4611212565b816001600160a01b0316836001600160a01b031614156123245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a1f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101611208565b612394848484611fd5565b6123a084848484612930565b61183d5760405162461bcd60e51b8152600401610a1f90613471565b60606040518060400160405280601f81526020017f7b2274726169745f74797065223a202254696572222c2276616c7565223a22008152506123fd836127a7565b60405180604001604052806003815260200162089f4b60ea1b81525060405160200161242b9392919061315e565b6040516020818303038152906040529050919050565b606060405180606001604052806025815260200161371f6025913961246583612a3a565b60405180604001604052806003815260200162227d5d60e81b81525060405160200161242b9392919061315e565b6060816003141561251957604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d56334761547a714c7681527f475352544175694c51477342554444783444723747376778717452386552687560208201526219131360ea1b604082015260430190565b6040516020818303038152906040529050610913565b816006141561258757604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d5a4274464e7062727381527f74614b7753447a7342337546474d654e376235566a543933556461623245624260208201526232745160e81b604082015260430190565b81600914156125f557604051602001612503907f68747470733a2f2f697066732e696f2f697066732f516d50437631444557483681527f7054585856566452336e716361765431627a4e525935516f7952364b457a566a6020820152622ab5b160e91b604082015260430190565b60405160200161242b565b826001600160a01b03166126138261127c565b6001600160a01b0316146126775760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a1f565b6001600160a01b0382166126d95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a1f565b6126e4838383612873565b6126ef600082611e71565b6001600160a01b03831660009081526003602052604081208054600192906127189084906135e4565b90915550506001600160a01b0382166000908152600360205260408120805460019290612746908490613549565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b55565b6060816127c8576040516542726f6e7a6560d01b6020820152602601612503565b81600114156127eb576040516529b4b63b32b960d11b6020820152602601612503565b816002141561280c576040516311dbdb1960e21b6020820152602401612503565b816003141561282f576040516542726f6e7a6560d01b6020820152602601612503565b8160061415612852576040516529b4b63b32b960d11b6020820152602601612503565b8160091415610913576040516311dbdb1960e21b6020820152602401612503565b6001600160a01b0383166128ce576128c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6128f1565b816001600160a01b0316836001600160a01b0316146128f1576128f18382612b80565b6001600160a01b03821661290d5761290881612c1d565b610b55565b826001600160a01b0316826001600160a01b031614610b5557610b558282612cf6565b60006001600160a01b0384163b15612a3257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061297490339089908890889060040161336f565b602060405180830381600087803b15801561298e57600080fd5b505af19250505080156129be575060408051601f3d908101601f191682019092526129bb91810190613016565b60015b612a18573d8080156129ec576040519150601f19603f3d011682016040523d82523d6000602084013e6129f1565b606091505b508051612a105760405162461bcd60e51b8152600401610a1f90613471565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cc6565b506001611cc6565b606081612a5f57506040805180820190915260018152600360fc1b6020820152610913565b8160005b8115612a895780612a7381613679565b9150612a829050600a836135a5565b9150612a63565b60008167ffffffffffffffff811115612ab257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612adc576020820181803683370190505b509050815b8515612b7757612af26001826135e4565b90506000612b01600a886135a5565b612b0c90600a6135c5565b612b1690886135e4565b612b21906030613580565b905060008160f81b905080848481518110612b4c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b6e600a896135a5565b97505050612ae1565b50949350505050565b60006001612b8d846113cc565b612b9791906135e4565b600083815260076020526040902054909150808214612bea576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612c2f906001906135e4565b60008381526009602052604081205460088054939450909284908110612c6557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110612c9457634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612cda57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612d01836113cc565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612d469061363e565b90600052602060002090601f016020900481019282612d685760008555612dae565b82601f10612d8157805160ff1916838001178555612dae565b82800160010185558215612dae579182015b82811115612dae578251825591602001919060010190612d93565b50612dba929150612dbe565b5090565b5b80821115612dba5760008155600101612dbf565b600067ffffffffffffffff80841115612dee57612dee6136ce565b604051601f8501601f19908116603f01168101908282118183101715612e1657612e166136ce565b81604052809350858152868686011115612e2f57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461091357600080fd5b600082601f830112612e70578081fd5b612e7f83833560208501612dd3565b9392505050565b803560ff8116811461091357600080fd5b600060208284031215612ea8578081fd5b612e7f82612e49565b60008060408385031215612ec3578081fd5b612ecc83612e49565b9150612eda60208401612e49565b90509250929050565b600080600060608486031215612ef7578081fd5b612f0084612e49565b9250612f0e60208501612e49565b9150604084013590509250925092565b60008060008060808587031215612f33578081fd5b612f3c85612e49565b9350612f4a60208601612e49565b925060408501359150606085013567ffffffffffffffff811115612f6c578182fd5b8501601f81018713612f7c578182fd5b612f8b87823560208401612dd3565b91505092959194509250565b60008060408385031215612fa9578182fd5b612fb283612e49565b915060208301358015158114612fc6578182fd5b809150509250929050565b60008060408385031215612fe3578182fd5b612fec83612e49565b946020939093013593505050565b60006020828403121561300b578081fd5b8135612e7f816136e4565b600060208284031215613027578081fd5b8151612e7f816136e4565b60008060408385031215613044578182fd5b823567ffffffffffffffff8082111561305b578384fd5b61306786838701612e60565b9350602085013591508082111561307c578283fd5b5061308985828601612e60565b9150509250929050565b6000602082840312156130a4578081fd5b5035919050565b600080604083850312156130bd578182fd5b50508035926020909101359150565b600080600080608085870312156130e1578384fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561310e578081fd5b612e7f82612e86565b60008060408385031215613129578182fd5b612ecc83612e86565b6000815180845261314a8160208601602086016135fb565b601f01601f19169290920160200192915050565b600084516131708184602089016135fb565b8451908301906131848183602089016135fb565b84519101906131978183602088016135fb565b0195945050505050565b6000865160206131b48285838c016135fb565b8751918401916131c78184848c016135fb565b87519201916131d98184848b016135fb565b7f4e4654426f7820737562736372697074696f6e20746861742067756172616e7492019182527f6565732074686520726563657074696f6e206f662061206d6f6e74686c792062818301527337bc103ab73a34b61034ba1032bc3834b932b99760611b6040830152855161325381605485018985016135fb565b855192019161326881605485018489016135fb565b9190910160540198975050505050505050565b60008751602061328e8285838d016135fb565b8851918401916132a18184848d016135fb565b88519201916132b38184848c016135fb565b87519201916132c58184848b016135fb565b86519201916132d78184848a016135fb565b85519201916132e981848489016135fb565b919091019998505050505050505050565b6000835161330c8184602088016135fb565b8351908301906133208183602088016135fb565b01949350505050565b600066027232a2137bc160cd1b8252825161334b8160078501602087016135fb565b6c1029bab139b1b934b83a34b7b760991b6007939091019283015250601401919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133a290830184613132565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133ed5783516001600160a01b0316835292840192918401916001016133c8565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015613451578151805163ffffffff90811686528782015181168887015290860151168585015260609093019290850190600101613416565b5091979650505050505050565b600060208252612e7f6020830184613132565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561355c5761355c6136b8565b500190565b600063ffffffff808316818516808303821115613320576133206136b8565b600060ff821660ff84168060ff0382111561359d5761359d6136b8565b019392505050565b6000826135c057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156135df576135df6136b8565b500290565b6000828210156135f6576135f66136b8565b500390565b60005b838110156136165781810151838201526020016135fe565b8381111561183d5750506000910152565b600081613636576136366136b8565b506000190190565b60028104600182168061365257607f821691505b6020821081141561367357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561368d5761368d6136b8565b5060010190565b600063ffffffff808316818114156136ae576136ae6136b8565b6001019392505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461127957600080fdfe646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d65223a227b2274726169745f74797065223a2022426f786573206c656674222c2276616c7565223a22a264697066735822122057db0feae226a5b42f228ec9e93d5c0dd0e4a14f26c18e6dd87c94664529fdbe64736f6c63430008020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string):
Arg [1] : _symbol (string):
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.