Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
0 TeTeru NFT
Holders
199
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 TeTeru NFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
EcoNFT
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // ERC20 interface import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; // ERC721 import "@openzeppelin/contracts/access/Ownable.sol"; // OZ: Ownable import "@openzeppelin/contracts/utils/math/SafeMath.sol"; // OZ: SafeMath import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // OZ: ReentrancyGuard import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; // OZ: EnumerableSet contract EcoNFT is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; using Strings for string; using Strings for uint256; using EnumerableSet for EnumerableSet.UintSet; uint256 public constant PINO_NFT_SIZE = 1080; uint256 public constant TERU_NFT_LEVEL_LEN = 5; bool public is_synthetic; // synthetics opened EnumerableSet.UintSet internal mintedTokenIds; uint256 internal fee; uint256 public mintSize; uint256 public startIndex; //inclusive uint256 public endIndex; //exclusive uint256 public pinoStartIndex; //inclusive uint256 public pinoEndIndex; //exclusive uint256 public airdropStartIndex; //inclusive uint256 public syntheticStartIndex; //inclusive uint256 public boxSold; uint256 public nftMinted; uint256 public pinoNftMinted; uint256 public airdropNftMinted; uint256 public mintFeeETH; uint256 public mintFeeToken; uint256 public pinoMintFeeETH; uint256 public pinoMintFeeToken; address public teamWallet; IERC20 public immutable EsgToken; mapping(uint256 => uint256) public levels; mapping(bytes32 => address) requestToSender; mapping (uint256 => address) internal depositOf; /** * Events */ event BuyLuckyBoxETH(address indexed account, uint256 tokenId, uint256 cost); event BuyLuckyBoxESG(address indexed account, uint256 tokenId, uint256 cost); event NFTSyntheticed(address indexed pinoNftOwner, uint256 indexed pinoTokenId, uint256 indexed teruTokenId, uint256 tokenId, uint256 teruNftLevel); /** * */ constructor(address _esgToken) ERC721("TeTeru NFT", "TeTeru NFT") { EsgToken = IERC20(_esgToken); fee = 0.1 * 10**18; // 0.1 LINK mintSize = 1000; startIndex = 0; endIndex = 1000; pinoStartIndex = 10000; pinoEndIndex = 11000; airdropStartIndex = 20000; syntheticStartIndex = 30000; airdropNftMinted = 0; pinoNftMinted = 0; mintFeeETH = 0.3 * 10**18; //0.3 ETH mintFeeToken = 476 * 10**18; //320 ESG pinoMintFeeETH = 0.08 * 10**18; //0.1 ETH pinoMintFeeToken = 158 * 10**18; //120 ESG teamWallet = 0x9e3ee009c2E8103Fb2D358d64C80249eF108e33B; is_synthetic = false; } function getLevelById(uint256 id) internal pure returns(uint256){ if(id<410) return 1; if(id<740) return 2; if(id<910) return 3; if(id<990) return 4; if(id<1000) return 5; return 0; } //buy a lucky box function requestNewRandomNFTETH(address referrer) public payable nonReentrant returns (uint256) { require( referrer != address(0), "Invalid referrer" ); require(msg.value >= mintFeeETH, "INSUFFICIENT MINT COST ETH"); uint256 newId = random(1000); boxSold = boxSold.add(1); if(_exists(newId)) { for(uint256 i=startIndex; i < endIndex; i++) { if(!_exists(i)) { newId = i; break; } } require(!_exists(newId), "BOX SOLD OUT"); } nftMinted = nftMinted.add(1); levels[newId] = getLevelById(newId); payable(referrer).transfer(msg.value.div(20)); payable(teamWallet).transfer(msg.value.mul(19).div(20)); _safeMint(msg.sender, newId); EnumerableSet.add(mintedTokenIds, newId); emit BuyLuckyBoxETH(msg.sender, newId, msg.value); return newId; } function requestNewRandomNFTToken(address referrer) public nonReentrant returns (uint256) { require( referrer != address(0), "Invalid referrer" ); require(EsgToken.balanceOf(msg.sender) >= mintFeeToken, "INSUFFICIENT MINT COST TOKEN"); EsgToken.transferFrom(msg.sender, address(this), mintFeeToken); uint256 newId = random(1000); boxSold = boxSold.add(1); if(_exists(newId)) { for(uint256 i=startIndex; i < endIndex; i++) { if(!_exists(i)) { newId = i; break; } } require(!_exists(newId), "BOX SOLD OUT"); } nftMinted = nftMinted.add(1); levels[newId] = getLevelById(newId); EsgToken.transfer(referrer, mintFeeToken.div(20)); EsgToken.transfer(teamWallet, mintFeeToken.mul(19).div(20)); _safeMint(msg.sender, newId); EnumerableSet.add(mintedTokenIds, newId); emit BuyLuckyBoxESG(msg.sender, newId, mintFeeToken); return newId; } /** * @notice Synthetic two kinds of NFT to one Gold NFT(Teru and Pino) * @param pinoTokenId The tokenId of Pino NFT to be deposited * @param teruTokenId The tokenId of Teru NFT to be deposited * @return Success indicator for success */ function synthetic(uint256 pinoTokenId, uint256 teruTokenId) external nonReentrant returns (bool) { require(is_synthetic == true, "sythentic is not open."); uint256 pinoNftLevel = EcoNFT(address(this)).getLevel(pinoTokenId); require(pinoNftLevel == 0, "Pino NFT accepted."); require(depositOf[pinoTokenId] == address(0), "Pino token already sythenticed"); address pinoNftOwner = EcoNFT(address(this)).ownerOf(pinoTokenId); EcoNFT(address(this)).safeTransferFrom(pinoNftOwner, address(this), pinoTokenId); depositOf[pinoTokenId] = pinoNftOwner; uint256 teruNftLevel = EcoNFT(address(this)).getLevel(teruTokenId); require(teruNftLevel > 0, "Teru NFT accepted."); require(depositOf[teruTokenId] == address(0), "Teru token already sythenticed"); address teruNftOwner = EcoNFT(address(this)).ownerOf(teruTokenId); EcoNFT(address(this)).safeTransferFrom(teruNftOwner, address(this), teruTokenId); depositOf[teruTokenId] = teruNftOwner; uint256 aStartIndex = syntheticStartIndex; uint256 newId = aStartIndex.add(1); require(!_exists(newId), "NFT minted."); nftMinted = nftMinted.add(1); _safeMint(msg.sender, newId); EnumerableSet.add(mintedTokenIds, newId); levels[newId] = teruNftLevel.add(TERU_NFT_LEVEL_LEN); emit NFTSyntheticed(pinoNftOwner, pinoTokenId, teruTokenId, newId, teruNftLevel); return true; } function airdropMint(address receipient) external onlyOwner { uint256 aStartIndex = airdropStartIndex.add(airdropNftMinted); for(uint256 i=0; i < 20; i++) { uint256 newId = aStartIndex.add(i); require(!_exists(newId), "NFT minted."); nftMinted = nftMinted.add(1); airdropNftMinted = airdropNftMinted.add(1); levels[newId] = 0; _safeMint(receipient, newId); EnumerableSet.add(mintedTokenIds, newId); } } function pinoMintETH(address referrer, address receipient) public payable nonReentrant { require(referrer != address(0), "invalid address"); require(receipient != address(0), "invalid address"); require(msg.value >= pinoMintFeeETH, "INSUFFICIENT MINT COST ETH"); uint256 newId = pinoStartIndex.add(pinoNftMinted); require(newId < pinoEndIndex, "tokenId exceeds limit"); require(!_exists(newId), "NFT minted."); nftMinted = nftMinted.add(1); pinoNftMinted = pinoNftMinted.add(1); payable(referrer).transfer(msg.value.div(20)); payable(teamWallet).transfer(msg.value.mul(19).div(20)); levels[newId] = 0; _safeMint(receipient, newId); EnumerableSet.add(mintedTokenIds, newId); } function pinoMintToken(address referrer, address receipient) public nonReentrant { require(referrer != address(0), "invalid address"); require(receipient != address(0), "invalid address"); require(EsgToken.balanceOf(msg.sender) >= pinoMintFeeToken, "INSUFFICIENT MINT COST TOKEN"); EsgToken.transferFrom(msg.sender, address(this), pinoMintFeeToken); uint256 newId = pinoStartIndex.add(pinoNftMinted); require(newId < pinoEndIndex, "tokenId exceeds limit"); require(!_exists(newId), "NFT minted."); nftMinted = nftMinted.add(1); pinoNftMinted = pinoNftMinted.add(1); EsgToken.transfer(referrer, pinoMintFeeToken.div(20)); EsgToken.transfer(teamWallet, pinoMintFeeToken.mul(19).div(20)); levels[newId] = 0; _safeMint(receipient, newId); EnumerableSet.add(mintedTokenIds, newId); } function random(uint number) internal view returns(uint) { return uint(keccak256(abi.encodePacked(block.timestamp,block.difficulty,msg.sender))) % number; } function getLevel(uint256 tokenId) public view returns (uint256) { return levels[tokenId]; } function getNumberOfBoxSold() external view returns (uint256) { return boxSold; } function getMintedNFTLength() external view returns (uint256) { return EnumerableSet.length(mintedTokenIds); } function getMintedNFT(uint256 index) external view returns (uint256) { return EnumerableSet.at(mintedTokenIds, index); } /// @notice Returns metadata about a token (depending on randomness reveal status) /// @dev Partially implemented, returns only example string of randomness-dependent content function tokenURI(uint256 tokenId) override public pure returns (string memory) { string[2] memory parts; parts[0] = 'https://econft.market/service/meta.php?id='; parts[1] = string(tokenId.toString()); string memory output = string(abi.encodePacked(parts[0], parts[1])); return output; } function tokenURIExtend(uint256 tokenId) public pure returns (string memory, string memory) { string[3] memory parts; parts[0] = 'https://econft.market'; parts[1] = '/service/meta.php?id='; parts[2] = string(tokenId.toString()); string memory api = string(abi.encodePacked(parts[1], parts[2])); return (parts[0], api); } // admin functions function _setMintSize(uint256 size) public onlyOwner { require(size != 0); mintSize = size; } function _setStartIndex(uint256 startId) public onlyOwner { startIndex = startId; } function _setEndIndex(uint256 endId) public onlyOwner { require(endId != 0); endIndex = endId; } function _setLevelsMap(uint256[] memory ids, uint256[] memory lvs) public onlyOwner { require(ids.length != 0 && ids.length == lvs.length); for(uint256 i=0; i< ids.length; i++) levels[ids[i]] = lvs[i]; } function _setMintFeeETH(uint256 _mintFee) public onlyOwner { require(_mintFee != 0); mintFeeETH = _mintFee; } function _setMintFeeToken(uint256 _mintFee) public onlyOwner { require(_mintFee != 0); mintFeeToken = _mintFee; } function _setPinoMintFeeETH(uint256 _mintFee) public onlyOwner { require(_mintFee != 0); pinoMintFeeETH = _mintFee; } function _setPinoMintFeeToken(uint256 _mintFee) public onlyOwner { require(_mintFee != 0); pinoMintFeeToken = _mintFee; } function _setTeamWallet(address _wallet) public onlyOwner { require(_wallet != address(0)); teamWallet = _wallet; } function _withdrawERC20Token(address token) public onlyOwner { uint256 amount = IERC20(token).balanceOf(address(this)); if(amount > 0) IERC20(token).transfer(teamWallet, amount); } function _withdrawETH() public onlyOwner { uint256 amount = address(this).balance; if(amount > 0) payable(teamWallet).transfer(amount); } /** * @notice Update synthetic status * @param flag If synthetic should be opened. */ function _updateIsSynthetic(bool flag) external onlyOwner { is_synthetic = flag; } function _setPinoEndIndex(uint256 endId) public onlyOwner { pinoEndIndex = endId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden 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 || getApproved(tokenId) == spender || isApprovedForAll(owner, 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.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 0 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_esgToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"BuyLuckyBoxESG","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"BuyLuckyBoxETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pinoNftOwner","type":"address"},{"indexed":true,"internalType":"uint256","name":"pinoTokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"teruTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"teruNftLevel","type":"uint256"}],"name":"NFTSyntheticed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"EsgToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PINO_NFT_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TERU_NFT_LEVEL_LEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"endId","type":"uint256"}],"name":"_setEndIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"lvs","type":"uint256[]"}],"name":"_setLevelsMap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"_setMintFeeETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"_setMintFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"}],"name":"_setMintSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"endId","type":"uint256"}],"name":"_setPinoEndIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"_setPinoMintFeeETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"_setPinoMintFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startId","type":"uint256"}],"name":"_setStartIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"_setTeamWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"flag","type":"bool"}],"name":"_updateIsSynthetic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"_withdrawERC20Token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receipient","type":"address"}],"name":"airdropMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airdropNftMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdropStartIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boxSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getMintedNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintedNFTLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumberOfBoxSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"is_synthetic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"levels","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFeeETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFeeToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintSize","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":"nftMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pinoEndIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"receipient","type":"address"}],"name":"pinoMintETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pinoMintFeeETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pinoMintFeeToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"receipient","type":"address"}],"name":"pinoMintToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pinoNftMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pinoStartIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"}],"name":"requestNewRandomNFTETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"}],"name":"requestNewRandomNFTToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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":[],"name":"startIndex","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pinoTokenId","type":"uint256"},{"internalType":"uint256","name":"teruTokenId","type":"uint256"}],"name":"synthetic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"syntheticStartIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURIExtend","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162003d1938038062003d19833981016040819052620000349162000258565b604080518082018252600a80825269151955195c9d4813919560b21b6020808401828152855180870190965292855284015281519192916200007991600091620001b2565b5080516200008f906001906020840190620001b2565b5050600160065550620000a23362000160565b60601b6001600160601b03191660805267016345785d8a0000600a556103e8600b8190556000600c819055600d91909155612710600e55612af8600f55614e206010556175306011556015819055601455670429d069189e00006016556819cdd3b60b3df0000060175567011c37937e080000601855680890b0c2e14fb80000601955601a8054739e3ee009c2e8103fb2d358d64c80249ef108e33b6001600160a01b03199091161790556007805460ff60a01b19169055620002c5565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001c09062000288565b90600052602060002090601f016020900481019282620001e457600085556200022f565b82601f10620001ff57805160ff19168380011785556200022f565b828001600101855582156200022f579182015b828111156200022f57825182559160200191906001019062000212565b506200023d92915062000241565b5090565b5b808211156200023d576000815560010162000242565b6000602082840312156200026a578081fd5b81516001600160a01b038116811462000281578182fd5b9392505050565b600181811c908216806200029d57607f821691505b60208210811415620002bf57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c6139fd6200031c6000396000818161064c01528181611d4101528181611dfe01528181611f4a01528181611ffe0152818161242e015281816124eb015281816125ff01526126c301526139fd6000f3fe6080604052600436106102b25760003560e01c806301ffc9a7146102b757806306fdde03146102ec578063081812fc1461030e578063095ea7b31461033b5780630c90b7e61461035d57806316ca48e31461037d57806317165eca146103a157806323b872dd146103c157806323bcfc00146103e1578063241c590c146104015780632b4c695b146104215780632b52834d146104375780632f53a8c6146104575780633651f5e41461046d5780633b4539cb146104835780633e0e828b1461049857806342842e0e146104ae578063433355a9146104ce5780634a0ef768146104ee5780634ca0cbfc14610504578063552d64f41461052557806359927044146105455780635ac293c914610565578063607870ff1461057b5780636352211e1461059b57806370a08231146105bb578063715018a6146105db57806376bde4f5146105f057806377b65e1a146106055780637b5e26af1461061a5780637e54a9241461063a57806386481d401461066e5780638da5cb5b1461069b57806395d89b41146106b0578063a1b4e76d146106c5578063a22cb465146106e5578063a30932e214610705578063a30a88cd1461071b578063a4821cda1461073b578063a57524ae14610751578063b005866c14610771578063b22b382d14610791578063b2596a67146107a6578063b80ec98d146107d3578063b88d4fde146107f3578063bfa291f314610813578063c4c6903314610841578063c77e4a4f14610857578063c87b56dd1461086d578063d231304b1461088d578063d37f5275146108a0578063d45458ab146108b6578063df1a7775146108cc578063df526978146108ec578063e0dc35b814610902578063e1fd7fbd14610922578063e985e9c514610938578063ed0d016f14610958578063f2fde38b1461096b578063f9567d191461098b578063fd62525a146109ab575b600080fd5b3480156102c357600080fd5b506102d76102d23660046133e1565b6109c1565b60405190151581526020015b60405180910390f35b3480156102f857600080fd5b50610301610a15565b6040516102e39190613553565b34801561031a57600080fd5b5061032e610329366004613419565b610aa7565b6040516102e391906134c5565b34801561034757600080fd5b5061035b61035636600461331e565b610b34565b005b34801561036957600080fd5b5061035b610378366004613419565b610c45565b34801561038957600080fd5b5061039360195481565b6040519081526020016102e3565b3480156103ad57600080fd5b5061035b6103bc366004613419565b610c83565b3480156103cd57600080fd5b5061035b6103dc3660046131f6565b610cc1565b3480156103ed57600080fd5b5061035b6103fc366004613349565b610cf2565b34801561040d57600080fd5b5061035b61041c366004613419565b610dc0565b34801561042d57600080fd5b5061039360115481565b34801561044357600080fd5b5061035b610452366004613419565b610dfe565b34801561046357600080fd5b5061039360185481565b34801561047957600080fd5b5061039360135481565b34801561048f57600080fd5b5061035b610e3c565b3480156104a457600080fd5b50610393600c5481565b3480156104ba57600080fd5b5061035b6104c93660046131f6565b610eb1565b3480156104da57600080fd5b5061035b6104e9366004613419565b610ecc565b3480156104fa57600080fd5b50610393600b5481565b34801561051057600080fd5b506007546102d790600160a01b900460ff1681565b34801561053157600080fd5b5061035b610540366004613186565b610f00565b34801561055157600080fd5b50601a5461032e906001600160a01b031681565b34801561057157600080fd5b50610393600d5481565b34801561058757600080fd5b5061035b610596366004613419565b61103c565b3480156105a757600080fd5b5061032e6105b6366004613419565b61107a565b3480156105c757600080fd5b506103936105d6366004613186565b6110f1565b3480156105e757600080fd5b5061035b611178565b3480156105fc57600080fd5b50610393600581565b34801561061157600080fd5b50601254610393565b34801561062657600080fd5b5061035b610635366004613186565b6111b3565b34801561064657600080fd5b5061032e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067a57600080fd5b50610393610689366004613419565b6000908152601b602052604090205490565b3480156106a757600080fd5b5061032e611298565b3480156106bc57600080fd5b506103016112a7565b3480156106d157600080fd5b506102d76106e0366004613449565b6112b6565b3480156106f157600080fd5b5061035b6107003660046132f1565b611832565b34801561071157600080fd5b5061039360155481565b34801561072757600080fd5b5061035b6107363660046133a9565b61183d565b34801561074757600080fd5b50610393600f5481565b34801561075d57600080fd5b5061035b61076c366004613419565b61188a565b34801561077d57600080fd5b5061039361078c366004613419565b6118be565b34801561079d57600080fd5b506103936118cb565b3480156107b257600080fd5b506103936107c1366004613419565b601b6020526000908152604090205481565b3480156107df57600080fd5b5061035b6107ee366004613186565b6118dc565b3480156107ff57600080fd5b5061035b61080e366004613236565b611940565b34801561081f57600080fd5b5061083361082e366004613419565b611978565b6040516102e3929190613566565b34801561084d57600080fd5b5061039360175481565b34801561086357600080fd5b5061039360105481565b34801561087957600080fd5b50610301610888366004613419565b611a26565b61039361089b366004613186565b611a88565b3480156108ac57600080fd5b5061039361043881565b3480156108c257600080fd5b5061039360125481565b3480156108d857600080fd5b5061035b6108e7366004613419565b611c99565b3480156108f857600080fd5b50610393600e5481565b34801561090e57600080fd5b5061039361091d366004613186565b611cd7565b34801561092e57600080fd5b5061039360165481565b34801561094457600080fd5b506102d76109533660046131be565b6120fd565b61035b6109663660046131be565b61212d565b34801561097757600080fd5b5061035b610986366004613186565b612303565b34801561099757600080fd5b5061035b6109a63660046131be565b6123a0565b3480156109b757600080fd5b5061039360145481565b60006001600160e01b031982166380ac58cd60e01b14806109f257506001600160e01b03198216635b5e139f60e01b145b80610a0d57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b606060008054610a2490613898565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5090613898565b8015610a9d5780601f10610a7257610100808354040283529160200191610a9d565b820191906000526020600020905b815481529060010190602001808311610a8057829003601f168201915b5050505050905090565b6000610ab28261276f565b610b185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b3f8261107a565b9050806001600160a01b0316836001600160a01b03161415610bad5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b0f565b336001600160a01b0382161480610bc95750610bc98133610953565b610c365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610b0f565b610c40838361278c565b505050565b33610c4e611298565b6001600160a01b031614610c745760405162461bcd60e51b8152600401610b0f906136c1565b80610c7e57600080fd5b601755565b33610c8c611298565b6001600160a01b031614610cb25760405162461bcd60e51b8152600401610b0f906136c1565b80610cbc57600080fd5b601855565b610ccb33826127fa565b610ce75760405162461bcd60e51b8152600401610b0f90613752565b610c408383836128c4565b33610cfb611298565b6001600160a01b031614610d215760405162461bcd60e51b8152600401610b0f906136c1565b815115801590610d32575080518251145b610d3b57600080fd5b60005b8251811015610c4057818181518110610d6757634e487b7160e01b600052603260045260246000fd5b6020026020010151601b6000858481518110610d9357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055508080610db8906138d3565b915050610d3e565b33610dc9611298565b6001600160a01b031614610def5760405162461bcd60e51b8152600401610b0f906136c1565b80610df957600080fd5b601955565b33610e07611298565b6001600160a01b031614610e2d5760405162461bcd60e51b8152600401610b0f906136c1565b80610e3757600080fd5b601655565b33610e45611298565b6001600160a01b031614610e6b5760405162461bcd60e51b8152600401610b0f906136c1565b478015610eae57601a546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610eac573d6000803e3d6000fd5b505b50565b610c4083838360405180602001604052806000815250611940565b33610ed5611298565b6001600160a01b031614610efb5760405162461bcd60e51b8152600401610b0f906136c1565b600c55565b33610f09611298565b6001600160a01b031614610f2f5760405162461bcd60e51b8152600401610b0f906136c1565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610f5e9030906004016134c5565b60206040518083038186803b158015610f7657600080fd5b505afa158015610f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fae9190613431565b90508015610eac57601a5460405163a9059cbb60e01b81526001600160a01b038481169263a9059cbb92610fea9290911690859060040161353a565b602060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4091906133c5565b33611045611298565b6001600160a01b03161461106b5760405162461bcd60e51b8152600401610b0f906136c1565b8061107557600080fd5b600b55565b6000818152600260205260408120546001600160a01b031680610a0d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b0f565b60006001600160a01b03821661115c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b0f565b506001600160a01b031660009081526003602052604090205490565b33611181611298565b6001600160a01b0316146111a75760405162461bcd60e51b8152600401610b0f906136c1565b6111b16000612a4e565b565b336111bc611298565b6001600160a01b0316146111e25760405162461bcd60e51b8152600401610b0f906136c1565b60006111fb601554601054612aa090919063ffffffff16565b905060005b6014811015610c405760006112158383612aa0565b90506112208161276f565b1561123d5760405162461bcd60e51b8152600401610b0f90613668565b60135461124b906001612aa0565b60135560155461125c906001612aa0565b6015556000818152601b60205260408120556112788482612ab3565b611283600882612acd565b50508080611290906138d3565b915050611200565b6007546001600160a01b031690565b606060018054610a2490613898565b6000600260065414156112db5760405162461bcd60e51b8152600401610b0f906137a3565b6002600655600754600160a01b900460ff1615156001146113375760405162461bcd60e51b815260206004820152601660248201527539bcba3432b73a34b19034b9903737ba1037b832b71760511b6044820152606401610b0f565b604051630219207560e61b81526004810184905260009030906386481d409060240160206040518083038186803b15801561137157600080fd5b505afa158015611385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a99190613431565b905080156113ee5760405162461bcd60e51b81526020600482015260126024820152712834b7379027232a1030b1b1b2b83a32b21760711b6044820152606401610b0f565b6000848152601d60205260409020546001600160a01b0316156114535760405162461bcd60e51b815260206004820152601e60248201527f50696e6f20746f6b656e20616c72656164792073797468656e746963656400006044820152606401610b0f565b6040516331a9108f60e11b8152600481018590526000903090636352211e9060240160206040518083038186803b15801561148d57600080fd5b505afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906131a2565b604051632142170760e11b815290915030906342842e0e906114ef90849084908a906004016134d9565b600060405180830381600087803b15801561150957600080fd5b505af115801561151d573d6000803e3d6000fd5b5050506000868152601d602052604080822080546001600160a01b0319166001600160a01b03861617905551630219207560e61b81526004810187905290915030906386481d409060240160206040518083038186803b15801561158057600080fd5b505afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190613431565b9050600081116115ff5760405162461bcd60e51b81526020600482015260126024820152712a32b93a9027232a1030b1b1b2b83a32b21760711b6044820152606401610b0f565b6000858152601d60205260409020546001600160a01b0316156116645760405162461bcd60e51b815260206004820152601e60248201527f5465727520746f6b656e20616c72656164792073797468656e746963656400006044820152606401610b0f565b6040516331a9108f60e11b8152600481018690526000903090636352211e9060240160206040518083038186803b15801561169e57600080fd5b505afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d691906131a2565b604051632142170760e11b815290915030906342842e0e9061170090849084908b906004016134d9565b600060405180830381600087803b15801561171a57600080fd5b505af115801561172e573d6000803e3d6000fd5b5050506000878152601d6020526040812080546001600160a01b0319166001600160a01b0385161790556011549150611768826001612aa0565b90506117738161276f565b156117905760405162461bcd60e51b8152600401610b0f90613668565b60135461179e906001612aa0565b6013556117ab3382612ab3565b6117b6600882612acd565b506117c2846005612aa0565b6000828152601b602090815260409182902092909255805183815291820186905289918b916001600160a01b038916917f320c845dff75127985bd29b58b1141a6b163b607884ef87dc6a700d1892683cf910160405180910390a460019650505050505050600160065592915050565b610eac338383612ad9565b33611846611298565b6001600160a01b03161461186c5760405162461bcd60e51b8152600401610b0f906136c1565b60078054911515600160a01b0260ff60a01b19909216919091179055565b33611893611298565b6001600160a01b0316146118b95760405162461bcd60e51b8152600401610b0f906136c1565b600f55565b6000610a0d600883612ba4565b60006118d76008612bb0565b905090565b336118e5611298565b6001600160a01b03161461190b5760405162461bcd60e51b8152600401610b0f906136c1565b6001600160a01b03811661191e57600080fd5b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b61194a33836127fa565b6119665760405162461bcd60e51b8152600401610b0f90613752565b61197284848484612bba565b50505050565b6060806119836130c4565b6040805180820182526015808252741a1d1d1c1cce8bcbd958dbdb999d0b9b585c9ad95d605a1b60208084019190915291845282518084019093528252742f736572766963652f6d6574612e7068703f69643d60581b828201528201526119e984612bed565b60408083018290526020808401519151600093611a099392909101613496565b60408051808303601f190181529190529151959194509092505050565b6060611a306130eb565b6040518060600160405280602a815260200161397e602a91398152611a5483612bed565b60208083018290528251604051600093611a7093909101613496565b60408051808303601f19018152919052949350505050565b600060026006541415611aad5760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b038216611ad85760405162461bcd60e51b8152600401610b0f90613615565b601654341015611afa5760405162461bcd60e51b8152600401610b0f9061368d565b6000611b076103e8612d07565b601254909150611b18906001612aa0565b601255611b248161276f565b15611b8557600c545b600d54811015611b5e57611b408161276f565b611b4c57809150611b5e565b80611b56816138d3565b915050611b2d565b50611b688161276f565b15611b855760405162461bcd60e51b8152600401610b0f9061372c565b601354611b93906001612aa0565b601355611b9f81612d60565b6000828152601b60205260409020556001600160a01b0383166108fc611bc6346014612dc4565b6040518115909202916000818181858888f19350505050158015611bee573d6000803e3d6000fd5b50601a546001600160a01b03166108fc611c146014611c0e346013612dd0565b90612dc4565b6040518115909202916000818181858888f19350505050158015611c3c573d6000803e3d6000fd5b50611c473382612ab3565b611c52600882612acd565b506040805182815234602082015233917f0fe45a99d85d42e940667cd59eef303c22a572ebde7898bef9f65f8cca09537591015b60405180910390a2600160065592915050565b33611ca2611298565b6001600160a01b031614611cc85760405162461bcd60e51b8152600401610b0f906136c1565b80611cd257600080fd5b600d55565b600060026006541415611cfc5760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b038216611d275760405162461bcd60e51b8152600401610b0f90613615565b6017546040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611d769033906004016134c5565b60206040518083038186803b158015611d8e57600080fd5b505afa158015611da2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc69190613431565b1015611de45760405162461bcd60e51b8152600401610b0f906136f6565b6017546040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916323b872dd91611e369133913091906004016134d9565b602060405180830381600087803b158015611e5057600080fd5b505af1158015611e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8891906133c5565b506000611e966103e8612d07565b601254909150611ea7906001612aa0565b601255611eb38161276f565b15611f1457600c545b600d54811015611eed57611ecf8161276f565b611edb57809150611eed565b80611ee5816138d3565b915050611ebc565b50611ef78161276f565b15611f145760405162461bcd60e51b8152600401610b0f9061372c565b601354611f22906001612aa0565b601355611f2e81612d60565b6000828152601b60205260409020556017546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb908590611f7e906014612dc4565b6040518363ffffffff1660e01b8152600401611f9b92919061353a565b602060405180830381600087803b158015611fb557600080fd5b505af1158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed91906133c5565b50601a546017546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169263a9059cbb9291169061203b90601490611c0e906013612dd0565b6040518363ffffffff1660e01b815260040161205892919061353a565b602060405180830381600087803b15801561207257600080fd5b505af1158015612086573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120aa91906133c5565b506120b53382612ab3565b6120c0600882612acd565b5060175460405133917f27bed1a07d1c845b105af53f17a538d575e4cca601b1b979cbe40a4da5d23ab691611c8691858252602082015260400190565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b600260065414156121505760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b03821661217b5760405162461bcd60e51b8152600401610b0f9061363f565b6001600160a01b0381166121a15760405162461bcd60e51b8152600401610b0f9061363f565b6018543410156121c35760405162461bcd60e51b8152600401610b0f9061368d565b60006121dc601454600e54612aa090919063ffffffff16565b9050600f5481106121ff5760405162461bcd60e51b8152600401610b0f906135e6565b6122088161276f565b156122255760405162461bcd60e51b8152600401610b0f90613668565b601354612233906001612aa0565b601355601454612244906001612aa0565b60149081556001600160a01b038416906108fc90612263903490612dc4565b6040518115909202916000818181858888f1935050505015801561228b573d6000803e3d6000fd5b50601a546001600160a01b03166108fc6122ab6014611c0e346013612dd0565b6040518115909202916000818181858888f193505050501580156122d3573d6000803e3d6000fd5b506000818152601b60205260408120556122ed8282612ab3565b6122f8600882612acd565b505060016006555050565b3361230c611298565b6001600160a01b0316146123325760405162461bcd60e51b8152600401610b0f906136c1565b6001600160a01b0381166123975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0f565b610eae81612a4e565b600260065414156123c35760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b0382166123ee5760405162461bcd60e51b8152600401610b0f9061363f565b6001600160a01b0381166124145760405162461bcd60e51b8152600401610b0f9061363f565b6019546040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906124639033906004016134c5565b60206040518083038186803b15801561247b57600080fd5b505afa15801561248f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b39190613431565b10156124d15760405162461bcd60e51b8152600401610b0f906136f6565b6019546040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916323b872dd916125239133913091906004016134d9565b602060405180830381600087803b15801561253d57600080fd5b505af1158015612551573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257591906133c5565b50600061258f601454600e54612aa090919063ffffffff16565b9050600f5481106125b25760405162461bcd60e51b8152600401610b0f906135e6565b6125bb8161276f565b156125d85760405162461bcd60e51b8152600401610b0f90613668565b6013546125e6906001612aa0565b6013556014546125f7906001612aa0565b6014819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb846126436014601954612dc490919063ffffffff16565b6040518363ffffffff1660e01b815260040161266092919061353a565b602060405180830381600087803b15801561267a57600080fd5b505af115801561268e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b291906133c5565b50601a546019546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169263a9059cbb9291169061270090601490611c0e906013612dd0565b6040518363ffffffff1660e01b815260040161271d92919061353a565b602060405180830381600087803b15801561273757600080fd5b505af115801561274b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d391906133c5565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127c18261107a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006128058261276f565b6128665760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b0f565b60006128718361107a565b9050806001600160a01b0316846001600160a01b031614806128ac5750836001600160a01b03166128a184610aa7565b6001600160a01b0316145b806128bc57506128bc81856120fd565b949350505050565b826001600160a01b03166128d78261107a565b6001600160a01b03161461293b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b6001600160a01b03821661299d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b0f565b6129a860008261278c565b6001600160a01b03831660009081526003602052604081208054600192906129d1908490613855565b90915550506001600160a01b03821660009081526003602052604081208054600192906129ff90849061380a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716916000805160206139a883398151915291a4610c40565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612aac828461380a565b9392505050565b610eac828260405180602001604052806000815250612ddc565b6000612aac8383612e0f565b816001600160a01b0316836001600160a01b03161415612b375760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610b0f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000612aac8383612e5e565b6000610a0d825490565b612bc58484846128c4565b612bd184848484612e96565b6119725760405162461bcd60e51b8152600401610b0f90613594565b606081612c1257506040805180820190915260018152600360fc1b6020820152610a10565b8160005b8115612c3c5780612c26816138d3565b9150612c359050600a83613822565b9150612c16565b6000816001600160401b03811115612c6457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c8e576020820181803683370190505b5090505b84156128bc57612ca3600183613855565b9150612cb0600a866138ee565b612cbb90603061380a565b60f81b818381518110612cde57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612d00600a86613822565b9450612c92565b600081424433604051602001612d3d93929190928352602083019190915260601b6001600160601b031916604082015260540190565b6040516020818303038152906040528051906020012060001c610a0d91906138ee565b600061019a821015612d7457506001610a10565b6102e4821015612d8657506002610a10565b61038e821015612d9857506003610a10565b6103de821015612daa57506004610a10565b6103e8821015612dbc57506005610a10565b506000919050565b6000612aac8284613822565b6000612aac8284613836565b612de68383612fa3565b612df36000848484612e96565b610c405760405162461bcd60e51b8152600401610b0f90613594565b6000818152600183016020526040812054612e5657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612127565b506000612127565b6000826000018281548110612e8357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006001600160a01b0384163b15612f9857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612eda9033908990889088906004016134fd565b602060405180830381600087803b158015612ef457600080fd5b505af1925050508015612f24575060408051601f3d908101601f19168201909252612f21918101906133fd565b60015b612f7e573d808015612f52576040519150601f19603f3d011682016040523d82523d6000602084013e612f57565b606091505b508051612f765760405162461bcd60e51b8152600401610b0f90613594565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128bc565b506001949350505050565b6001600160a01b038216612ff95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b0f565b6130028161276f565b1561304e5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610b0f565b6001600160a01b038216600090815260036020526040812080546001929061307790849061380a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392906000805160206139a8833981519152908290a4610eac565b60405180606001604052806003905b60608152602001906001900390816130d35790505090565b60408051808201909152606081526001602082016130d3565b600082601f830112613114578081fd5b813560206001600160401b0382111561312f5761312f61392e565b8160051b61313e8282016137da565b838152828101908684018388018501891015613158578687fd5b8693505b8584101561317a57803583526001939093019291840191840161315c565b50979650505050505050565b600060208284031215613197578081fd5b8135612aac81613944565b6000602082840312156131b3578081fd5b8151612aac81613944565b600080604083850312156131d0578081fd5b82356131db81613944565b915060208301356131eb81613944565b809150509250929050565b60008060006060848603121561320a578081fd5b833561321581613944565b9250602084013561322581613944565b929592945050506040919091013590565b6000806000806080858703121561324b578081fd5b843561325681613944565b935060208581013561326781613944565b93506040860135925060608601356001600160401b0380821115613289578384fd5b818801915088601f83011261329c578384fd5b8135818111156132ae576132ae61392e565b6132c0601f8201601f191685016137da565b915080825289848285010111156132d5578485fd5b8084840185840137810190920192909252939692955090935050565b60008060408385031215613303578182fd5b823561330e81613944565b915060208301356131eb81613959565b60008060408385031215613330578182fd5b823561333b81613944565b946020939093013593505050565b6000806040838503121561335b578182fd5b82356001600160401b0380821115613371578384fd5b61337d86838701613104565b93506020850135915080821115613392578283fd5b5061339f85828601613104565b9150509250929050565b6000602082840312156133ba578081fd5b8135612aac81613959565b6000602082840312156133d6578081fd5b8151612aac81613959565b6000602082840312156133f2578081fd5b8135612aac81613967565b60006020828403121561340e578081fd5b8151612aac81613967565b60006020828403121561342a578081fd5b5035919050565b600060208284031215613442578081fd5b5051919050565b6000806040838503121561345b578182fd5b50508035926020909101359150565b6000815180845261348281602086016020860161386c565b601f01601f19169290920160200192915050565b600083516134a881846020880161386c565b8351908301906134bc81836020880161386c565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906135309083018461346a565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252612aac602083018461346a565b600060408252613579604083018561346a565b828103602084015261358b818561346a565b95945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601590820152741d1bdad95b925908195e18d959591cc81b1a5b5a5d605a1b604082015260600190565b60208082526010908201526f24b73b30b634b2103932b332b93932b960811b604082015260600190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b6020808252600b908201526a27232a1036b4b73a32b21760a91b604082015260600190565b6020808252601a90820152790929ca6aa8c8c9286928a9ca8409a929ca840869ea6a8408aa8960331b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527b24a729aaa32324a1a4a2a72a1026a4a72a1021a7a9aa102a27a5a2a760211b604082015260600190565b6020808252600c908201526b1093d60814d3d3110813d55560a21b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f191681016001600160401b03811182821017156138025761380261392e565b604052919050565b6000821982111561381d5761381d613902565b500190565b60008261383157613831613918565b500490565b600081600019048311821515161561385057613850613902565b500290565b60008282101561386757613867613902565b500390565b60005b8381101561388757818101518382015260200161386f565b838111156119725750506000910152565b600181811c908216806138ac57607f821691505b602082108114156138cd57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156138e7576138e7613902565b5060010190565b6000826138fd576138fd613918565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610eae57600080fd5b8015158114610eae57600080fd5b6001600160e01b031981168114610eae57600080fdfe68747470733a2f2f65636f6e66742e6d61726b65742f736572766963652f6d6574612e7068703f69643dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a50e121d465a377d5a9a9aadcb189c66e09f64c5bd162c8af1782904d0900ed964736f6c6343000803003300000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a9
Deployed Bytecode
0x6080604052600436106102b25760003560e01c806301ffc9a7146102b757806306fdde03146102ec578063081812fc1461030e578063095ea7b31461033b5780630c90b7e61461035d57806316ca48e31461037d57806317165eca146103a157806323b872dd146103c157806323bcfc00146103e1578063241c590c146104015780632b4c695b146104215780632b52834d146104375780632f53a8c6146104575780633651f5e41461046d5780633b4539cb146104835780633e0e828b1461049857806342842e0e146104ae578063433355a9146104ce5780634a0ef768146104ee5780634ca0cbfc14610504578063552d64f41461052557806359927044146105455780635ac293c914610565578063607870ff1461057b5780636352211e1461059b57806370a08231146105bb578063715018a6146105db57806376bde4f5146105f057806377b65e1a146106055780637b5e26af1461061a5780637e54a9241461063a57806386481d401461066e5780638da5cb5b1461069b57806395d89b41146106b0578063a1b4e76d146106c5578063a22cb465146106e5578063a30932e214610705578063a30a88cd1461071b578063a4821cda1461073b578063a57524ae14610751578063b005866c14610771578063b22b382d14610791578063b2596a67146107a6578063b80ec98d146107d3578063b88d4fde146107f3578063bfa291f314610813578063c4c6903314610841578063c77e4a4f14610857578063c87b56dd1461086d578063d231304b1461088d578063d37f5275146108a0578063d45458ab146108b6578063df1a7775146108cc578063df526978146108ec578063e0dc35b814610902578063e1fd7fbd14610922578063e985e9c514610938578063ed0d016f14610958578063f2fde38b1461096b578063f9567d191461098b578063fd62525a146109ab575b600080fd5b3480156102c357600080fd5b506102d76102d23660046133e1565b6109c1565b60405190151581526020015b60405180910390f35b3480156102f857600080fd5b50610301610a15565b6040516102e39190613553565b34801561031a57600080fd5b5061032e610329366004613419565b610aa7565b6040516102e391906134c5565b34801561034757600080fd5b5061035b61035636600461331e565b610b34565b005b34801561036957600080fd5b5061035b610378366004613419565b610c45565b34801561038957600080fd5b5061039360195481565b6040519081526020016102e3565b3480156103ad57600080fd5b5061035b6103bc366004613419565b610c83565b3480156103cd57600080fd5b5061035b6103dc3660046131f6565b610cc1565b3480156103ed57600080fd5b5061035b6103fc366004613349565b610cf2565b34801561040d57600080fd5b5061035b61041c366004613419565b610dc0565b34801561042d57600080fd5b5061039360115481565b34801561044357600080fd5b5061035b610452366004613419565b610dfe565b34801561046357600080fd5b5061039360185481565b34801561047957600080fd5b5061039360135481565b34801561048f57600080fd5b5061035b610e3c565b3480156104a457600080fd5b50610393600c5481565b3480156104ba57600080fd5b5061035b6104c93660046131f6565b610eb1565b3480156104da57600080fd5b5061035b6104e9366004613419565b610ecc565b3480156104fa57600080fd5b50610393600b5481565b34801561051057600080fd5b506007546102d790600160a01b900460ff1681565b34801561053157600080fd5b5061035b610540366004613186565b610f00565b34801561055157600080fd5b50601a5461032e906001600160a01b031681565b34801561057157600080fd5b50610393600d5481565b34801561058757600080fd5b5061035b610596366004613419565b61103c565b3480156105a757600080fd5b5061032e6105b6366004613419565b61107a565b3480156105c757600080fd5b506103936105d6366004613186565b6110f1565b3480156105e757600080fd5b5061035b611178565b3480156105fc57600080fd5b50610393600581565b34801561061157600080fd5b50601254610393565b34801561062657600080fd5b5061035b610635366004613186565b6111b3565b34801561064657600080fd5b5061032e7f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a981565b34801561067a57600080fd5b50610393610689366004613419565b6000908152601b602052604090205490565b3480156106a757600080fd5b5061032e611298565b3480156106bc57600080fd5b506103016112a7565b3480156106d157600080fd5b506102d76106e0366004613449565b6112b6565b3480156106f157600080fd5b5061035b6107003660046132f1565b611832565b34801561071157600080fd5b5061039360155481565b34801561072757600080fd5b5061035b6107363660046133a9565b61183d565b34801561074757600080fd5b50610393600f5481565b34801561075d57600080fd5b5061035b61076c366004613419565b61188a565b34801561077d57600080fd5b5061039361078c366004613419565b6118be565b34801561079d57600080fd5b506103936118cb565b3480156107b257600080fd5b506103936107c1366004613419565b601b6020526000908152604090205481565b3480156107df57600080fd5b5061035b6107ee366004613186565b6118dc565b3480156107ff57600080fd5b5061035b61080e366004613236565b611940565b34801561081f57600080fd5b5061083361082e366004613419565b611978565b6040516102e3929190613566565b34801561084d57600080fd5b5061039360175481565b34801561086357600080fd5b5061039360105481565b34801561087957600080fd5b50610301610888366004613419565b611a26565b61039361089b366004613186565b611a88565b3480156108ac57600080fd5b5061039361043881565b3480156108c257600080fd5b5061039360125481565b3480156108d857600080fd5b5061035b6108e7366004613419565b611c99565b3480156108f857600080fd5b50610393600e5481565b34801561090e57600080fd5b5061039361091d366004613186565b611cd7565b34801561092e57600080fd5b5061039360165481565b34801561094457600080fd5b506102d76109533660046131be565b6120fd565b61035b6109663660046131be565b61212d565b34801561097757600080fd5b5061035b610986366004613186565b612303565b34801561099757600080fd5b5061035b6109a63660046131be565b6123a0565b3480156109b757600080fd5b5061039360145481565b60006001600160e01b031982166380ac58cd60e01b14806109f257506001600160e01b03198216635b5e139f60e01b145b80610a0d57506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b606060008054610a2490613898565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5090613898565b8015610a9d5780601f10610a7257610100808354040283529160200191610a9d565b820191906000526020600020905b815481529060010190602001808311610a8057829003601f168201915b5050505050905090565b6000610ab28261276f565b610b185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b3f8261107a565b9050806001600160a01b0316836001600160a01b03161415610bad5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b0f565b336001600160a01b0382161480610bc95750610bc98133610953565b610c365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610b0f565b610c40838361278c565b505050565b33610c4e611298565b6001600160a01b031614610c745760405162461bcd60e51b8152600401610b0f906136c1565b80610c7e57600080fd5b601755565b33610c8c611298565b6001600160a01b031614610cb25760405162461bcd60e51b8152600401610b0f906136c1565b80610cbc57600080fd5b601855565b610ccb33826127fa565b610ce75760405162461bcd60e51b8152600401610b0f90613752565b610c408383836128c4565b33610cfb611298565b6001600160a01b031614610d215760405162461bcd60e51b8152600401610b0f906136c1565b815115801590610d32575080518251145b610d3b57600080fd5b60005b8251811015610c4057818181518110610d6757634e487b7160e01b600052603260045260246000fd5b6020026020010151601b6000858481518110610d9357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055508080610db8906138d3565b915050610d3e565b33610dc9611298565b6001600160a01b031614610def5760405162461bcd60e51b8152600401610b0f906136c1565b80610df957600080fd5b601955565b33610e07611298565b6001600160a01b031614610e2d5760405162461bcd60e51b8152600401610b0f906136c1565b80610e3757600080fd5b601655565b33610e45611298565b6001600160a01b031614610e6b5760405162461bcd60e51b8152600401610b0f906136c1565b478015610eae57601a546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610eac573d6000803e3d6000fd5b505b50565b610c4083838360405180602001604052806000815250611940565b33610ed5611298565b6001600160a01b031614610efb5760405162461bcd60e51b8152600401610b0f906136c1565b600c55565b33610f09611298565b6001600160a01b031614610f2f5760405162461bcd60e51b8152600401610b0f906136c1565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610f5e9030906004016134c5565b60206040518083038186803b158015610f7657600080fd5b505afa158015610f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fae9190613431565b90508015610eac57601a5460405163a9059cbb60e01b81526001600160a01b038481169263a9059cbb92610fea9290911690859060040161353a565b602060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4091906133c5565b33611045611298565b6001600160a01b03161461106b5760405162461bcd60e51b8152600401610b0f906136c1565b8061107557600080fd5b600b55565b6000818152600260205260408120546001600160a01b031680610a0d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b0f565b60006001600160a01b03821661115c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b0f565b506001600160a01b031660009081526003602052604090205490565b33611181611298565b6001600160a01b0316146111a75760405162461bcd60e51b8152600401610b0f906136c1565b6111b16000612a4e565b565b336111bc611298565b6001600160a01b0316146111e25760405162461bcd60e51b8152600401610b0f906136c1565b60006111fb601554601054612aa090919063ffffffff16565b905060005b6014811015610c405760006112158383612aa0565b90506112208161276f565b1561123d5760405162461bcd60e51b8152600401610b0f90613668565b60135461124b906001612aa0565b60135560155461125c906001612aa0565b6015556000818152601b60205260408120556112788482612ab3565b611283600882612acd565b50508080611290906138d3565b915050611200565b6007546001600160a01b031690565b606060018054610a2490613898565b6000600260065414156112db5760405162461bcd60e51b8152600401610b0f906137a3565b6002600655600754600160a01b900460ff1615156001146113375760405162461bcd60e51b815260206004820152601660248201527539bcba3432b73a34b19034b9903737ba1037b832b71760511b6044820152606401610b0f565b604051630219207560e61b81526004810184905260009030906386481d409060240160206040518083038186803b15801561137157600080fd5b505afa158015611385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a99190613431565b905080156113ee5760405162461bcd60e51b81526020600482015260126024820152712834b7379027232a1030b1b1b2b83a32b21760711b6044820152606401610b0f565b6000848152601d60205260409020546001600160a01b0316156114535760405162461bcd60e51b815260206004820152601e60248201527f50696e6f20746f6b656e20616c72656164792073797468656e746963656400006044820152606401610b0f565b6040516331a9108f60e11b8152600481018590526000903090636352211e9060240160206040518083038186803b15801561148d57600080fd5b505afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906131a2565b604051632142170760e11b815290915030906342842e0e906114ef90849084908a906004016134d9565b600060405180830381600087803b15801561150957600080fd5b505af115801561151d573d6000803e3d6000fd5b5050506000868152601d602052604080822080546001600160a01b0319166001600160a01b03861617905551630219207560e61b81526004810187905290915030906386481d409060240160206040518083038186803b15801561158057600080fd5b505afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190613431565b9050600081116115ff5760405162461bcd60e51b81526020600482015260126024820152712a32b93a9027232a1030b1b1b2b83a32b21760711b6044820152606401610b0f565b6000858152601d60205260409020546001600160a01b0316156116645760405162461bcd60e51b815260206004820152601e60248201527f5465727520746f6b656e20616c72656164792073797468656e746963656400006044820152606401610b0f565b6040516331a9108f60e11b8152600481018690526000903090636352211e9060240160206040518083038186803b15801561169e57600080fd5b505afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d691906131a2565b604051632142170760e11b815290915030906342842e0e9061170090849084908b906004016134d9565b600060405180830381600087803b15801561171a57600080fd5b505af115801561172e573d6000803e3d6000fd5b5050506000878152601d6020526040812080546001600160a01b0319166001600160a01b0385161790556011549150611768826001612aa0565b90506117738161276f565b156117905760405162461bcd60e51b8152600401610b0f90613668565b60135461179e906001612aa0565b6013556117ab3382612ab3565b6117b6600882612acd565b506117c2846005612aa0565b6000828152601b602090815260409182902092909255805183815291820186905289918b916001600160a01b038916917f320c845dff75127985bd29b58b1141a6b163b607884ef87dc6a700d1892683cf910160405180910390a460019650505050505050600160065592915050565b610eac338383612ad9565b33611846611298565b6001600160a01b03161461186c5760405162461bcd60e51b8152600401610b0f906136c1565b60078054911515600160a01b0260ff60a01b19909216919091179055565b33611893611298565b6001600160a01b0316146118b95760405162461bcd60e51b8152600401610b0f906136c1565b600f55565b6000610a0d600883612ba4565b60006118d76008612bb0565b905090565b336118e5611298565b6001600160a01b03161461190b5760405162461bcd60e51b8152600401610b0f906136c1565b6001600160a01b03811661191e57600080fd5b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b61194a33836127fa565b6119665760405162461bcd60e51b8152600401610b0f90613752565b61197284848484612bba565b50505050565b6060806119836130c4565b6040805180820182526015808252741a1d1d1c1cce8bcbd958dbdb999d0b9b585c9ad95d605a1b60208084019190915291845282518084019093528252742f736572766963652f6d6574612e7068703f69643d60581b828201528201526119e984612bed565b60408083018290526020808401519151600093611a099392909101613496565b60408051808303601f190181529190529151959194509092505050565b6060611a306130eb565b6040518060600160405280602a815260200161397e602a91398152611a5483612bed565b60208083018290528251604051600093611a7093909101613496565b60408051808303601f19018152919052949350505050565b600060026006541415611aad5760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b038216611ad85760405162461bcd60e51b8152600401610b0f90613615565b601654341015611afa5760405162461bcd60e51b8152600401610b0f9061368d565b6000611b076103e8612d07565b601254909150611b18906001612aa0565b601255611b248161276f565b15611b8557600c545b600d54811015611b5e57611b408161276f565b611b4c57809150611b5e565b80611b56816138d3565b915050611b2d565b50611b688161276f565b15611b855760405162461bcd60e51b8152600401610b0f9061372c565b601354611b93906001612aa0565b601355611b9f81612d60565b6000828152601b60205260409020556001600160a01b0383166108fc611bc6346014612dc4565b6040518115909202916000818181858888f19350505050158015611bee573d6000803e3d6000fd5b50601a546001600160a01b03166108fc611c146014611c0e346013612dd0565b90612dc4565b6040518115909202916000818181858888f19350505050158015611c3c573d6000803e3d6000fd5b50611c473382612ab3565b611c52600882612acd565b506040805182815234602082015233917f0fe45a99d85d42e940667cd59eef303c22a572ebde7898bef9f65f8cca09537591015b60405180910390a2600160065592915050565b33611ca2611298565b6001600160a01b031614611cc85760405162461bcd60e51b8152600401610b0f906136c1565b80611cd257600080fd5b600d55565b600060026006541415611cfc5760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b038216611d275760405162461bcd60e51b8152600401610b0f90613615565b6017546040516370a0823160e01b81526001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a916906370a0823190611d769033906004016134c5565b60206040518083038186803b158015611d8e57600080fd5b505afa158015611da2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc69190613431565b1015611de45760405162461bcd60e51b8152600401610b0f906136f6565b6017546040516323b872dd60e01b81526001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a916916323b872dd91611e369133913091906004016134d9565b602060405180830381600087803b158015611e5057600080fd5b505af1158015611e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8891906133c5565b506000611e966103e8612d07565b601254909150611ea7906001612aa0565b601255611eb38161276f565b15611f1457600c545b600d54811015611eed57611ecf8161276f565b611edb57809150611eed565b80611ee5816138d3565b915050611ebc565b50611ef78161276f565b15611f145760405162461bcd60e51b8152600401610b0f9061372c565b601354611f22906001612aa0565b601355611f2e81612d60565b6000828152601b60205260409020556017546001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a9169063a9059cbb908590611f7e906014612dc4565b6040518363ffffffff1660e01b8152600401611f9b92919061353a565b602060405180830381600087803b158015611fb557600080fd5b505af1158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed91906133c5565b50601a546017546001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a981169263a9059cbb9291169061203b90601490611c0e906013612dd0565b6040518363ffffffff1660e01b815260040161205892919061353a565b602060405180830381600087803b15801561207257600080fd5b505af1158015612086573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120aa91906133c5565b506120b53382612ab3565b6120c0600882612acd565b5060175460405133917f27bed1a07d1c845b105af53f17a538d575e4cca601b1b979cbe40a4da5d23ab691611c8691858252602082015260400190565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b600260065414156121505760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b03821661217b5760405162461bcd60e51b8152600401610b0f9061363f565b6001600160a01b0381166121a15760405162461bcd60e51b8152600401610b0f9061363f565b6018543410156121c35760405162461bcd60e51b8152600401610b0f9061368d565b60006121dc601454600e54612aa090919063ffffffff16565b9050600f5481106121ff5760405162461bcd60e51b8152600401610b0f906135e6565b6122088161276f565b156122255760405162461bcd60e51b8152600401610b0f90613668565b601354612233906001612aa0565b601355601454612244906001612aa0565b60149081556001600160a01b038416906108fc90612263903490612dc4565b6040518115909202916000818181858888f1935050505015801561228b573d6000803e3d6000fd5b50601a546001600160a01b03166108fc6122ab6014611c0e346013612dd0565b6040518115909202916000818181858888f193505050501580156122d3573d6000803e3d6000fd5b506000818152601b60205260408120556122ed8282612ab3565b6122f8600882612acd565b505060016006555050565b3361230c611298565b6001600160a01b0316146123325760405162461bcd60e51b8152600401610b0f906136c1565b6001600160a01b0381166123975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0f565b610eae81612a4e565b600260065414156123c35760405162461bcd60e51b8152600401610b0f906137a3565b60026006556001600160a01b0382166123ee5760405162461bcd60e51b8152600401610b0f9061363f565b6001600160a01b0381166124145760405162461bcd60e51b8152600401610b0f9061363f565b6019546040516370a0823160e01b81526001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a916906370a08231906124639033906004016134c5565b60206040518083038186803b15801561247b57600080fd5b505afa15801561248f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b39190613431565b10156124d15760405162461bcd60e51b8152600401610b0f906136f6565b6019546040516323b872dd60e01b81526001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a916916323b872dd916125239133913091906004016134d9565b602060405180830381600087803b15801561253d57600080fd5b505af1158015612551573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257591906133c5565b50600061258f601454600e54612aa090919063ffffffff16565b9050600f5481106125b25760405162461bcd60e51b8152600401610b0f906135e6565b6125bb8161276f565b156125d85760405162461bcd60e51b8152600401610b0f90613668565b6013546125e6906001612aa0565b6013556014546125f7906001612aa0565b6014819055507f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a96001600160a01b031663a9059cbb846126436014601954612dc490919063ffffffff16565b6040518363ffffffff1660e01b815260040161266092919061353a565b602060405180830381600087803b15801561267a57600080fd5b505af115801561268e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b291906133c5565b50601a546019546001600160a01b037f00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a981169263a9059cbb9291169061270090601490611c0e906013612dd0565b6040518363ffffffff1660e01b815260040161271d92919061353a565b602060405180830381600087803b15801561273757600080fd5b505af115801561274b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d391906133c5565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127c18261107a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006128058261276f565b6128665760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b0f565b60006128718361107a565b9050806001600160a01b0316846001600160a01b031614806128ac5750836001600160a01b03166128a184610aa7565b6001600160a01b0316145b806128bc57506128bc81856120fd565b949350505050565b826001600160a01b03166128d78261107a565b6001600160a01b03161461293b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b6001600160a01b03821661299d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b0f565b6129a860008261278c565b6001600160a01b03831660009081526003602052604081208054600192906129d1908490613855565b90915550506001600160a01b03821660009081526003602052604081208054600192906129ff90849061380a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716916000805160206139a883398151915291a4610c40565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612aac828461380a565b9392505050565b610eac828260405180602001604052806000815250612ddc565b6000612aac8383612e0f565b816001600160a01b0316836001600160a01b03161415612b375760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610b0f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000612aac8383612e5e565b6000610a0d825490565b612bc58484846128c4565b612bd184848484612e96565b6119725760405162461bcd60e51b8152600401610b0f90613594565b606081612c1257506040805180820190915260018152600360fc1b6020820152610a10565b8160005b8115612c3c5780612c26816138d3565b9150612c359050600a83613822565b9150612c16565b6000816001600160401b03811115612c6457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c8e576020820181803683370190505b5090505b84156128bc57612ca3600183613855565b9150612cb0600a866138ee565b612cbb90603061380a565b60f81b818381518110612cde57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612d00600a86613822565b9450612c92565b600081424433604051602001612d3d93929190928352602083019190915260601b6001600160601b031916604082015260540190565b6040516020818303038152906040528051906020012060001c610a0d91906138ee565b600061019a821015612d7457506001610a10565b6102e4821015612d8657506002610a10565b61038e821015612d9857506003610a10565b6103de821015612daa57506004610a10565b6103e8821015612dbc57506005610a10565b506000919050565b6000612aac8284613822565b6000612aac8284613836565b612de68383612fa3565b612df36000848484612e96565b610c405760405162461bcd60e51b8152600401610b0f90613594565b6000818152600183016020526040812054612e5657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612127565b506000612127565b6000826000018281548110612e8357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006001600160a01b0384163b15612f9857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612eda9033908990889088906004016134fd565b602060405180830381600087803b158015612ef457600080fd5b505af1925050508015612f24575060408051601f3d908101601f19168201909252612f21918101906133fd565b60015b612f7e573d808015612f52576040519150601f19603f3d011682016040523d82523d6000602084013e612f57565b606091505b508051612f765760405162461bcd60e51b8152600401610b0f90613594565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128bc565b506001949350505050565b6001600160a01b038216612ff95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b0f565b6130028161276f565b1561304e5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610b0f565b6001600160a01b038216600090815260036020526040812080546001929061307790849061380a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392906000805160206139a8833981519152908290a4610eac565b60405180606001604052806003905b60608152602001906001900390816130d35790505090565b60408051808201909152606081526001602082016130d3565b600082601f830112613114578081fd5b813560206001600160401b0382111561312f5761312f61392e565b8160051b61313e8282016137da565b838152828101908684018388018501891015613158578687fd5b8693505b8584101561317a57803583526001939093019291840191840161315c565b50979650505050505050565b600060208284031215613197578081fd5b8135612aac81613944565b6000602082840312156131b3578081fd5b8151612aac81613944565b600080604083850312156131d0578081fd5b82356131db81613944565b915060208301356131eb81613944565b809150509250929050565b60008060006060848603121561320a578081fd5b833561321581613944565b9250602084013561322581613944565b929592945050506040919091013590565b6000806000806080858703121561324b578081fd5b843561325681613944565b935060208581013561326781613944565b93506040860135925060608601356001600160401b0380821115613289578384fd5b818801915088601f83011261329c578384fd5b8135818111156132ae576132ae61392e565b6132c0601f8201601f191685016137da565b915080825289848285010111156132d5578485fd5b8084840185840137810190920192909252939692955090935050565b60008060408385031215613303578182fd5b823561330e81613944565b915060208301356131eb81613959565b60008060408385031215613330578182fd5b823561333b81613944565b946020939093013593505050565b6000806040838503121561335b578182fd5b82356001600160401b0380821115613371578384fd5b61337d86838701613104565b93506020850135915080821115613392578283fd5b5061339f85828601613104565b9150509250929050565b6000602082840312156133ba578081fd5b8135612aac81613959565b6000602082840312156133d6578081fd5b8151612aac81613959565b6000602082840312156133f2578081fd5b8135612aac81613967565b60006020828403121561340e578081fd5b8151612aac81613967565b60006020828403121561342a578081fd5b5035919050565b600060208284031215613442578081fd5b5051919050565b6000806040838503121561345b578182fd5b50508035926020909101359150565b6000815180845261348281602086016020860161386c565b601f01601f19169290920160200192915050565b600083516134a881846020880161386c565b8351908301906134bc81836020880161386c565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906135309083018461346a565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252612aac602083018461346a565b600060408252613579604083018561346a565b828103602084015261358b818561346a565b95945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601590820152741d1bdad95b925908195e18d959591cc81b1a5b5a5d605a1b604082015260600190565b60208082526010908201526f24b73b30b634b2103932b332b93932b960811b604082015260600190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b6020808252600b908201526a27232a1036b4b73a32b21760a91b604082015260600190565b6020808252601a90820152790929ca6aa8c8c9286928a9ca8409a929ca840869ea6a8408aa8960331b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527b24a729aaa32324a1a4a2a72a1026a4a72a1021a7a9aa102a27a5a2a760211b604082015260600190565b6020808252600c908201526b1093d60814d3d3110813d55560a21b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f191681016001600160401b03811182821017156138025761380261392e565b604052919050565b6000821982111561381d5761381d613902565b500190565b60008261383157613831613918565b500490565b600081600019048311821515161561385057613850613902565b500290565b60008282101561386757613867613902565b500390565b60005b8381101561388757818101518382015260200161386f565b838111156119725750506000910152565b600181811c908216806138ac57607f821691505b602082108114156138cd57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156138e7576138e7613902565b5060010190565b6000826138fd576138fd613918565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610eae57600080fd5b8015158114610eae57600080fd5b6001600160e01b031981168114610eae57600080fdfe68747470733a2f2f65636f6e66742e6d61726b65742f736572766963652f6d6574612e7068703f69643dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a50e121d465a377d5a9a9aadcb189c66e09f64c5bd162c8af1782904d0900ed964736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a9
-----Decoded View---------------
Arg [0] : _esgToken (address): 0x20cD2E7Ec8F5d8b337fe46a4F565Ccef1561b9a9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000020cd2e7ec8f5d8b337fe46a4f565ccef1561b9a9
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.